Okay for some reason now it is working. Interesting. Anyway I am getting the name of the window in Acrobat Reader returned in the result so I can now just use "is in" to determine if ANY app has it open. Nice. Still takes about 6 to 8 seconds though. In Applescript it only takes less than a second. Something is bogging down LC running as applescript.
Bob S > On May 17, 2019, at 18:07 , Bob Sneidar via use-livecode > <[email protected]> wrote: > > Okay for those of you who care about this sort of thing: > > This works to get the names of all open windows from the Process Viewer. It > works in the script editor > tell application "System Events" > get name of every window of every process > return the result > end tell > > but when I attempt this in LC I get an execution error: > on mouseUp > put "tell application " & quote & "System Events" & quote & cr into tScript > put tab & "get name of every window of every process" & cr after tScript > put tab & "return the result" & cr after tscript > put "end tell" after tscript > do tscript as applescript > put the result > end mouseUp > > I had to add the LC app in accessibility the first time it ran, but > afterwards I get execution error as the result. > > Bob S _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
