ModuleLoader は、AppleScript Libraries の構文や機能を使わなくても動作します。ModuleLoader 独自の構文を使うことにより、次のModuleLoader 独自の機能を使うことができます。
ModuleLoader can works without syntaxes and functions of AppleScript Libraries. Using own syntax of ModuleLoader, following specific functions are available.
The following is a syntax of AppleScript Libraries to load library "LibraryName" into the property "LibraryName".
ModuleLoader's following syntax is equivalent to the avobe.
When the value of the property is a string started with "@module", library is loaded into the property. The requested library is indicated by the property name.
By giving a parameter to "@module", the library of which name is diffrent form the property name can be loaded as the following.
Also version of libraries to load can be specified. See xxx for details.
When a library is specfied with "@module", "Libary/Scripts/Modules" is added to searching location for libraries.
The order to search for library is as the following.
Script files (.scptd, .scpt, .applescript and .app files) as libraries can be placed in following locations.
"Script Libraries" folder is recommend to place library files, because the folder is also used by AppleScript Libraries which has been introduced in OS X 10.9 or later. Only libraries which require ModuleLoader's functions should be placed in "Scripts/Modules" folder.
The other advantage of ModuleLoader againt build-in AppleScript Libraries is to load AppleScript souce files (.applescript file), Applets and Droplets which are not works under "AppleScript Libraries".
Therefore following files can be treated as libraries.