- Online: Extensions
- Online: Workflow
- Online: Applications
- Online: Automation
- Online: Education
Scripting the Non-scriptable
Page 4
Other Methods of Working Around
Non-Scriptable Application Features
While GUI scripting will usually serve as a suitable workaround for scripting non-scriptable application features, there are limitations at times. Now and then you may encounter user interface elements that aren't accessible via GUI scripting, or that simply will not respond to GUI scripting. In these situations, there are usually alternative methods of working around the limitation.
QuicKeys
Perhaps one of the more common methods of simulating user interaction on the Mac is with an application called QuicKeys. Available from Startley Technologies, LLC, QuicKeys will allow you to create macro sequences of events to click buttons, select menus, and more. While similar to GUI scripting, QuicKeys seems to be able to access interface elements that GUI scripting cannot, such as QuarkXPress' page sectioning window (see figure 5).

Figure 5 An example QuicKeys shortcut for sectioning a document.
Furthermore, QuicKeys is AppleScriptable, so it can be incorporated into a larger AppleScript-based workflow. I would encourage you to download the fully functional 30-day demonstration version of QuicKeys.
IKey
Another application, that is similar to QuicKeys in many respects, is iKey. This is available from Scripts Software. iKey will also allow shortcuts to be created that can be used to click buttons, select from menus, and more. See figure 6 for an example of an iKey shortcut for applying sectioning to a QuarkXPress document.

Figure 6 An example of an iKey shortcut for sectioning a document.
A 30-day demonstration version of iKey is available.
Third-party XTensions Modules
Another avenue to consider when attempting to script features that are not scriptable in QuarkXPress is that certain XTensions modules add new AppleScript functionality to QuarkXPress. While this additional terminology is usually specifically for automating the XTensions module itself, this is not always the case. For example, ScriptMasterXT, available from Jintek, LLC, adds 16 new AppleScript commands to QuarkXPress' AppleScript support, including a start section command that may be used to section a document. Some XTensions modules developers that often include AppleScript support in their XTensions modules are Em Software, and Gluon, among others.
In Conclusion
This issue's column should help to ease some of the frustration that comes with finding out that a task you are attempting to automate is not directly accessible to AppleScript. You will find that, using the tools that we have discussed — GUI scripting, QuicKeys, and iKey — it is almost always possible to find a workaround for the situation, allowing you to continue automating that time-consuming or repetitive workflow. While the completed workflow may have a few unanticipated sidesteps in the end, it will no doubt still provide quite a workable solution that will help to make your workflow more efficient than ever.
See you in the trenches.
1 | 2 | 3 | 4 | PDF Version
If you enjoy our articles, click here to subscribe. |
||
| |
||
Free JavaScripts provided by The JavaScript Source |
||






