Home > XModules >

Requirements

  • OS X 10.9 or later
    • Developed and tested on macOS 10.14.6.

Download

Version 1.4.1 -- 2020-02-01

Old Versions

Dependencies

FrontAccess

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..

  • Obtain the file reference of the frontmost document of the frontmost application process.
  • Save and close of the frontmost document of the frontmost application process.
  • Obtain information about the frontmost application process.
use FrontAccess : script "FrontAccess"
use GUIScriptingChecker : script "GUIScriptingChecker"

if not GUIScriptingChecker's do() then
return
end if

tell (make FrontAccess) -- Making an instance of FrontAccess
(* Obtain application name and file alias *)
log application_name()
log application_alias()

(* Obtain the file alias of the front document *)
log document_alias()
end tell

History

  • 1.4.1 -- 2020-02-01
    • OpenHelpBook.scptd is used to display a help book instead of HelpBook.osax.
  • 1.4 -- 2017-02-09
    • OS X 10.9 or later is required.
    • URI Escape.osax is not required.
    • ModuleLoader.osax is not required.
    • SmartAcrivate.osax is not required.
    • Added compatibility with AppleScript Libraries introduced in OS X 10.9.
  • 1.3.1r2 -- 2014-10-01
    • Fixed : the "edit" button of the sample code in the HelpBook does not work.
  • 1.3.1 -- 2013-09-17
    • Fixed : error of document_alias() with AppleScriptObjC.
  • 1.3 -- 2012-06-13
    • Added "check_osax".
    • Improved the layout of the help book for small Help Viwer's windows.
  • 1.2.1 -- 2010-09-10
    • Fixed : Correct error does not raise when front window is not for the document.
  • 1.2 -- 2010-08-09
    • Added "main_window".
  • 1.1.1 -- 2010-03-30
    • Removed dependency on "ShowHelpBook"
    • Improve coompattibility with some applications.
  • 1.1 -- 2009-10-20
    • Added method "bundle_identifier".
    • Added method "is_current_application".
    • Added method "set_keytype_emulation".
    • Added method "paste_text".
    • app_name() will return short name instead of disyplayed name.
  • 1.0.2 -- 2009-04-29
    • Fixed a problem when front window is not saved, second window is processed.
    • When front window is not saved, error number 1751 will raise.
  • 1.0.1 -- 2008-11-10
    • Improved compatibility with Mac OS X 10.5.
    • Added document_url().
  • 1.0 -- 2008-04-20
    • First release.