Hi all,
I’ve been going through amending a couple of old automation scripts I’ve made to remove the generic ‘delay’ periods with a wait for window command.
I’ve written a little script that waits for the window to appear but won’t continue afterwards or is stuck in a loop. In the example below, the window is found but it constantly says ‘test’. When I move the say command after the ‘end repeat’ it doesn’t say ‘test’ at all.
Any help appreciated as I know it’s something I’m just overlooking.
Thanks
Will
tell application "System Events"
set windowCheck to false
repeat until (windowCheck)
if (window 1 of process "softwareApplication" exists) then
delay 2
end if
say "test"
end repeat
end tell