Re: Sending AppleScript to yourself
Re: Sending AppleScript to yourself
- Subject: Re: Sending AppleScript to yourself
- From: Christopher Nebel <email@hidden>
- Date: Mon, 10 Oct 2005 08:17:44 -0700
On Oct 9, 2005, at 2:20 PM, Mark Dawson wrote:
I'm not sure if this is a "user" or "programming" question:
In example code that shows how to call AppleScripts (compiled) from
your own program, I wasn't sure if the text was any different if
you wanted to send to yourself--i.e.
a script could be:
tell application mail
...
end tell
however, would you still say
tell application myApp
...
end tell
if "myApp" is the one executing the script?
You could, but you don't have to. Scripts are implicitly wrapped in
a "tell <current application>" when they're being compiled or
executed. Try running "get name" in Script Editor to see the effect
in action. That said, many people prefer to include an explicit
"tell", because that way they can edit and test the script in Script
Editor, then install it in their application without changing it.
--Chris Nebel
AppleScript and Automator Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden