lilandywandy Posted November 26, 2004 Share Posted November 26, 2004 (edited) what im trying to do is make a simple program that moves the mouse to 796,360 and right-click every 20 seconds... i want it to do it again and again but i also want to be able to have a hot key that can shut it off when i press it ie.) x+c+v and the right-clicking stops... this is what ive come up with and it clicks way to fast, and i cant stop it ; ; AutoIt Version: 3.0 ; Language: English ; Platform: Win9x/NT ; Author: Jonathan Bennett ; ; Script Function: ; Autorightclicker ; ; Double click at 796,360 MouseClick("right", 796, 360, 20000) Exit can someone plz rewrite what i need in order to get what i want... i think it shouldnt be too completcated for an expert =D thnx Edited December 20, 2005 by Jon Link to comment Share on other sites More sharing options...
Guest Py7|-|[]/\/ Posted November 26, 2004 Share Posted November 26, 2004 (edited) Try this: I haven't tested it. HotKeySet("{PAUSE}", "Terminate") $counter = 0 While 1 For $i = 1 to 20 Sleep(20000) $counter = $counter + 1 Next MouseClick("right", 796, 360, 1) Wend Func Terminate() Exit EndFunc By the way. That peans that to exit the script you will need to press the "pause/break" button which is usually to the right of your backspace key in the upper right hand part of your keyboard. Edited November 26, 2004 by Py7|-|[]/\/ Link to comment Share on other sites More sharing options...
lilandywandy Posted November 26, 2004 Author Share Posted November 26, 2004 thnx imma try it now Link to comment Share on other sites More sharing options...
lilandywandy Posted November 26, 2004 Author Share Posted November 26, 2004 um when i open it , the icon on bot right of screen says that its paused by my pause button doesnt unlock it Link to comment Share on other sites More sharing options...
lilandywandy Posted November 26, 2004 Author Share Posted November 26, 2004 anyone? Link to comment Share on other sites More sharing options...
lilandywandy Posted November 26, 2004 Author Share Posted November 26, 2004 ; ; AutoIt Version: 3.0 ; Language: English ; Platform: Win9x/NT ; Author: Jonathan Bennett ; ; Script Function: ; Autorightclicker ; HotKeySet("{PAUSE}", "Terminate") $counter = 0 While 1 For $i = 1 to 20 Sleep(20000) $counter = $counter + 1 Next MouseClick("right", 796, 360, 1) Wend Func Terminate() Exit EndFunc this is exactly what i have in notepad and when i open it, nothing happens to my computer except the autoit icon appearing... and press pause and nothing happen either Link to comment Share on other sites More sharing options...
MHz Posted November 26, 2004 Share Posted November 26, 2004 Try thisHotKeySet("{PAUSE}", "Terminate") While 1 For $i = 1 to 20 Sleep(20000) MouseClick("right", 796, 360) $i = $i + 1 Next Wend Func Terminate() Exit EndFunc Link to comment Share on other sites More sharing options...
lilandywandy Posted November 26, 2004 Author Share Posted November 26, 2004 thnx that works but now i found that the time period between each click is too long like.. 20 secs... if i want 10 and i change 20000 to 10000 or 1 to 10 or both Link to comment Share on other sites More sharing options...
MHz Posted November 26, 2004 Share Posted November 26, 2004 (edited) HotKeySet("{PAUSE}", "Terminate") While 1 For $i = 1 to 20 ;Amount of loops Sleep(20000) ;Amount of time 10secs = 10000 MouseClick("right", 796, 360) ;Mouseclick $i = $i + 1 ;Count Next ;If not 20, do again Wend Func Terminate() Exit EndFunc btw. Please learn the language from the guide. I do realize that it is hard to begin. Edited November 26, 2004 by MHz Link to comment Share on other sites More sharing options...
lilandywandy Posted November 26, 2004 Author Share Posted November 26, 2004 yes im sorry im asking so many questions but the problem is one im kinda dumb and i cant really learn without examples <--- as u see the code i wrote was an edit from an example... now ... a question....lets say i want to do some commands before it starts to right click, what should i write (the commands here, i dont want them to repeat) like lets say i want the program to move the mouse to an icon, double click, la la la those i can get from tutorial , but what must i do so that they dont loop?HotKeySet("{PAUSE}", "Terminate") <---- stays on top?mousemove la la lainsert letter command whatever it is la la la keystroke enter what ever....i want this stuff to fuction onceWhile 1For $i = 1 to 20 Sleep(20000) MouseClick("right", 796, 360) $i = $i + 1 Next WendFunc Terminate()ExitEndFuncso will this result in me making a program logging me (when i finish the mousemove and typing) into a software and and start the right click? Link to comment Share on other sites More sharing options...
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