User Name
Password
AppleNova Forums » General Discussion »

Halloween Sounds!


Register Members List Calendar Search FAQ Posting Guidelines
Halloween Sounds!
Thread Tools
Gargoyle
http://ga.rgoyle.com
 
Join Date: May 2004
Location: In your dock hiding behind your finder icon!
 
2005-10-29, 17:50

Since Halloween is on Monday, and any having a party would probably have it tonight, this might be a little late - but what the hell.

I decided it would be cool to have some "scary" sounds play at a small Halloween party I had tonight. As usual I hooked up my PB to the stereo to play the music, but then I created an AppleScript to play a scary sound effect over the top of the music every 10 mins.

The wav files I found, and the AppleScript are available from my blog.

Update: I have fixed the script. If you open it in script editor, make your required changes and then save as an Application, it works very well and responds to a normal quit within a second.

Enjoy.

OK, I have given up keeping this sig up to date. Lets just say I'm the guy that installs every latest version as soon as its available!

Last edited by Gargoyle : 2005-10-30 at 04:31.
  quote
Mac+
9" monochrome
 
Join Date: May 2004
Location: 🇦🇺
 
2005-10-29, 20:04

Gargoyle - thanks for this.

Nice collection of sounds ... and now I can learn about AppleScript too.

I have an error though - can you help?
Code:
play movie 1 "QuickTime Player got an error: movie 1 doesn't understand the play message."
10.3.9 with QTP 6.5.2

TIA.
  quote
Gargoyle
http://ga.rgoyle.com
 
Join Date: May 2004
Location: In your dock hiding behind your finder icon!
 
2005-10-30, 03:55

Mac+, that got me for a while. 1st make sure you use the HFS type of file path eg.
Code:
Macintosh HD:Users:paul:music
Not the UNIX style that is becoming more common...
Code:
/Users/paul/music
AppleScript does not like the second type.

For the play command, Quicktime Player does not understand it, the open movie does. You tell QT to open the movie, then tell the movie to play. eg
Code:
tell application "Quicktime Player" launch activate open "Macintosh HD:Users:paul:Music:Halloween:bell.wav" tell movie 1 play end tell end tell
Hope this helps.

OK, I have given up keeping this sig up to date. Lets just say I'm the guy that installs every latest version as soon as its available!

Last edited by Gargoyle : 2005-10-30 at 04:30.
  quote
Gargoyle
http://ga.rgoyle.com
 
Join Date: May 2004
Location: In your dock hiding behind your finder icon!
 
2005-10-30, 04:59

I fixed the script, it runs much better and well behaved now. You should get version 1.1
  quote
Mac+
9" monochrome
 
Join Date: May 2004
Location: 🇦🇺
 
2005-10-30, 07:14

Gargoyle - no more "magic numbers" ... nice.

How did you get version 1 to work in the first place then? Why would yours work and mine not?

As for the correct path and syntax, I set them correctly. I have left them on my desktop currently. (All things reside there until I can get them to work and then they are moved to the appropriate locations.)

However, still getting this:
Code:
play movie 1 "QuickTime Player got an error: movie 1 doesn't understand the play message."
This is from your 1.1 version.

Also in the wait method what does "delay 1" do?

Cheers.
  quote
Gargoyle
http://ga.rgoyle.com
 
Join Date: May 2004
Location: In your dock hiding behind your finder icon!
 
2005-10-30, 08:19

Do you have QT Pro? I took a lot of code from the examples on the Apple website. All these examples did a check for QT Pro but I assumed that was because they were building movies on the fly, adding tracks etc.

http://www.apple.com/applescript/quicktime/

The "delay 1" causes the program to wait for 1 second. I was originally calling the system sleep function for the time I wanted to wait, but this made the script very unresponsive as it would not accept commands while it was "sleeping". The fact that I check the loop and wait for 1 second at a time is a very good compromise between cpu usage and responsiveness.

OK, I have given up keeping this sig up to date. Lets just say I'm the guy that installs every latest version as soon as its available!
  quote
Mac+
9" monochrome
 
Join Date: May 2004
Location: 🇦🇺
 
2005-10-30, 08:39

Yes, I have QTPro 6.5.2 on 10.3.9.

Do you run it on your system without a problem? That's odd then.

I'll shut down and reboot - just in case something is playing up.
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Post Reply

Forum Jump
Thread Tools
Similar Threads
Thread Thread Starter Forum Replies Last Post
my new iPod nano headset sounds awful! LAmezq3984 Genius Bar 2 2005-09-10 22:22
Alert Sounds Yochanan Genius Bar 5 2005-06-18 13:37
Rev. C iMac making popping sounds fahlman Genius Bar 9 2004-07-07 20:06


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 14:44.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova