|
|
#1 |
|
Prospect
Join Date: Feb 2012
Posts: 3
|
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
|
|
|
|
|
|
#2 |
|
Prospect
Join Date: Feb 2012
Posts: 3
|
Re: AppleScript and QuickTime
I am using Snow Leopard (10.6.8)
|
|
|
|
|
|
#3 |
|
Hall of Famer
Join Date: Dec 2007
Posts: 3,642
|
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?
|
|
|
|
|
|
#4 |
|
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 ? |
|
|
|
|
|
#5 |
|
Hall of Famer
Join Date: Dec 2007
Posts: 3,642
|
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.
|
|
|
|
![]() |
| Tags |
| applescript, quicktme |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|