Applescript help

Discussion in 'Mac Programming' started by killbeams, Feb 8, 2008.

  1. macrumors newbie

    Joined:
    Feb 8, 2008
    #1
    My goal is a set up that will pause and then restart a video in quicktime whenever a motion is detected, I've already found motion detection software that will run a script when motion is detected but I have no idea how to write a script to do what I need. I'm only interested in scripting for this particular project so learning the entire language seems impractical, can anyone here offer me any help?
     
  2. Administrator emeritus

    xUKHCx

    Joined:
    Jan 15, 2006
    Location:
    The Kop
    #2
    Code:
    tell application "QuickTime Player"
    	pause front document
    end tell
    Code:
    tell application "QuickTime Player"
    	play front document
    end tell

    If you just want it to pause if for a little bit then you could add a delay in there

    Code:
    tell application "QuickTime Player"
    	pause front document
    	delay 2
    	play front document
    end tell
     

Share This Page