Apologies if ths is the wrong forum...
Hi folks...
Preamble...
I wanted to learn shell scripting so set about a text mode AudioScope.
During its evolution I wanted to add extra capture modes.
One such mode was/is QuickTime Player in hidden window mode...
This was and is being developed on a(n) MBP Pro 13 inch OSX 10.7.(x)(5)...
Well consider the code below, this works wonders on my MBP, BUT,......
......I purchased a new iMac with OSX 10.10.3 and this part is now broken.
I really don't understand why! ;o/
The code above is a function in bash and does exactly what is shown:-
1) Function 'QuickTime_Player' is called in the shell script using 'osascript'.
2) The QuickTime icon appears on the dock.
3) 'Audio Recording' mode is asked for.
4) The user window is hidden.
5) A delay to allow the QT application to settle.
6) Start a recording......
7) ......to last for 1.5 seconds.
8) AUTO SAVE THE FILE INTO THE DEFAULT DITECTORY AS "Audio Recording.aifc".
9) A save animation appears for about 1 second.
10) Stop the recording.
11) Quit QuickTime.
12) QuickTime icon disappears from the dock.
13) A 'wait' state added for fullness but is probably not required.
14) Exit the function back to the script to deocde the binary sample created.
For this to work QuickTime Player has the be run manually once to set recordings to '.aifc' extension and the default directory.
As quoted before this works perfectly on my MBP OSX 10.7.5 but hangs from part 8) onwards on the new iMac awaiting user intervention to set the filename and save.
The AppleScript version on this MBP is 2.2.1 on the new iMac is 2.4.
Other info, XCode IS installed on this MBP but the new iMac is virgin.
Finally using an install of SOX on the new iMac the AudioScope is fully functional so the default bash terminal and shell script are OK.
Any help pointing me in the right diretion would be most welcome...
TIA.
Bazza...
Hi folks...
Preamble...
I wanted to learn shell scripting so set about a text mode AudioScope.
During its evolution I wanted to add extra capture modes.
One such mode was/is QuickTime Player in hidden window mode...
This was and is being developed on a(n) MBP Pro 13 inch OSX 10.7.(x)(5)...
Well consider the code below, this works wonders on my MBP, BUT,......
......I purchased a new iMac with OSX 10.10.3 and this part is now broken.
I really don't understand why! ;o/
Code:
QuickTime_Player()
{
# Using Quicktime as the sampling source.
# This takes about 4 seconds per sample total...
osascript << AppleSampler
tell application "QuickTime Player"
set sample to (new audio recording)
set visible of front window to false
tell sample
delay 1.5
start
delay 1.5
stop
end tell
quit
end tell
AppleSampler
# Hold until Quicktime fully closes down...
wait
}
The code above is a function in bash and does exactly what is shown:-
1) Function 'QuickTime_Player' is called in the shell script using 'osascript'.
2) The QuickTime icon appears on the dock.
3) 'Audio Recording' mode is asked for.
4) The user window is hidden.
5) A delay to allow the QT application to settle.
6) Start a recording......
7) ......to last for 1.5 seconds.
8) AUTO SAVE THE FILE INTO THE DEFAULT DITECTORY AS "Audio Recording.aifc".
9) A save animation appears for about 1 second.
10) Stop the recording.
11) Quit QuickTime.
12) QuickTime icon disappears from the dock.
13) A 'wait' state added for fullness but is probably not required.
14) Exit the function back to the script to deocde the binary sample created.
For this to work QuickTime Player has the be run manually once to set recordings to '.aifc' extension and the default directory.
As quoted before this works perfectly on my MBP OSX 10.7.5 but hangs from part 8) onwards on the new iMac awaiting user intervention to set the filename and save.
The AppleScript version on this MBP is 2.2.1 on the new iMac is 2.4.
Other info, XCode IS installed on this MBP but the new iMac is virgin.
Finally using an install of SOX on the new iMac the AudioScope is fully functional so the default bash terminal and shell script are OK.
Any help pointing me in the right diretion would be most welcome...
TIA.
Bazza...