• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sending AppleScript to yourself
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Sending AppleScript to yourself (From: Mark Dawson <email@hidden>)

  • Prev by Date: Re: Sending AppleScript to yourself
  • Next by Date: Re: Sending AppleScript to yourself
  • Previous by thread: Re: Sending AppleScript to yourself
  • Next by thread: User Agent name of "URL Access Scripting"
  • Index(es):
    • Date
    • Thread