Jump to content

Mouse Click Witout Ne Active Window


Recommended Posts

hey ppl,

i am a complete noob here. learned abt AutoIt yesterday.

The problem.

I am in India and i login to my isp thru a client( a executable file).this client wen closed from the desktop minimises to the system tray.and its icon in the sys tray, wen right clicked gives a menu list of 7 items(important for tis problem is the "log in" item(, one of the menu items)).

i hav a 3mbps connection wit 1 gb limit +nite 11-6 as free dwnld period. now wen i start my dwnlds from 11pm nite, i get disconnected every 1gb( and sumtimes randomly i.e 650mb,700mb).i hav complained to the isp ppl but they dont listen.

so i need the script to right click on the icon in system tray and thn left click on the "log in" option and keep repeating tis every 10 mins while i sleep.

i went thru the command list, and found tat the click is done wit respect to a active window.in my case wen the mouse right clicks on the icon in the sys tray, none of the windows will be active. thn how do i make the left clik? and thn repeat tis every 10 mins?

Link to comment
Share on other sites

I am a newb too but some of the people here helped me, so I`ll try and help if I can.

Maybe your easiest answer is this. Download the editor (freeware) called SCITE. When it is installed go to its program folder and you`ll find a macro recorder which records anything you do with keyboard or mouse when you tell it to.

When your icon is in the tray, do what you want the program to (click or whatever on it) then stop recording and save the output as a .au3 file, say myfile.au3 - then all you need to do is run that file every ten minutes as you said.

You could edit the file to add a wait command that would wait for say nine minutes, then after the wait command tell it to go back to the start.

Hope it`s some help.

Link to comment
Share on other sites

First i would get the title name of the window that is minimized and use WinActivate()

the use AU#Info.exe to get the control ID for the Log In Button ( or IE.au3 if it is an internet connection )

the use a controlcommand() or ControlClick to clik that button

8)

NEWHeader1.png

Link to comment
Share on other sites

thnx guys for helping out.

mentalmummy, i installed the SCITE editor bout couldnt find the macro recorder in the its folder.

valauter and jakyl , thnx for ur help too, i didnt understand a bit , since i am a newb . thnx neways.

i tried Autohotkey, it has a autoscriptwriter to record the mouse and keyboard events and make the script automatically. i guess, tat will solve my prob easily.

Thnx for the help again!!

Link to comment
Share on other sites

thnx guys for helping out.

mentalmummy, i installed the SCITE editor bout couldnt find the macro recorder in the its folder.

valauter and jakyl , thnx for ur help too, i didnt understand a bit , since i am a newb . thnx neways.

i tried Autohotkey, it has a autoscriptwriter to record the mouse and keyboard events and make the script automatically. i guess, tat will solve my prob easily.

Thnx for the help again!!

Be aware that mouseclicks are not reliable unless the thing you're clicking is always, truly and forever, going to be in the same place EVERY TIME. And it doesn't sound like the thing you're clicking is necessarily always going to be in the same place.. I think I'd follow the advice on trying to do it through control commands or at the very least add some pixelsearching to try and guarantee you're clicking the right thing.

Link to comment
Share on other sites

  • Moderators

Be aware that mouseclicks are not reliable unless the thing you're clicking is always, truly and forever, going to be in the same place EVERY TIME. And it doesn't sound like the thing you're clicking is necessarily always going to be in the same place.. I think I'd follow the advice on trying to do it through control commands or at the very least add some pixelsearching to try and guarantee you're clicking the right thing.

Contradicted yourself there :(... Are only reliable if they are in the same place EVERY TIME, then told him about PixelSearch()/Color()/CheckSum() ... :think:.

Almost replied to point out Pixel Functions till I read your whole post.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...