Pages: 1
Print
Author Topic: Is it possible to do a keyboard shortcut for a button?  (Read 993 times)
luskds
Member

Posts: 3


« on: December 07, 2016, 10:46:45 AM »

Specifically, I am trying to do a keyboard shortcut to toggle the change tracking button.  Recording a macro just tells me it has no actions to record.  I didn't see it in the keyboard shortcut list or when I did a post search.
I am using XMetal Author Enterprise 10 on Windows 7 (some of our users are on Windows 10 and/or XMetal Author Essentials 10).
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2502



WWW
« Reply #1 on: December 07, 2016, 01:10:02 PM »

Macro recording is pretty much limited to things that directly affect a document using the keyboard pasting content, typing content, moving around in the document, etc.

The immediate solution for you would be to use Alt+T followed by C.

In XMetaL Author shortcuts are assigned to macros (a macro might have an associated button on a toolbar or menu but that is incidental). For built-in functions like the Change Tracking feature there is no macro so you cannot assign (or reassign) a shortcut key directly to a built-in function. You would need to write a macro that either duplicates the feature or otherwise runs the feature and assign a keystroke to the macro. There are APIs that let you turn Change Tracking on and off so the following would do it in this case:

Code: (Toggle Change Tracking, JScript example)
if (ActiveDocument.TrackRevisions == false) {
ActiveDocument.TrackRevisions = true;
}
else {
ActiveDocument.TrackRevisions = false;
}




Logged
luskds
Member

Posts: 3


« Reply #2 on: December 08, 2016, 06:17:09 AM »

Thanks Derek.  That looks like a simple enough macro to write.  I'll give it a shot.
Logged
Pages: 1
Print
Jump to:  

email us