Nub AppleScript Option

Discussion in 'Mac Programming' started by pismobrat, Apr 17, 2008.

  1. pismobrat macrumors regular

    Aug 13, 2007
    Hi All,

    This is a nub Applescript question.

    I want to open my time tracking software every time I open a file that is associated with pro-tools. I don’t need data entered or anything. I just need it triggered so that I can’t forget. Should be simple, but I didn’t spend much time on it and I don’t know automator that well at all.

    Thanks for any help.
  2. numero macrumors regular

    Jul 23, 2002
    I don't think this is an AppleScript problem.

    If I understand what you are trying to do:
    You double-click a pro-tools document.
    Pro-tools launches.
    Open time tracking software.

    Here's the issue. Applescript can be used to drive an application. It can't be used in a passive mode. It can't detect that an application has been opened.

    My suggestion is that you will need something running that is monitoring all running processes. When it sees Pro-tools in the list then it will launch your time tracker. I would suggest a shell script run by launchd (so you won't have to have the terminal open). The shell script could make an AppleScript call to get your time tracker launched.

    You'll need:
    1) A launchd plist file that is set to run the shell script upon login.
    2) The shell script that will monitor processes and run your time tracker at the appropriate time.


Share This Page