Re: How do you get two scripts to communicate?
Re: How do you get two scripts to communicate?
- Subject: Re: How do you get two scripts to communicate?
- From: James Burton <email@hidden>
- Date: Thu, 1 Jan 2004 19:19:11 -0700
Thanks Walter -- I think the ability to define an event is just what I
need for my project (ultimately, I need Perl to build and run a
text-based applescript that will pass some perl results to an
applescript studio application -- unless I can find a way for Perl to
talk directly to the studio app)
On Jan 1, 2004, at 5:51 PM, Walter Ian Kaye wrote:
At 03:07p -0800 01/01/2004, Andrew Oliver didst inscribe upon an
electronic papyrus:
You can't quite do it in the way you describe here - you need to be
more
explicit.
The primary issue is that AppleScript doesn't save application
references by
name but by application signature. This is how you can write a script
that
targets, say, "BBEdit" and it will still work on someone else's
machine
whether the actual installed app is called "BBEdit 7", "BBEdit 7.0",
or
"BBEdit" - the script is storing a reference to the application's
signature
so the name isn't needed.
Unfortunately for you, all AppleScript applications will have the same
signature (unless you've taken steps to use your own application
signature),
...which you can, of course, do for free at
<http://developer.apple.com/dev/cftype/>.
BTW, you can go even further and define your own events:
on <<event clssidid>> aname
"hi, " & aname
end <<event clssidid>>
And then you could tell the app to do this:
<<event clssidid>> "Jim"
And -- if you really wanted to kick it up a notch -- you could go so
far as to build your own dictionary to provide terminology to the
event so you could tell the app 'sayhi "Jim"'.
Just like a "real" app. :-)
But that was way more than you wanted to know, wasn't it... ;)
-boo
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.