There is a file
Bob Sneidar
bobsneidar at iotecdigital.com
Fri May 17 21:07:16 EDT 2019
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
> On May 17, 2019, at 17:44 , Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> I've tried all of them. -n -O one other. Apparently looking at the google results, lsof is simply by nature DOG SLOW. I mean dying dog with 2 broken legs and a clowder of cats scratching it's eyes out slow. I've checked Applescript forums too. Apprently there is no damned good way to tell if a file is open on a Mac without using the API provided by the OS. Sometimes Apple takes my breath away. And not in a good way.
>
> Bob S
>
>
>> On May 17, 2019, at 17:07 , Mark Wieder via use-livecode <use-livecode at lists.runrev.com> wrote:
>>
>> On 5/17/19 4:59 PM, Bob Sneidar via use-livecode wrote:
>>> Okay I am using lsof in a shell command to see if the file open flag is set. It's taking SIXTEEN SECONDS! Any ideas on a better way to check to see if a file is open?
>>
>> What options are you using for the lsof command?
>>
>>
>> --
>> Mark Wieder
>> ahsoftware at gmail.com
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list