AppleScript Help

Discussion in 'Mac Apps and Mac App Store' started by musicpyrite, Aug 11, 2004.

  1. musicpyrite macrumors 68000

    musicpyrite

    Joined:
    Jan 6, 2004
    Location:
    Cape Cod
    #1
    Well, my fathers birthday is just a few days away, and I think I want to play a joke on him. :D

    What I want to do is write an AppleScript that will use the terminal and the 'say' command to randomly say different phrases at different times.

    Don't worry, I'm not trying to do anything malicious, I just want the computer to randomly speak "ARE YOU DONE YET!!" and a few other things.

    I've got the AppleScript all written up, and finalized, and I added it to the startup menu, so the program will automatically run when he logs in.

    The problem is that when the Script runs, the AppleScript appears in the Dock, spoiling all the fun. :( :mad:


    So what I want to ask is there any way that I can keep the icon from appearing in the Dock?
     
  2. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #2
    How about adding AppleScript to the dock permanently for some BS reason today or tomorrow, and having it started for some reason. Then, when your script runs, it won't be as obvious; you could even have it start as a start-up app in System Preferences...->Accounts->your dad->Startup Items.

    Not as cool as hiding it, but easier to do...

    Edit: just saw you already added it to Startup Items; how about altering the script to let it pause for a few minutes before running?
     
  3. musicpyrite thread starter macrumors 68000

    musicpyrite

    Joined:
    Jan 6, 2004
    Location:
    Cape Cod
    #3
    Thanks for the advise, but the second I put something on my fathers dock (pun not intended for those of you with dirty minds) he will immeaditly notice it, and try to drags it off.

    What about a 3rd party application that will allow me to toggle things on and off of the dock?
     
  4. musicpyrite thread starter macrumors 68000

    musicpyrite

    Joined:
    Jan 6, 2004
    Location:
    Cape Cod
  5. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #5
    Well, there are a couple more possibilities that come to mind.

    (1) Remove something from his dock that he rarely uses (temporary removal, of course), change AppleScript's icon to that app's icon (also temporarily, of course), put it (AS) in the dock in the same spot, and have it start up at login. Might not be noticeable.

    (2) Take your AppleScript calls to the shell to say stuff and turn them into a shell script, then use cron to run them when he's likely to be logged in. More effort, less visible.
     
  6. emw macrumors G4

    emw

    Joined:
    Aug 2, 2004
    #6
    Check this out:

    http://www.macupdate.com/info.php/id/12516

    It theoretically lets you hide running apps from showing in the dock. Haven't tried it, so can't attest to it's stability, though...
     

Share This Page