Joshuaaaa Posted October 9, 2007 Posted October 9, 2007 Is there a code to click right mouse repetedly wherever the cursor goes?
BrettF Posted October 9, 2007 Posted October 9, 2007 (edited) Is there a code to click right mouse repetedly wherever the cursor goes?#include <Misc.au3> Do MouseClick ("SECONDARY") Until _IsPressed ("1B") Edited October 9, 2007 by Bert Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Joshuaaaa Posted October 9, 2007 Author Posted October 9, 2007 #include <Misc.au3> Do MouseClick ("SECONDARY") Until _IsPressed ("1B") It gives me an error.
Nahuel Posted October 9, 2007 Posted October 9, 2007 Check again. It has to work. Press the ESC key to stop it.
Joshuaaaa Posted October 9, 2007 Author Posted October 9, 2007 (edited) Check again. It has to work. Press the ESC key to stop it. Don't mind the mess ----> Line 29 is giving me an unknown function error ([until _IsPressed ("1B")). expandcollapse popup#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Tester = GUICreate("Simple Clicker", 201, 151, 337, 222) GUISetCursor (2) GUISetBkColor(0xA6CAF0) $Auto_Scatter = GUICtrlCreateCheckbox("Auto_Scatter", 56, 24, 97, 17) GUICtrlSetBkColor(-1, 0xC0DCC0) $Auto_Jumper = GUICtrlCreateCheckbox("Auto_Jumper", 56, 56, 97, 17) GUICtrlSetBkColor(-1, 0xC0DCC0) $Run = GUICtrlCreateButton("Run", 59, 115, 75, 25, 0) GUICtrlSetFont(-1, 8, 400, 0, "Comic Sans MS") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Run If BitAND(GUICtrlRead($Auto_Scatter), $GUI_CHECKED) Then ; #include <Misc.au3> Do MouseClick ("SECONDARY") [Until _IsPressed ("1B") MsgBox(0, "Info","Auto_Scatter selected - will execute corresponding code") EndIf If BitAND(GUICtrlRead($Auto_Jumper), $GUI_CHECKED) Then ;Send("{SPACE Down}") Sleep(3000); 3 seconds Send("{SPACE Up}") MsgBox(0, "Info","Auto_Jumper selected - will execute corresponding code") EndIf EndSwitch WEnd Edited October 10, 2007 by Joshuaaaa
BrettF Posted October 10, 2007 Posted October 10, 2007 "[" is on the line with the Until, you also need to have #include <misc.au3> at the top of your script. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Generator Posted October 10, 2007 Posted October 10, 2007 Its just a matter if you check the help file...09=Tab
Joshuaaaa Posted October 10, 2007 Author Posted October 10, 2007 Can I also set a stop code if something is NOT a "Do" function? For example: If BitAND(GUICtrlRead($Auto_Jumper), $GUI_CHECKED) Then Send("{LCTRL Down}") Sleep(3000); 3 seconds Send("{LCTRL Up}") I know it won't work if I do Until _IsPressed ("7A"), so there's an alternate? PS: last question and my script is done
Joshuaaaa Posted October 10, 2007 Author Posted October 10, 2007 1) The mouse botton clicks repeatedly, but is there a way to set a space between each click? and ( for generator) 2) I've mingled and tried so many things with AdibEnable, and I cannot touch-down on how to get it to stop this script: If BitAND(GUICtrlRead($Auto_Jumper), $GUI_CHECKED) Then Send("{LCTRL Down}") Sleep(3000); 3 seconds Send("{LCTRL Up}")
qazwsx Posted October 10, 2007 Posted October 10, 2007 (edited) space as in time or a spacebar send? if time sleep () if spacebar send ("{space}") or something like that. Edited October 10, 2007 by sccrstvn93
BrettF Posted October 10, 2007 Posted October 10, 2007 AdLibEnable Example: GLOBAL $count = 0 $time = InputBox ("Time", "Enter a time (in MS)") AdlibEnable ("BackgroundFunc", $time) While 1 ToolTip ("The AdLib loop has run " &$count&" times.", 0, 0) WEnd Func BackgroundFunc () $count += 1 EndFunc Rough but also shows how a time can change... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
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