In a thread wrote in 2004, a one line statement could execute «any» handler with «all it’s parameters» if required. This was the resulting thread message:
--An example of the universal code line to call a library
Call("DeltaTimeLib", {2, 6.5})
---The handler that you paste in your script somewhere .....
on Call(libraryName, parameterList)
copy (load script file ((path to scripting additions as string) & libraryName)) to loadResult
run script loadResult with parameters parameterList
end Call
---The Run handler that will be called by the 1 line universal statement (compiled script located in your scripting additions folder):
on run {deltaDays, deltaHours}
set theDate to current date
set theDate to theDate + (deltaDays * days)
set theDate to theDate + (deltaHours * hours)
return theDate
end run
Loading this script in the Script Editor now returns garbage statements and commands. How can I adapt it to today’s AppleScript ?
Thanks in advance.
Robert Lespérance