Hi JB, > Am 24.11.2019 um 00:27 schrieb JB via use-livecode > <use-livecode@lists.runrev.com>: > > Hi Klaus, > > I did that and got a error but by reformatting > the code properly it worked.
what do you mean by "reformatting"? I copied this from a TXT file and "pasted unformatted" into my field. Still -> execution error I suspect this is a permission thing, maybe I need to grant LC, and my later app, permissions in the macOS Settings panel. So the, little more complex, solution Trevor proposed suddenly looks a lot more appealing! :-D > JB > ... >> >>> 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" 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