Rolf Posted August 3, 2007 Posted August 3, 2007 Hello everybody Some 4 hours ago I loaded down the Autoit. Before - I did not even now that something cool like this is available. Reason I did so was: I want to automate a mouseclick. I also found the following sample program on this webpage: -------------------------------------------------- ; Double click at the current mouse pos MouseClick("left") MouseClick("left") ; Double click at 0,500 MouseClick("left", 0, 500, 100) ----------------------------------------------------- As you certainly immediately see this is clicking on the possition where I open the programm and then moves left. Now I tried a lot of things to adjust it to my needs but it wont work. Therefore - before I invest another 4 hours to come nowhere - which most of you might be able to do in 2 min. here my question: How should a scirpt look like which does the following: Click at a defined position e.g. in the middle of the right lower side of the screen (x, y coordinates - but where do I have to place them and what are the numbers to be used). Stay there. Means not moving away and then click again after about 10 sec. and this for an unlimited nummber of times. It would be great having a placeholder (figure) with which I could easily change the time between two clicks (e.g. 5 sec. min. up to 20 sec. max.) Simple said: I need an automated mouseclick at the same position on the screen after and after again. Could somebody please help me? I am just a simple automechanic from Switzerland beeing happy when our office Navition program is not breaking down when I write a bill Any support is very much apprichiated. Thank's a lot Rolf
mikehunt114 Posted August 3, 2007 Posted August 3, 2007 HotKeySet("{ESC}", "Terminate") ;give yourself an exit by pressing Esc $wait = 10000 ;length of the sleep period in milliseconds $x = ;set the x-coord $y = ;set the y-coord While 1 ;initiate a never-ending loop MouseClick("left", $x, $y, 2) ;clicks the left mouse button twice Sleep($wait) ;waits a given amount of time WEnd ;close the loop Func Terminate() MsgBox(0, "Exit", "Press OK to exit script.") Exit EndFunc You can use AU3Info (included in your download) to find the appropriate x and y coordinates. Cheers. IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Rolf Posted August 3, 2007 Author Posted August 3, 2007 Hello Mikehunt thank you very much. I apprichiate this a lot. The program is already in use. GREAT. Have a nice weekend. Regards Rolf
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now