Home > XModules >

Requirements

  • OS X 10.9 or later

Download

Version 2.1.1 -- 2020-01-30

Old Versions

Dependencies

FinderSelection

FinderSelection is an AppleScriptLibrary to obtain items meeting specified conditions from selected items in Finder.

By using FinderSelection, following complex sequence can be easily performed with several lines.

  1. Obtain Finder's selection filterd with conditions of specified kind, file type or path extension.
  2. If items matched with the conditions did not exist, a panel to select files will be opened.
  3. In the case of you script is an applet or a droplet and the application is launched with double clicking in Finder, a panel to select files will be opened.
  4. If alias files are included in selected items, the originals are checked with the conditions.
    • The behaivior can be changed to prevent following originals at setting.
use FinderSelection : script "FinderSelection"

tell FinderSelection's make_for_file()
set_prompt_message("Choose text file or PDF file.")
set_types({"com.apple.traditional-mac-plain-text", "TEXT", "PDF "})
set_extensions({".txt", ".pdf"})
get_selection()
end tell

History

  • 2.1.1 -- 2020-01-30
    • Added English documents.
    • Use OpenHelpBook.scptd instead of HelpBook.osax.