• 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: Insert text and paste command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Insert text and paste command


  • Subject: Re: Insert text and paste command
  • From: David C Andrews <email@hidden>
  • Date: Sat, 16 Apr 2005 23:14:52 -0400


On Apr 14, 2005, at 8:26 PM, Andrea -XFox- Govoni wrote:

Joseph Weaks wrote:

...

Thank you very much guys!
Thanks to your suggestions now the script works very well! :-D
The final form is:

<cut-here>
tell application "Finder" to set frontAppPath to path to frontmost application
tell application "System Events"
set frontAppName to displayed name of frontAppPath
set frontmost of process frontAppName to true
tell process frontAppName to keystroke "MyText"
end tell
<cut-here>
....

FWIW, I've been told that "System Events" should be faster at this. So perhaps (untested from script menu) the following will do:

<cut-here>
tell application "System Events"
set frontAppName to (displayed name of (path to frontmost application))
set frontmost of process frontAppName to true
tell process frontAppName to keystroke "MyText"
end tell
<cut-here>

 _______________________________________________
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

  • Follow-Ups:
    • Re: Insert text and paste command
      • From: Andrea -XFox- Govoni <email@hidden>
References: 
 >Re: Insert text and paste command (From: J Stewart <email@hidden>)
 >Re: Insert text and paste command (From: Joseph Weaks <email@hidden>)
 >Re: Insert text and paste command (From: Andrea -XFox- Govoni <email@hidden>)

  • Prev by Date: Re: Localized Internals of AppleScript (date Class for example)
  • Next by Date: Fwd: Save Apple Mail attachments, RTF email & Print Script HELP
  • Previous by thread: Re: Insert text and paste command
  • Next by thread: Re: Insert text and paste command
  • Index(es):
    • Date
    • Thread