Enabled/disabled active camera via apple script
  • I'm using Indigo home automation software to manage, this software allows you to manage SSpy via plugin but the plugin (cynicalSSpy) after a while it does not work. Indigo has the ability to handle the Applescript enbedded so I could use an Apple Script that it can activate or disattivate a web cam.
    I tried to use this applescript via curl command in shell:
    property thePath : "http://username:password@"
    do shell script "curl-d" & "'cameraNum=0&camEnabledCheck=1&action=save'" & thePath
    but it does not work, then this I try:
    tell application "Security Spy"
    set active camera number 0
    end tell
    but it does not compile, error after "0".
    How should I write the apple script to activate a web cam?
  • Hi ibicus

    The AppleScript commands are:

    active mode camera number 0


    passive mode camera number 0

    (with the correct camera number of course).

    Hopefully this will do what you want!
  • Is Indigo on the same machine as SecuritySpy ?

    In either case, I would specify the Actual IP Address, not the Loopback IP or localhost:

    property thePath : "http://username:password@"

    I would also run it as an external script, not embedded. The reason is, that if embedded, applescript will take priority within Indigo and if your script hangs, Indigo will "hang" until the script is terminated. This is mentioned in the Indigo Help files.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!