Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Im trying to create a program in TK, which minimises to the system tray when its closed, and then pops up a form at regular intervals.

I have found out about the activestate perltray thing, however it isnt very useful because it cant run my code in specific time intervals (using sleep), continually (ina for loop with condition $i > $i+1) and still have a menu pop up. It also doesnt run straight away, i have to right click to initiate the loop, and the last problem with it being that it seems to have another window open on my taskbar, which i cant work out!

So i was wondering if there was an alternate method to make it run in the background, as i want (specific intervals repeatedly) but have a tray icon open as well (no doubt i could actuall yuse perltray for this anyhow, if the loop part is sepearte!).

Hope ive been understood! Thank you!

Replies are listed 'Best First'.
Re: Regular popup in Tk
by BUU (Prior) on Mar 16, 2004 at 23:55 UTC
    From what you've described, I would think two programs or one that forks. The main program can fork a subprocess that sits in the systray and responds to clicks, the main process can then minimize itself (however, perhaps an invisible main window) and then do whatever it needs to in the background.
Re: Regular popup in Tk
by esskar (Deacon) on Mar 17, 2004 at 01:51 UTC
    it is always helpful to us to tell us what modules you are using when you have problems with them...
    "activestate perltray thing" is not enought