mirrorshard: (Default)
[personal profile] mirrorshard
This is partly just as a note to myself so I remember what I did.

The problem is that I keep forgetting what day and/or date it is, so I wanted a program that would provide a better clock display than the built-in one, ie. one that showed the correct day and date without my having to go look for it. Ideally, of course, I want it to be a proper updating clock, but a cron job that pops up a window saying 'Today is Saturday the 5th of February' for me to see when I got up in the morning would do just fine too, and require less immediate programming.

(Note that I have never done any Windows programming, and would really rather have kept it that way.) ActivePerl, however, beckoned, so I downloaded it and started playing with Tk. In short order, I had a script that popped up a window displaying the date & time. Took me ages, however, to find out how to stop it needing a DOS shell behind it. On Unix, of course, it's purely simple, you just use scriptname & and it forks off a process. It seems to be something basic in Windows, though, which thinks "Aha! Command line program, I shall helpfully provide a command line shell and if said command line shell is destroyed I shall destroy the program we wanted in the first place too!"

The answer, apparently - found as so many good things are via Usenet, in this case the archives of comp.lang.perl.tk - is to fool Windows into thinking it's a GUI program. Which is accomplished by running it from wperl.exe rather than perl.exe, it seems. Reassociate the file extension yet again...

However, does Windows do cron? Apparently not natively, and not in any useful sense. I picked up a Perl module going by the name of CRONw, which claims to be a "Windows service", whatever that means in practical terms. However, it didn't work. At all. Well, actually, it did spawn the process and leave it running, it just didn't point the window at the desktop, and happily pretended everything was fine. Couldn't find a way to fix that, so I lost my temper and deleted it with extreme prejudice. Let's see what happens the next time I try to find a way to do this.

Date: 2006-02-05 06:46 pm (UTC)
bob: (Default)
From: [personal profile] bob
doesnt scheduled tasks do that sort of thing.

also i would susggest installing cygwin so you can just have a linux like environtment anyway. if you cant bear to just go thre whole hog and uninstall windows.
although persoanlly i fond it quite liberating. you dont miss anything.

Date: 2006-02-05 07:05 pm (UTC)
From: [identity profile] mirrorshard.livejournal.com
Scheduled tasks claims to, but it didn't when I tested it just now. It did say something about possibly not working if I didn't use a password for my user account, though.

Cygwin, hm...

Date: 2006-02-06 09:51 pm (UTC)
From: [identity profile] tiquetoque.livejournal.com
I miss age of (empires|mythology) :(

I used to miss MSN Messenger, but the latest amsn kicks ass.

atm I boot into windows maybe once a month/six weeks to get my aom fix, although I popped in today to do a PDF slideshow in Acrobat. Prolly could've done it in linux, but I'd to do it on a projector at short notice, and couldn't have been bothered figuring it out in front of a roomful of people.

Page Summary

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags