Klaus, I have a function that generally works with this AppleScript:
function stsGetFrontmostProcess 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 return tResult end stsGetFrontmostProcess Give that a try and see if it works for you. Ken > On Nov 23, 2019, at 6:24 AM, Klaus major-k via use-livecode > <use-livecode@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! > > > Best > > Klaus > -- > Klaus Major > https://www.major-k.de > kl...@major-k.de > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode