macOS, is my app active?
Klaus major-k
klaus at major-k.de
Sat Nov 23 16:04:48 EST 2019
Hallo Hermann,
> Am 23.11.2019 um 17:16 schrieb hh via use-livecode <use-livecode at lists.runrev.com>:
>
> MacOS 10.15.1
macOS 10.14.6 here, LC 9.5.1 rc1
> This is fld "IN" (your snippet):
>
> tell application "System Events"
> set activeApp to name of first application process whose frontmost is true
> return activeApp
> end tell
>
> on mouseUp
> do fld "IN" as "applescript"
> put the result into fld "OUT"
> end mouseUp
>
> yields in fld "OUT":
> "Livecode-Community" or
> "LiveCode-Indy" or
> "LiveCode-Business"
no, it doesn't unfortunately!
I wrote (this is in fact in my field 1):
> -----------------------------------------------------------------
> 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!?
With DOing I meant of course your above mentioned procedere "on mouseup":
on mouseUp
do fld 1 as AppleScript
put the result into fld 2
end mouseUp
But all I get in field 2 is -> execution error
Clueless...
Best
Klaus
--
Klaus Major
https://www.major-k.de
klaus at major-k.de
More information about the use-livecode
mailing list