Aotomator Task

Discussion in 'Mac Programming' started by lesmith, Jun 25, 2010.

  1. lesmith macrumors newbie

    Joined:
    Mar 15, 2010
    #1
    Hey All

    Hope someone can point me in the right direction with this.

    I would like to take a series of print screens at x seconds apart when a particular application is open.

    Can this sort of thing be done with Automator ?

    If so how can this be achieved ?

    Really hope someone can point me into the right direction.

    Thank you if you can
     
  2. ccamelot macrumors member

    ccamelot

    Joined:
    Feb 21, 2010
    Location:
    Poland
    #2
    --

    Hi, I don't think so it can be doable by Automator. Looks possible with applescript. You can detect open apps:
    Code:
    tell application "System Events" to set open_applications to (get name of every application process)
    or you can check only if one app is running:

    Code:
    tell application "System Events" to set ical_opened to (name of processes) contains "iCal"
    and then (if desired app is opened) do screenshot using:

    Code:
    set picPath to ((POSIX path of (path to desktop)) & "YourScreenshot.png") as string
    do shell script "screencapture " & quoted form of picPath
    Les
     

Share This Page