HELP! Need help pranking someone :)

Discussion in 'Community Discussion' started by RBPierce, Apr 1, 2011.

  1. RBPierce macrumors newbie

    Joined:
    Apr 1, 2011
    #1
    Hey guys. I have an idea for a prank- I'd like to tie the console "say" command to a keypress event, so that whenever someone types the Enter key, the mac says "Access denied!"

    I tried playing around with Applescript, but couldn't make any progress on it. Any ideas?
     
  2. RBPierce thread starter macrumors newbie

    Joined:
    Apr 1, 2011
    #2
    Applescript:

    set countdown to 60
    set delaySecs to 5
    repeat countdown times

    say "You have a virus" using "Cellos"
    # say "You have a virus" using "Whisper"
    # say "You have a virus" using "Good News"

    set msg to "Your computer hard drive will be deleted " & countdown & " seconds"
    display dialog msg buttons "Ok" with icon caution giving up after delaySecs
    set countdown to countdown - delaySecs
    if countdown ≤ 0 then exit repeat
    end repeat

    display dialog "Macs do not get viruses"



    Tied it to a key with Spark :)
     

Share This Page