• 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
Script breaks when launched from Mail script menu, fine in SE
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Script breaks when launched from Mail script menu, fine in SE


  • Subject: Script breaks when launched from Mail script menu, fine in SE
  • From: Jeff Porten <email@hidden>
  • Date: Tue, 6 Jul 2004 18:49:17 -0400

I've seen stuff relating to this before, but not involving GUI
scripting, so I'm not sure where to start on this.

The script below runs fine in Script Editor, but breaks when launched
(by keystroke) from the Mail.app script menu. What'd I miss?

Note: I deliberately use that string of set statements because I can't
stand having my code get ridiculously indented with nested tells. As
far as I can see, this is syntactically identical to nested tells --
and like I said, it works in the Script Editor. But I know it's not
conforming to the examples on the Apple site.

Thanks,
Jeff

tell application "Mail" to activate

tell application "System Events"
tell process "Mail"
set menu1 to menu bar 1
set menu2 to menu bar item "Mail" of menu1
set menu3 to menu "Mail" of menu2
set menu4 to menu item "Services" of menu3
set menu5 to menu "Services" of menu4
set menu6 to menu item "DayLite" of menu5
set menu7 to menu "DayLite" of menu6
set menu8 to menu item "Make & Attach Note from Apple Mail Text" of
menu7

tell menu7 to click menu8
end tell
end tell
_______________________________________________
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.


  • Follow-Ups:
    • Re: Script breaks when launched from Mail script menu, fine in SE
      • From: Walter Ian Kaye <email@hidden>
  • Prev by Date: Re: AppleScript to C
  • Next by Date: Re: Getting the default language with AppleScript
  • Previous by thread: Re: AppleScript to C
  • Next by thread: Re: Script breaks when launched from Mail script menu, fine in SE
  • Index(es):
    • Date
    • Thread