if you want, you can replace the begin and end with { and }, ruby
understands both. Also, the code you're seeing here is mostly COM
methods from iTunes. ruby method names underscored.
On 5/29/07, Loathe <[EMAIL PROTECTED]> wrote:
> I like C syntax languages.
>
> Javascript, C#, Java, CFScript and so on.
>
> Personal taste I guess.
>
> I wouldn't say it looks like javascript in the least though.
>
> -----Original Message-----
> From: Zaphod Beeblebrox [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 29, 2007 2:57 PM
> To: CF-Community
> Subject: Re: Scheduling iTunes
>
> hmmm....I've always considered it more javascript-esque than anything
> else. Not a lot of useless stuff in there like all the generated vb
> code that you can't touch for fear of your app no longer working.
>
> now, vbscript, that's another animal, but considering it seems based
> on javascript...well...here we go in a circle.
>
> What would you consider to be a "not ugly" language.
>
>
> On 5/29/07, Loathe <[EMAIL PROTECTED]> wrote:
> > Ruby is pretty damned ugly. Looks like VB.
> >
> > -----Original Message-----
> > From: Zaphod Beeblebrox [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, May 29, 2007 1:30 PM
> > To: CF-Community
> > Subject: Re: Scheduling iTunes
> >
> > just in case you're interested. I wrote a ruby script to start itunes
> > download the podcasts and close. I got my inspiration (read code
> > plagiarism) from a couple of different sites doing it in a couple
> > different languages.
> >
> >
> >
> > require 'win32ole'
> >
> > TIMEOUT = 120 #run for a total of 120 minutes before forcing a shutdown.
> > BUSYPATH = ENV['homedrive'] + ENV['homepath'] + '\\My Documents\\My
> > Music\\iTunes\\iTunes Music\\Downloads\\Podcasts'
> >
> > iTunes = WIN32OLE.new('iTunes.Application')
> >
> > begin
> > puts 'iTunes Started'
> > timeout = Time.now + (TIMEOUT * 60)
> >
> > puts 'forcing update of podcast feeds'
> > iTunes.UpdatePodcastFeeds
> >
> > sleep(30)
> >
> > while Time.now < timeout && File.exists?(BUSYPATH)
> > puts 'still downloading stuff'
> > sleep(60)
> > end
> >
> > puts 'forcing a shutdown do to timeout' unless Time.now < timeout
> >
> > puts 'quitting iTunes'
> > sleep(30)
> >
> > iTunes.quit
> > iTunes = nil
> >
> > end unless iTunes.nil?
> >
> >
> > On 5/29/07, Marlon Moyer <[EMAIL PROTECTED]> wrote:
> > > I guess iTunes doesn't like to listen to the scheduler. iTunes will
> > > open on command, but it won't close. Damnable software!
> > >
> > > On 5/29/07, Nick McClure <[EMAIL PROTECTED]> wrote:
> > > > In the task scheduler you can tell it to end the task after a certain
> > amount
> > > > of time if it is still running
> > > >
> > > > > -----Original Message-----
> > > > > From: Zaphod Beeblebrox [mailto:[EMAIL PROTECTED]
> > > > > Sent: Tuesday, May 29, 2007 9:19 AM
> > > > > To: CF-Community
> > > > > Subject: Scheduling iTunes
> > > > >
> > > > > I use iTunes to do all of my music management and podcast downloading.
> > > > > It irritates me that I cannot schedule iTunes to download only in off
> > > > > peak times since my internet connection basically sucks. I'd like to
> > > > > set up something where I can start iTunes around 2am and have it run
> > > > > for a couple of hours downloading the latest podcasts and then
> > > > > automatically close. I figure I can use the built in windows
> > > > > scheduler to do the start up, but I don't think it'll be useful for
> > > > > the closing. Any suggestions?
> > > > >
> > > > >
> > > >
> > > >
> >
> >
> >
> >
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ
Archive:
http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:235770
Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5