Re: Repeat until application is frontmost
Re: Repeat until application is frontmost
- Subject: Re: Repeat until application is frontmost
- From: theDaniel <email@hidden>
- Date: Fri, 13 Jan 2012 14:35:21 -0500
- Resent-date: Fri, 13 Jan 2012 14:35:59 -0500
- Resent-from: theDaniel <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: AppleScript Users <email@hidden>
Thank you guys. Already tried the first one, didn't work. Just now tried the second, it didn't work either. I'll have to try this on Sno Leo later, but right now I'm on Lion and it don't work. :)
-Daniel On Jan 13, 2012, KOENIG Yvan wrote: If my memory is right, it's not the app which is at front but the application process.
You may try this scheme :
set OLB to "Camino" tell application "System Events" keystroke "c" using command down end tell tell application OLB to activate tell application "System Events" repeat try if application process OLB is frontmost then exit repeat end try end repeat On Jan 13, 2012, Iurista GmbH wrote:
try to replace the repeat sequence with this code. It's tested with with Snow Leo
repeat tell application "System Events" to set FA to name of frontmost application if (FA contains "your Program name here") then exit repeat end if end repeat
display alert "Blubb..." message "Hey, I'm now frontmost..."
|
_______________________________________________
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