[Tutor] How to open IE7 to a certain URL?
Chris Fuller
cfuller at thinkingplanet.net
Sat Mar 1 01:11:14 CET 2008
On Friday 29 February 2008 12:24, Dick Moores wrote:
> http://www.kuow.org/real.ram .
Try this to start, then turn into a service with FireDaemon,
http://www.firedaemon.com/. You'll need to fill in the quit() function, and
the particulars for your media player.
from time import mktime, strftime, strptime, localtime, time, sleep
# return true if the program should exit
def quit():
pass
import subprocess
def launch():
args = ( 'c:\\pathto\\cmd', 'http://www.kuow.org/real.ram' )
subprocess.call(args)
# get the seconds since epoch of midnight, add the desired time of day,
# and convert back into seconds since epoch. We'll wake up just a bit
# early, so we can use a coarser timer.
event_time = mktime(strptime(strftime('%Y%m%d',
localtime(time()))+'19:59:40','%Y%m%d%H:%M:%S'))
while True:
while time()<event_time and not quit():
sleep(5)
if quit():
break
launch()
Cheers
More information about the Tutor
mailing list