On Wed, Jun 9, 2010 at 10:53 AM, Simon Lord <[email protected]> wrote:
> Is there a way to have a stack know if it's not *focused*? Can this
> also be done if the stack is not the foreground application?
On a Mac, you can do this using AppleScript.
Here are my handlers for this:
function isAppAtFront pAppName
if isAppRunning(pAppName) = false then return false
put " tell application " & quote & "System Events" & quote & cr & \
"get the frontmost of application process" & quote &
pAppName & quote & cr & \
"end tell" into tScript
do tScript as AppleScript
return the result
end isAppAtFront
function isAppRunning pAppName
put "tell application " & quote & "System Events" & quote & cr into tScript
put "return (exists application process " & quote & pAppname &
quote & ")" & cr after tScript
put "end tell" after tScript
do tScript as AppleScript
return the result
end isAppRunning
--
Cheers,
Sarah
Rodeo discussion:
http://rodeoapps.com/rodeo-discuss-among-yourselves
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution