On my slow, old Mac mini server I've found it helpful to simply run a script to save my
security cam images to a local folder and view them using a refreshing URL.
Starting the script is easy enough and works well but I'm stuck on how to stop
it from repeating when I need it to.
The attached script is just a shot at what I thought I needed to have happen
by setting a variable in Indigo which the script would test for to repeat or not.
- Code: Select all
tell application "IndigoServer"
if the value of variable "SecurityCamsRun" is equal to "true" then
set camsRun to "true"
else
if the value of variable "SecurityCamsRun" is equal to "false" then
set camsRun to "false"
end if
end if
end tell
repeat while camsRun is "true"
tell application "SecuritySpy"
capture image camera number 0 as "/Users/TV/Sites/ss/1.jpg" with overwrite
delay 0.25
capture image camera number 1 as "/Users/TV/Sites/ss/2.jpg" with overwrite
delay 0.25
capture image camera number 2 as "/Users/TV/Sites/ss/3.jpg" with overwrite
delay 0.25
capture image camera number 4 as "/Users/TV/Sites/ss/4.jpg" with overwrite
delay 0.25
delay 1
end while
end repeat
Any tips or info greatly appreciated!
Carl