so, writing a code to send me a text when a program [VisualHub] quits after converting video files.
the issue is that when i initially run the script, it follows through with running the second script called FilesDone [one which i made with automator].
the script is a repeating check to see if visualhub is present in the running applications. if so - keep checking. if not - then run [FilesDone], end repeat.
VisualHub is running when i initially run the script. yet - it runs FilesDone anyway, but keeps checking to see if VisualHub is closed [and when closes - runs FilesDone again].
what have i missed that FilesDone is executed at the start of the repeat?
thanks,
the issue is that when i initially run the script, it follows through with running the second script called FilesDone [one which i made with automator].
the script is a repeating check to see if visualhub is present in the running applications. if so - keep checking. if not - then run [FilesDone], end repeat.
Code:
on run {input, parameters}
repeat
tell application "System Events"
if ((get name of the processes) does not contain "VisualHub") then
tell application "FilesDone"
activate
exit repeat
end tell
end if
end tell
end repeat
return input
end run
VisualHub is running when i initially run the script. yet - it runs FilesDone anyway, but keeps checking to see if VisualHub is closed [and when closes - runs FilesDone again].
what have i missed that FilesDone is executed at the start of the repeat?
thanks,