FrontAccess is an AppleScript module to obtain information for application process and its frontmost document using GUI Scripting. FrontAccess can help building a script which does not depend on a certain application.The features of FrontAccess are..
FrontAccess requires GUI Scripting.
To enable GUI Scripting, the application using FrontAcess must be registerd in the Accessibility section in the Security & Privacy preference pane in System Preferences.
GUIScriptingChercker is useful to check availability of GUI Scripting.
Make an instance of FrontAccess for the frontmost application.
Make an instance of FrontAccess for the specified application
Make an instance of FrontAccess for the application specified by a file reference.
Obtain the application name.
Obtain the application's bundle identifier.
Obtain information for the application file.
Obtain an alias to the application file.
Obtain a reference to the application process.
Whether a target instance indicates current application.
Obtain a reference of the frontmost window of the application. The window is related with a file.
Obtain a reference of the frontmost window of the application. The window is not always related with a file.
Obtain a file URL of the frontmost document of the application
Obtain an alias to the file of the frontmost document of the application
Perform saving the frontmost document of the application.
Perform closing the frontmost document of the application.
When true is passed, key-type emulation ("Command + w") is used for close_document.
Put a text into the clipboard and emulate typing Command+v.