Applescript control.
  • I'm developing an app for my own use that pans from one position to another, the position it pans to is random, as is the time it stays on that position.

    My problem is that the speed that the change of position happens is far too quick (using "ptz preset4 camera number 0"), what I'd like is a slow progress from one position to another .

    "I've tried "ptz right camera number 0" but the camera just keeps moving continuously (and at full speed).

    Is there another way to send a command such as say "move right 10", "zoom in 10" etc.

    Any ideas gratefully received.

  • I have added two enhancements to the PTZ AppleScript command in the latest beta version of SecuritySpy (currently 4.2.9b5) that should help you here:

    The first is a "stop" command, which is required for cameras with continuous movement.

    The second is a "speed" parameter, so that you can specify the speed of movement between 1-100. Note that not all cameras support this.

    You can achieve random pans by sending a move command, delaying a random amount, then sending stop command, for example:

        tell app "SecuritySpy"
            ptz right camera number 0 speed 50
            delay ((random number from 1 to 10) / 10)
            ptz stop camera number 0
        end tell
  • Thank you,

    Downloaded and testing.

Howdy, Stranger!

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