• 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: Capturing Code Snippets 2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Capturing Code Snippets 2


  • Subject: Re: Capturing Code Snippets 2
  • From: Philippe GRUCHET <email@hidden>
  • Date: Mon, 7 Apr 2003 02:00:59 +0200

From: Craig Sutherland <email@hidden>

This is most kludgey, but works. Could be presented with more elegance. This was saved as a compiled script in ~/Library/Scripts/ and is accessible through the Script Menu when the Mail.app is active. The script simply transfers selected text in a message window to a new TextEdit doc.

tell application "System Events"
tell application process "Mail"
tell menu bar 1
tell menu "Mail" --(2)
tell menu item "Services" --(6)
tell menu "Services" --(1)
tell menu item "TextEdit" --(19)
tell menu "TextEdit" --(1)
click menu item "Open Selection" --(2)
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell



This is a very well descriptive procedure. Bravo!
(Even if I prefer the "Make new AppleScript" command from the Services menu.)
Much more than mine:
--------------------------------------
tell app "Mail" to activate

tell application "System Events"
click menu item "Open Selection" of menu "TextEdit" of menu item "TextEdit" of menu "Services" of menu item "Services" of menu "Mail" of menu bar 1 of application process "Mail"
end tell
--------------------------------------

Useful, if we could join a shortkey to a script in Script Menu: should be much more useful than browsing the Services menu to find an appropriate command, or going up to the right script in Script Menu.
Why not as an applet in the Dock...
The goal is to send a selection in a script editor easily and quickly!

I'd like the "Make new AppleScript" as contextual menu item in Mail ;-)


Kind regards,
Philippe/SVM Mac
http://svmmac.vnunet.fr
_______________________________________________
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.

  • Prev by Date: Re: Making a folder in the user's library
  • Next by Date: Re: Space in POSIX path/Terminal shell
  • Previous by thread: Re: Capturing Code Snippets 2
  • Next by thread: Re: Capturing Code Snippets 2
  • Index(es):
    • Date
    • Thread