I just wrote this little script to play a prank on my brother.
It's kinda wicked, so beware - I take no responsibility for any damage caused to your relatives, friends or anyone else...
My bro was sitting on the laptop downstairs, so I needed something I could remotely control through the network - which left me with a file as trigger, as that's the only thing I can really control on the other end of the network.
The following script continually checks whether the trigger file exists, and if it does, it starts the "shocking procedure". This basically imitates the various internet pranks of this kind; a flashing
image accompanied by a scary
sound.
Again, this is nothing for edgy, jittery people, as they might actually get a heart attack. So be careful and, please, don't abuse it!
Code:
/*
ToDo:
- change image and/or sound with each iteration
- option to un-mute (potentially harmful?)
*/
#SingleInstance Force
#Persistent
#NoTrayIcon
OnExit, quit
shockImage = shock.jpg ; http://www.davidbyrne.com/journal/images/2005/06_20_05_a_chimeras.jpg
shockSound = shock.wav ; http://medialab.it.fht-esslingen.de/ftp/multimedia-files/sound/Effekte/Verschiedene/SCREAM.WAV
shockTrigger = shock.txt
startDelay = 60000 ; 60 seconds
flashDelay = 250 ; 0.25 seconds
checkDelay = 10000 ; 10 seconds
flashCount = 3 ; flash 3 times
maxVolume = 100 ; 100%
; include trigger and media files in the compiled script
FileInstall, shock.txt, %shockTrigger%.inactive
FileInstall, shock.jpg, %shockImage%
FileInstall, shock.wav, %shockSound%
; wait before starting the procedure
Sleep, %startDelay%
; continuously check the trigger
SetTimer, checkTrigger, %checkDelay%
; end of auto-execute section
Return
; check for trigger
checkTrigger:
IfExist, %shockTrigger%
{
; stop checking for trigger
setTimer, checkTrigger, off
; activate shocking procedure
GoSub, shock
}
Return
; activate shocking procedure
shock:
; backup volume
SoundGet, volumeBackup
; set max. volume
SoundSet, %maxVolume%
; flash an image and play an accompanying sound
Loop, %flashCount%
{
SplashImage, %shockImage%, B
SoundPlay, %shockSound%
Sleep, %flashDelay%
SplashImage, off
}
; terminate script
GoSub, quit
Return
; terminate script
quit:
; restore volume
SoundSet, %volumeBackup%
; terminate script
ExitApp
Return
updated 2006-03-06