macOS, is my app active?
kray at sonsothunder.com
Sun Nov 24 02:25:57 EST 2019
I have a function that generally works with this AppleScript:
put "tell app `System Events`" & cr & \
"get (the name of every application process whose frontmost is true) as string" & cr & \
"end tell" into tScript
replace "`" with quote in tScript
do tScript as AppleScript
put the result into tResult
replace quote with "" in tResult
Give that a try and see if it works for you.
> On Nov 23, 2019, at 6:24 AM, Klaus major-k via use-livecode <use-livecode at lists.runrev.com> wrote:
> Hi friends,
> can we check if our standalone is currently active, means in
> the "foreground" or if it is not active? Know what I mean?
> If yes, how can we do that? LC? AppleScript?
> I want to alert the user if the app is active, but not if the app
> is not active.
> Thanks in advance!
> Klaus Major
> klaus at major-k.de
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode