Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

wisecracker

macrumors newbie
Original poster
Sep 24, 2012
18
0
In front of my computer.
For a few years now I have been developing a bash script that is a calibrated text mode AudioScope.

A guy on here, 'kryten2', if he still on here, helped solve auto recording as a capture for OSX 10.7.5.
The original function in my script that works fine is here:-
Code:
# #########################################################
# This is purely for a(n) MBP 13 inch, OSX 10.7.x.
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
}
This works perfectly in OSX 10.7.x but is now broken in Yosemite amd El Capitan.
I have no idea if it broke in OSX 10.8.x or 10.9.x, but I do know it is broken in OSX 10.10.x and 10.11.x.
I have searched the WWW for another solution but none have worked.
How it works...
The bash function is called then...
The applescript code above...
1) Initiates QTP.
2) Prepares for a sample.
3) Has a delay to allow QTP to settle, to prevent falsing.
4) Does a 1.5 second recording.
5) Stops the sample and autosaves to disk.
6) Then effectively exits.
All as transparently as possible.
The bash 'wait' command is not really necessary but added as a safeguard.
I have tried many perms and combos for the current OS but it always halts waiting for user input to save the file.
Works on MacBook Pro, circa August 2012, OSX 10.7.5, and fails on my iMac, cicra April 2015, now on OSX 10.11.5. Everything else in the shell script works.
Any help would be welcome.
(If you want to see the shell script it is 175KB in size and I will post as a text file on another thread.)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.