Apple scriptable standalones

Andre Garzia soapdog at mac.com
Sat Nov 20 16:52:43 EST 2004


Folks,

i theory to get your rev apps to be applescriptable is damn easy, all you need is ResEdit (carbon)or some xml editor and plist knowledge.

You need to create an AETE entry in your resource fork, AETE means something like apple event terminology or something. Theres a nice "addon" for resedit to create this things, it's free, it's on the web and google finds it. You create the AETE resource with the comand text like suppose you want to interpret the following line:

post "this text"

you would add a post text with one string/text object (i think this is represented by "----"). Then you will say what event this would dispach, you create your events, they are four letter strings. When someone use something like

tell "yourFancyApp"
  post "the data"
end tell

your stack will receive an appleevent, you can handle that, you could map that command to something like a POST event. so your script would receive a POST apple event and "the data" as parameter... it's easier done than explained... for macos x, i think they have a new scheme with plists inside the app bundle, this should be easier to create than AETE entries on resource forks... i'll research that and come back to you later

andre

 
On Saturday, November 20, 2004, at 07:51AM, Klaus Major <klaus at major-k.de> wrote:

>Hi Mark,
>
>> william-
>>
>> Saturday, November 20, 2004, 12:02:14 AM, you wrote:
>>
>> wg> Script edit gave me an error as soon as I compiled this:
>
>>
>> ...and no wonder...
>>
>> Try:
>>
>> local theScript
>> put "tell application" && quote & iGame3d & quote & cr \
>>   & "do script" && quote & "quit" & quote && cr \
>>   & "end tell" & cr \
>>   into theScript
>>
>> do theScript as applescript
>
>ehmm, Bill wanted to use a "real" applescript and NOT "do something as 
>applescript"
>from WITHIN his standalone...
>
>Which would not really make sense, i think ;-)
>
>
>Hi Bill,
>
>quick guess:
>
>do you really have a script called "quit" somewhere in the stackscript
>or any place that is accesible to "everyone"?
>
>I have not tried yet, but i think the stackscript would be the best 
>place
>for scripts to be called by (external) applescripts...
>
>Try this one in the stackscript:
>
>on goodbye
>   quit
>end goodbye
>
>And then
>
>...
>tell ...
>     do script "goodbye"
>end tell
>
>Please tell me if that works ;-)
>
>> -Mark Wieder
>>  mwieder at ahsoftware.net
>
>Best
>
>Klaus Major
>klaus at major-k.de
>http://www.major-k.de
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/use-revolution
>
>


More information about the use-livecode mailing list