I want to be able to use my G4 to record a radio program every day. I can feed the radio into the computer with no problems, and I’ve got a simple program called “quickvoice” which simply records and plays back in aiff.
I know how to write a script to boot up the computer every day at, let’s say 1:00pm, and begin recording. But how can I tell it to stop recording at, let’s say, 3:00pm?
If you know a little unix (I know a little) you could set up a cron job to run an applescript at the same time every day - google “cron”. Is quickvoice applescriptable? If not you will have to use a GUI script.
I use the scriptable Audio Recorder. The download comes with sample scripts. This also has the benefit of recording directly to MP3. As to launching the script at a specified time, there are countless ways to do this (Cron, etc.) and you can find a bevy of solutions by searching the forum.
Rob, we gave you the answer. Run the STOP (we heard you!) script at 3:00 using Cron or some other utility or simply put a delay or idle in your script that checks the time from when it was launched until 2 hours have elapsed and then quit. I don’t have the app in question but I thought if you were smart enough to figure out how to get it to START recording you’d be able to figure out how to get it to STOP recording. GET IT?
Jonn8,
No need to get obnoxious. I have no experience with cron, so forgive me if I didn’t pick up on the fact that I was already given an answer in some sort of secret cron-code that I’m not “smart enough” to understand.
I came here for help because I didn’t know how to do something. Knowing how to do something isn’t the same as being smart.
My post was a direct reply to what I perceived as your obnoxious tone–after I (and another) had already offered help out of the goodness of our hearts, you replied in all caps is if we were too stupid to understand your trivial problem. You didn’t even start with a show of gratitude that two complete strangers offered help with no ulterior motive, even if you were too thick to understand the help. Wow, if
is what you deem “coded” text, you’ve got some real problems. rhostik seems to have understood and searched the forum, and, lo and behold, the answer was there!
clearly mentions starting, not stopping, a script. I don’t need help starting. But, I’d like to say thank you for everyone who answered my post with helpful links and suggestions.
I was not being obnoxious. I was merely making it clear what my problem was. This is text, not voice. You can’t see my face or my body language. I did the best I could to convey what words I wanted to stress.
If, for example, I went into Radio Shack and asked the guy, “How do I transfer audio from a radio to a computer?” and the guy responded, “You can transfer audio from a computer to a radio by using an RU-X97 port.” I would then say, “No, I need to transfer audio from the RADIO to the COMPUTER, not the other way around.” I would stress those words to convey the miscommunication I perceived. This is all I was doing. I don’t think the Radio Shack guy would think me rude for not thanking him after giving me a non-helpful answer. I don’t feel anger or resentment to the other posters, I just didn’t find their cron answers useful to me. I’m sure someone with more experience or drive could scour the web and figure it out. I was hoping someone could give me a quick, simple answer involving Applescript. Clearly I was wrong. This is a failure on my own part, as I’m too lazy to pursue the correct path. Now go focus your angry energy somewhere useful, like towards the removal of George Bush as president.
I agree with you on GWB–we do need to get him out of Washington. As to the issue at hand, there is a central misunderstanding (which I’ll get to in a moment) but as to the “netiquette” issue, all caps implies yelling. This board allows you to use bold, italics, or underline to stress words. I actually prefer using underscores as a way to stress a word.
As to the misunderstanding, what we were proposing is that you have one script that starts the recording and then the script itself will end. At another specified time, using cron, Cronnix, Script Timer, iDo Script Scheduler, xControl, or any of several other methods, launch a second script that would simply tell the app to stop recording. When we said start the script, that’s what we meant, not start recording but starting a script that stops the recording:
--pseudo start script which runs and quits
tell app "quickvoice" to start recording
--pseudo end script which runs and quits
tell app "quickvoice" to stop recording
Both of these scripts can be scheduled to run with a 2-hour interval between them using any of the methods listed above or by using the methods I originally mentioned of using delays or an idle block within a single script. If you want more information about that, search the board.
Now that the problem has been completely solved, here’s yet another approach. Abrosia Software’s free “WireTap” application does what “qucikvoice” does (records to aiff files from the audio out channel of your mac) comes with a number of apple scripts one is called Timed Recording. This is the coder’s description of it:
– Delayed WireTap Recording: this script was made by Simone Manganelli
– for Ambrosia Software, Inc. for their audio recording application
– WireTap.
– What this script does is simple: it waits for a specified time, tells
– WireTap to start recording, and then tells WireTap to stop
– recording when the specified stop time has been reached.
The app is fine but the timed script needs modification:
Replace the “delay” statement with
do shell script ("sleep " & startTimeDifference)
in
set start_time to (date "zaterdag, 26 juni 2004 14:52:00")
set stop_time to (date "zaterdag, 26 juni 2004 14:52:05")
set AppleScript's text item delimiters to {" "}
set startTimeDifference to (start_time - (current date))
if startTimeDifference is greater than 0 then delay startTimeDifference
tell application "WireTap"
start recording
end tell
set stopTimeDifference to (stop_time - (current date))
if stopTimeDifference is greater than 0 then delay stopTimeDifference
tell application "WireTap"
stop recording
end tell
unless you want to bog down your system (or fry an :P-egg on your PowerBook)