See page 472 of Neuberg’s Applescript: The Definitive Guide (2nd ed.) book for help. Looks complex. Obj-c code to deal with too.
Fantastic book on Ascript, everyone should have it.
You can’t so this. What you need to do is add the applescript file to your current project, then use the ‘load script’ command to load that applescript in your project… then you can call that subroutine like this…
set scriptLibrary to load script POSIX file (get path for script "theScript" extension "scpt")
dosomeproc(2) of scriptLibrary
Hm, so there is no chance to sync app’s dictionary (in sdef) with AppleScript?
So I should rewrite some parts in C, because they could implement dictionary.