Re: Repeat until application is frontmost
Re: Repeat until application is frontmost
- Subject: Re: Repeat until application is frontmost
- From: theDaniel <email@hidden>
- Date: Sun, 15 Jan 2012 12:46:21 -0500
Thanks Alex, I'll have to give this a try later.
On Jan 15, 2012, at 5:33AM, Alex Zavatone wrote: on run main() end run
on main() tell application "System Events" set myWindow to get window 1 of application process "iOS Simulator" set myfield to text field 1 of myWindow end tell
set iterations to 0 repeat while true activate application "iPhone Simulator" set iterations to iterations + 1 log iterations tell application "System Events" click myfield keystroke return end tell
delay 3
end repeat end main
On Jan 14, 2012, at 8:57 PM, theDaniel wrote: In Leopard my script is broken. BTW I activate this script using the users Script menu. The problem seems to be the current application looses focus while the script is running and 'keystroke "c" ' seems to be lost, I also get a 'system beep' when it runs.Funny thing is if I use the script using the freeware 'FinderPop' — I place an alias to "Users Scripts Folder" in the FinderPop menu — then the script works, even though it first brings the Finder forward.
|
_______________________________________________
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