I have a proprietary software that I use to download some confidential data from the internet, this software is the only way to access that data.
The software opens up with a screen and then I have to click on "download" and the download commences. I would like to download this data late-night (say 0200 Hrs) every night. The downside was that I had to sit in front of the laptop to "click" on the download button.
So, I wrote an AutoIt script to open the software, wait for 30 seconds so that the software finishes the initialisation routine and then "go to" a certain location (co-ordinates) on the screen and execute a "mouseclick()". I then created a "scheduled task" using windows task scheduler to run this autoit executable at 0200 Hrs. Every thing works fine, as expected.
Autoit executable runs well when the user is "active". But if the user is "locked" (i.e. lock screen) then it is stuck in "WinActivate()" waiting for the user to become "Active" and resumes from there on after the user becomes "active". This means the laptop has to be in unlocked mode overnight which is not advisable for security reasons. I then found out that I could use "ControlClick()" to do the same when the screen is locked.
My problem now is that when I use AutoIt Window Info tool, it does not show the CLASS or any info related to download button when I hover over the download button. So, may be the screen is a flash screen or something else that was intentionally made to make sure that button CLASS was not seen!
An option would be to take a screenshot, find the location and then send the coords to Mouseclick() but that could easily get way more complicated considering different screen resolution on different machines (in case this gets ported to another machine etc etc)
Any suggestions and solutions?