Re: Keystroking a Text Field
Re: Keystroking a Text Field
- Subject: Re: Keystroking a Text Field
- From: Yvan KOENIG <email@hidden>
- Date: Wed, 01 Jul 2015 17:11:10 +0200
Hi,
on run tell application "TextEdit" activate set myWindow to the front window set myContent to "Hello Cruel World!" tell application "System Events" to keystroke myContent end tell end run
When I run the above from the Script Editor with a Blank window open in Text Edit, the “Hello Cruel World!” string gets written to the Script Window, not the TextEdit Window, how to I get it to into the TextEdit Window?
Thanks a lot Dave
You may try :
on run tell application "TextEdit" activate
set myWindow to the front window end tell set myContent to "Hello Cruel World!"
tell application "System Events" to tell process "TextEdit" set frontmost to true keystroke myContent end tell
end run
Yvan KOENIG (VALLAURIS, France) mercredi 1 juillet 2015 17:11:05
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden