Re: solutions to scripting addition terminology confilicts
Re: solutions to scripting addition terminology confilicts
- Subject: Re: solutions to scripting addition terminology confilicts
- From: email@hidden
- Date: Sat, 26 Jan 2002 00:10:18 -0500
On Fri, 25 Jan 2002 13:00:05 -0800, Paul Berkowitz <email@hidden> asked,
>
But a 'using terms from' block always has to surround a 'tell app' block. it
>
doesn't exist on its own. Either way you'd need an app, and a 'tell app'
>
block, no?
You can use 'using terms from' without a 'tell app' block. Unless the term in
the app's dictionary also has meaning to the script itself, its not too useful,
but it compiles and gives the error message you'd expect.
using terms from application "Finder"
sleep
end using terms from
-->Result: <<script>> doesn't understand the sleep message.
I also ran an experiment, and showed I could use 'using terms from' to create an
event that an osax would respond to. Here's what I did.
I made a copy of an AppleScriptable application, named it "Terminology", and
removed its aete dictionary resource. I then created a new aete, with the
single event "tock", which had the same event code as "the ticks" from Jon's
commands.
I then wrote and ran this script:
using terms from application "Terminology"
tock
end using terms from
--> Result: 15727342 (what you'd expect from 'the ticks')
Hey, its just like that episode of Star Trek where a transporter malfunction
split Kirk into evil Kirk (the osax) and wimp Kirk (the application with the
aete).
--
Scott Norton Phone: +1-703-299-1656
DTI Associates, Inc. Fax: +1-703-706-0476
2920 South Glebe Road Internet: email@hidden
Arlington, VA 22206-2768 or email@hidden