Accessing MacScript.com library functions in Applescripts running in an Automator workflow

In AppleScript the normal method for loading the MacScript.com Library and any other ‘saved as run-only’ Libraries is:

property parent : load script alias (((path to scripting additions from local domain) as text) & “Macscript.com Library”) .

In Automator this doesn’t work. In order to access the Library to use its functions you have to run it and then call it like so:

[sourcecode]
–run the Macscript.com library
set script_path to (((path to scripting additions from local domain) as text) & "Macscript.com Library")
set myscript to load script file script_path
tell myscript to run

–tell other apps to do stuff here etc etc

–tell MacScript.com Library to perform a function (i.e. target the Library)
tell myscript
–perform the Library function e.g.
set {theName, theFolder} to {name, folder} of DividePath(theFile)
end tell

— continue with other script actions
[/sourcecode]