|Pathologically Eclectic Rubbish Lister|
I have created a scheduled task on Windows 7 which runs a Batch File at a specified interval.
This batch file in turn invokes a Perl Script. Inside the Perl Script, based on the result, I use Perl Tk to display a Popup Message which gives an Alert.
Now, while I am doing some other task on my machine, like Browsing Internet, the Browser Window will be the active window for instance. In between, the scheduled task runs and the popup Window is not displayed, instead it is minimized and displayed on the Task Bar.
Please note that I am using, htstart.exe from ntwind to avoid displaying the Console Window when the Scheduled task runs (otherwise, taskeng.exe shows up everytime the scheduled task runs).
In order to make my Perl Tk window as the active window, I am creating the window as shown below:
I have set the focus option so that this window becomes active.
Now, when the scheduled task runs, the only difference I observed after setting the focus option is that, the Tk Window appears in the Taskbar and it keeps blinking (probably because it is set as the active window now).
How do I make sure, that when it is displayed, it appears in the foreground and does not get minimized to the Task Bar?