ModuleLoader is a scripting addition to search and load script libraries/
modules of AppleScripts. It allows you to load a module with spcifing only
its name.
http://homepage.mac.com/tkurita/scriptfactory/en/XModules/contents.html#ModuleLoader
The standard way to load a module/libray in AppleScript may be using "load
script" command. In the case of this command, you must give a full path
to a module. And the path is maintain by your self.
ModuleLoader can search the module from predefined locations (~/Library/
Scripts/Modules, /Library/Scripts/Modules are defaults) by only its name.
The libraries and modules for ModuleLoader are normal AppleScript's product
i.e. compiled scripts, script bundles, applets and droplets. Also ModuleLoader
have many functions for loading scripts. But you can start to use ModuleLoader
as a better "load script" command. You don't need to rewritten your libraries
at the beginning.
Also ModuleLoader borrows appleMods's mechanism to update dependencies and
keep equivalents of modules loaded more than once.
Some examples :
== Simply search and load script
property mod1 : load module "Module1"
== loading module which have dependencies
property parent : make loader
property mod1 : load module "Moduel1"
== A module which depends on other modules.
property mod2 : missing value
on module loaded by loader
tell loader
set mod2 to load module "Module2"
end tell
end tell
=======================================================
Tetsuro KURITA
E-mail: [log in to unmask]http://homepage.mac.com/tkurita/scriptfactory/en/
=======================================================