Your skill will accomplish what the force of many cannot |
|
PerlMonks |
How to get handle of a window on desktop (this window is not created by perl code)by ppp (Acolyte) |
on Jan 13, 2015 at 05:43 UTC ( [id://1113040]=perlquestion: print w/replies, xml ) | Need Help?? |
ppp has asked for the wisdom of the Perl Monks concerning the following question: I am perl beginner and installed successfully Tk module for GUI. I wanna write a script which must click at any particular location on Desktop window (please note that i am not creating any new window ,i have some existing window on desktop (not created by Perl program) and that alwyays pop at the center of Desktop). I wanna click on a button on that desktop window after every 30 minutes. So i am trying to write a script for : (1) Either obtaining handle of a window which is not created by perl's code (and not at all related to perl, it is obatined by inserting dongle in USB port which contains a button that i wanna click by perl script after every 30 mins). (2) Or to find any way to click at the desktop at any position(because my that window launches always at same position so if i click at any particular position after in 30 mins through my script then it should work). Any help in achieving my task ?I have found GetDesktopWindow() but the problem is what if i loose focus of the window which i have to click ? and how to recognize which window will be in focus. Is there any way to keep that window in focus ? (I mean i have seen in taskmanager that the window to be clicked is running by the name "App.exe") . Is this information not enough to keep in focus the window obtained by "App.exe".
Back to
Seekers of Perl Wisdom
|
|