Help with GUI Scripting (Using System Events)

If you have applications that don’t have built-in Applescript dictionaries, you can control them using what is called “GUI Scripting.” This term just means to write a script that controls the user interface. This is done using an applicaton in OS X called “System Events.”

When you open Script Editor, just choose “Open Dictionary…” from the “File” menu and there will be a list of all the applicatons your Mac knows about. Choose “System Events” and you can see the dictionary.

If you need help with finding out the items in an application (menus, windows, etc.), just download Apple’s UI Inspector application. It will show you the hierarchy of the element that your pointer is hovering over.