Go Back   The macosxhints Forums > OS X Help Requests > AppleScript



Reply
 
Thread Tools Rate Thread Display Modes
Old 02-26-2012, 05:39 PM   #1
Hyperscripter
Prospect
 
Join Date: Feb 2012
Posts: 3
Jaguar QuickTime Volume Problem

I wrote this simple script to run a QuickTime movie and it works perfectly fine, except for the script line 'set audio volume to 1'. It does not change the volume at all, but also does not trigger an error. I tried '1.0' instead and still it wont change the volume for me. Any advise ? I am using QuickTime 10.

Code:
tell application "QuickTime Player"
	activate
	set fileToRun to (choose file with prompt "Select a movie file to open")
	open fileToRun
	tell document 1
		set defaultBoolean to button returned of (display alert "Default settings are:" message "Full Screen Mode: true" & return & 
			"Movie Volume: 1.00" & return & "Looping: true" & return & return & "Use defaults ?" buttons {"Play Movie"} default button 1 as informational)
		present
		set audio volume to 1
		set looping to true
		play
	end tell
end tell
Hyperscripter is offline   Reply With Quote
Old 02-26-2012, 05:44 PM   #2
Hyperscripter
Prospect
 
Join Date: Feb 2012
Posts: 3
Re: AppleScript and QuickTime

I am using Snow Leopard (10.6.8)
Hyperscripter is offline   Reply With Quote
Old 02-26-2012, 08:56 PM   #3
NaOH
Hall of Famer
 
Join Date: Dec 2007
Posts: 3,818
I tried the script under Lion and it seems to work fine, even if I set the scripted volume to a different number between 0 and 1. From what I saw, 1 is full volume and lesser numbers are percentages of full volume (e.g., 0.5 sets the volume to half of the QuickTime maximum). What are you seeing happen to the volume and how is it different from what you are expecting?
NaOH is offline   Reply With Quote
Old 02-27-2012, 06:44 AM   #4
Hyperscripter
Prospect
 
Join Date: Feb 2012
Posts: 3
Well, as I said, it works just fine otherwise and it doesn't give me an error. The only thing though, is that it has no effect on the volume setting, that is to say, the volume stays the same.

Any ideas on how to test for this. I tried testing it using a 'display dialog' and it gave me the number '1', so I'm not sure where to go with this. Maybe a 'try' block ?
Hyperscripter is offline   Reply With Quote
Old 03-01-2012, 09:59 PM   #5
NaOH
Hall of Famer
 
Join Date: Dec 2007
Posts: 3,818
My scripting skill are firmly mediocre, but are you saying that setting the volume in the script to 1 produces the same volume as if you set it to 0.5? There was certainly a difference when I tested, but I guess it's also possible there was some change between 10.6 and 10.7.
NaOH is offline   Reply With Quote
Reply

Tags
applescript, quicktme

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Forum Jump



All times are GMT -5. The time now is 01:12 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.