Delay Command for Terminal?

Discussion in 'Mac Apps and Mac App Store' started by domenator, May 4, 2009.

  1. domenator macrumors newbie

    Apr 10, 2008
    Hi all, so, I've been pranking my brother by SSH-ing into his computer and making the mac talk to him using:
    osascript -e 'say "Hello Chris I am watching you!" using "Cellos"'
    it totally freaks him out, only problem is he is getting wise to me and is certain that I always happen to be at my computer when this happens to him. What I'm asking is there any command that I'm missing that puts a delay on this script, i.e. entering this script with a delay command and having it launch 5 minutes later where I can be happily watching TV? I appreciate any and all feedback.
  2. robbieduncan Moderator emeritus


    Jul 24, 2002
  3. domenator thread starter macrumors newbie

    Apr 10, 2008
    Thank you very much. I was using the delay command that is found in the pure applescript rather than the sleep for terminal. I have already implemented and lol'd quite a bit as my brother goes "oh wow sorry dude, I didn't mean to blame you"
  4. Beerfloat macrumors regular


    Feb 21, 2009
    Just schedule the script to run at certain times with crontab

    You could even be asleep ;)
  5. cotdh macrumors newbie

    May 6, 2009
    You should do:

    osascript -e "tell application \"SystemUIServer\"" -e "tell application \"System Events\" to set x to name of startup disk" -e "display dialog \"Are you sure you want to format drive \" & x & \"?\" buttons {\"Yes\",\"Ok\"} default button 2 with icon caution" -e "end tell"

    while you're at it. :)

Share This Page