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

kdpyke

macrumors newbie
Original poster
Sep 12, 2012
3
0
Hi I think that what I need is pretty simple, but scripting it out may be very difficult. I'm pretty new to scripting in general, so I'm hoping someone can help me out.

I've been using automator to do some automatic video recording via QT. Getting the video to record is super easy, but handling the file afterward seems to be clunky and limited. Basically, I need a script that will generate a line of text to be used as a filename, contingent on what time and day of the week it currently is.

For example, if today is Friday between 6 and 7AM, I would like the result of the script to be "Waking up {day of week}, {current date} 6-7".

However if it is Tuesday between 1 and 2PM, I would like the result to be "Eating Lunch {day of week}, {current date} 1-2"

If I make a recording that is at an off time, where I haven't specified a time or event, I'd like the result to be "Unsorted video recording {day of week}, {current date}, {current hour:minute}".

Is this possible, and how difficult is it?
 

sero

macrumors member
Aug 28, 2008
91
14
It's not difficult. In bash check out date and conditionals (if,then,else).

Hi I think that what I need is pretty simple, but scripting it out may be very difficult. I'm pretty new to scripting in general, so I'm hoping someone can help me out.

I've been using automator to do some automatic video recording via QT. Getting the video to record is super easy, but handling the file afterward seems to be clunky and limited. Basically, I need a script that will generate a line of text to be used as a filename, contingent on what time and day of the week it currently is.

For example, if today is Friday between 6 and 7AM, I would like the result of the script to be "Waking up {day of week}, {current date} 6-7".

However if it is Tuesday between 1 and 2PM, I would like the result to be "Eating Lunch {day of week}, {current date} 1-2"

If I make a recording that is at an off time, where I haven't specified a time or event, I'd like the result to be "Unsorted video recording {day of week}, {current date}, {current hour:minute}".

Is this possible, and how difficult is it?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.