How to make this automator action?
June 30, 2006 7:16 PM
Subscribe
Tearing my hair out over automator and applescript.
I'm trying to create an action that will change my desktop background: display photos of morning scenes in the morning, evening scenes in the evening, day scenes in the day, etc.
I've glue-sticked together an applescript that will find out the time and and put it in a variable as one of three words: morning, day, evening and night.
set TheDate to current date
set theDateText to TheDate as text
set theTime to time of TheDate
set theHour to theTime div 3600
if theHour > 6 and theHour < 11 then set thename to morning end if if thehour> 10 and theHour < 19 then set thename to day end if if thehour> 18 and theHour < 23 then set thename to evening end if if thehour> 22 then
set theName to "night"
end if
if theHour < 7 then set thename to night end if/code>>>>>
But I can't for the life of me figure out how to get that variable into the next automator step, even though I have folders in ~/Backgrounds named "morning" "day" "evening" and "night" full of flickr images ready and waiting the be fetched randomly and plugged into automator's built-in "set as desktop background" step. I can get "day" (or "evening" or whatever) to get entered into spotlight, but that doesn't do much good.
(It would be even cooler if someone knew of a way to pull the photos straight from flickr, but that sounds hard. I am, it should be obvious at this point, not a programmer at heart.)
posted by Tlogmer to computers & internet (8 comments total)
posted by Tlogmer at 7:19 PM on June 30, 2006