Re: Communicating with process found by creator type
Re: Communicating with process found by creator type
- Subject: Re: Communicating with process found by creator type
- From: Jolly Roger <email@hidden>
- Date: Mon, 19 Feb 2001 13:14:56 -0600
- Replyto: email@hidden
on 2/19/2001 8:30 AM, Mike Richmond (email@hidden) wrote:
>
I am trying to locate and communicate with a scriptable app. As the app is
>
liable to be renamed I am locating it by creator type, but I can't then
>
communicate with it. I am doing the following:
>
>
on run
>
tell application "Finder"
>
repeat with proc in every process
>
if (creator type of proc) as string is equal to "ABCD" then
>
copy (name of proc) as string to myapp
>
end if
>
end repeat
>
end tell
Hi Mike,
Don't get the name. Get the process:
tell application "Finder" to set myapp to (the first process whose creator
type is "ABCD") as <<class psn >>
And tell the process like this:
tell myapp
quit
end tell
>
It works fine if I "tell application myapp to quit", or if I "tell
>
application "myappname" to set x to 1". Where am I going wrong, or is it
>
just not possible to send commands which require my app's dictionary? I am
>
getting no errors, but my app's handler is never called.
If you want to use terminology specific to the app in question, you will
need to either employ the double-tell technique, or the raw event code
technique.
We discuss both frequently on this list. And as others have pointed out,
these topics are discussed on various web sites. But if you have specific
questions, feel free to ask here - that's what this list is for.
HTH
JR