![]() ![]() This way, you can update the function in Igor Pro and need not muck around in AppleScript any further. In AppleScript, you can tell the application Keyboard Maestro Engine to: snippet. That is all it takes to launch a Shortcut from Keyboard Maestro. Keyboard Maestro Version 7.1 introduced a streamlined way to Get and Set Keyboard Maestro Variables from AppleScript. ![]() Then, code an AppleScript to activate Igor Pro and run that function. You can do that using the Execute AppleScript action with the following text inside: tell application 'Shortcuts Events' run the shortcut 'Shortcut Name' end tell You’d need to replace Shortcut Name with the actual Shortcut name, while retaining the quotes. In this case first code a function in Igor Pro to do all the changes needed in Igor Pro. Perhaps you are wanting to code this so that you can send the request from a different application than Igor Pro using AppleScript as the conduit. The latter means that you leave the Igor Pro application, which defeats the purpose of having a one character command within Igor Pro in the first place. The former still requires that you code a one character key to execute the function in Igor Pro that will execute the AppleScript from Igor Pro that will subsequently re-activate Igor Pro in order to execute a second function that will do the graph actions you want (see the complications!). Alternatively, you are coding something that you would have to execute by being outside of the Igor Pro application itself (ie, as an applet). What you have requested to code is a call from Igor Pro to invoke AppleScript to activate Igor Pro to do something. The recommendation that Adam Light has made is the better option. ![]() Any suggestions on how to make this work? I'd like to update graph macros with a single keystroke, and wrote a short applescript. Wide-Angle Neutron Spin Echo Spectroscopy. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |