I used to have a halloween Applescript for Mac OS 9 that would record sounds and then play them back at a short random time delay. It only repeated the sounds for a few minutes and then it would dump them.
It freaked people out because they didn’t know when it was recorded sound or live. It was a fun effect for use at my front door on the trick-or treaters while they waited for me to answer the doorbell.
It was a simple little Applescript but I can’t find it. If anyone can direct me to it or something similar, I’d appreciate it.
I’ve searched around the internet and my end result is this:
first of all download the app from this site: http://microcosmsoftware.com/
this applescript should do it:
set ChangeFileCount to random number from 900 to 1800
set myCount to 1
on idle
if changefilecount/mycount is 1 then
set ChangeFileCount to random number from 900 to 1800
set myCount to 1
tell application "Finder"
set myPath to ((name of startup disk) & ":System:Library:Sounds:") as string
set mySounds to every file of folder myPath
end tell
set myRandomFile to ((item (random number from 1 to (count mySounds)) of mySounds) as alias) as string
end if
set RepeatPlayFile to random number from 10 to 15
tell application "Play Sound" to play myRandomFile repeat 1
set myCount to myCOunt + 1
return RepeatPlayFile
end idle
don’t forget to save as a stay-open application
Hope it works,
ief2
PS.: I’m sorry for my English. I know I sometimes make some rubbish sentences, but I ask you to forgive me. I’m only 14 years old and I come from Belgium, so I speak dutch. If you don’t understand me, don’t hesitate to give a reply on that.
EDIT:
Script wouldn’t work, this does:
global ChangeFileCount
global myCount
global myRandomFile
tell application "Finder"
set myPath to ((name of startup disk) & ":System:Library:Sounds:") as string
set mySounds to every file of folder myPath
end tell
set myRandomFile to ((item (random number from 1 to (count mySounds)) of mySounds) as alias) as string
set ChangeFileCount to random number from 900 to 1800
set myCount to 1
on idle
if ChangeFileCount / myCount is 1 then
set ChangeFileCount to random number from 900 to 1800
set myCount to 1
tell application "Finder"
set myPath to ((name of startup disk) & ":System:Library:Sounds:") as string
set mySounds to every file of folder myPath
end tell
set myRandomFile to ((item (random number from 1 to (count mySounds)) of mySounds) as alias) as string
end if
set RepeatPlayFile to random number from 10 to 15
tell application "Play Sound" to play myRandomFile repeat 1
set myCount to myCount + 1
return RepeatPlayFile
end idle