I created an application with AppleScript Studio some years ago.
I actually used compiled scripts and it worked fine.
Using the new Xcode, I am looking to recompile it, but none of the compiled scripts are recognized.
When I open the scripts with AppleScript Editor (or SD) it shows the Xcode handlers and classes as «» code:
on «event coVSselF» theObject
set objectName to name of theObject
if objectName is "graph table" then
set buttonList to {«class butT» "inspector delete" of «class boxO»"graph" of window "inspector", «class butT» "inspector show" of «class boxO» "graph" of window "inspector"}
Does anyone knows of a way to recover the scripts and save them as .applescript text files so that I can recompile the app?
Thanks!!
Hanaan
This is "normal behavior" when attempting to compile AppleScript Studio scripts using just a script editor (as opposed to the editor within xcode). There is sort of a 'built in tell' within xcode that 'assumes' the dictionary of the app you are building, and you won't be able to compile/use the code unless from within xcode (unless the code never references xcode's built-in dictionary). There is a ton of functionality in XCode AppleScript apps (or AppleScript Studio apps -- that is the old paradigm) that don't translate, or don't translate easily to scripts. You would have to 'port' the existing code -- if possible. For example, «class butT» compiles to 'button' from within XCode, but in Smile, for example (my editor of choice), it doesn't, unless I put it in an Xcode tell block, like:
which will compile to
So you could, in theory put all your code, or methodically puts parts of it, in Xcode tell blocks to see it compile. But then ... why not do that in Xcode? The point is you'll have to figure out what is dependent on the Xcode's classes and needs to be 'ported' (or totally changed or removed) and what works by itself.