macOS, is my app active?

Klaus major-k klaus at
Sat Nov 23 08:28:44 EST 2019

Hi all,

> Am 23.11.2019 um 13:24 schrieb Klaus major-k via use-livecode <use-livecode at>:
> 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.

I found this snippet on the net:
tell application "System Events"
	set activeApp to name of first application process whose frontmost is true
	return activeApp
end tell

Works fine in the AppleScript Editor, but I get "execution error" when DOing this in LC!?
Any hints appreciated!



Klaus Major
klaus at

More information about the use-livecode mailing list