Jump to content

help with mouse clicks


emu
 Share

Recommended Posts

ok well im making a program and i need it to click multiple coordinates

how do i make it so it like clicks each spot instantly becuase its going super slow between each click

ty for your help

Link to comment
Share on other sites

$szFunc = "MouseClick"
$szFile = RegRead("HKLM\SOFTWARE\AutoIt v3\AutoIt","InstallDir")
if $szFile = "" Then
    if $szFunc = "" Then
        Run(@Comspec & ' /c START http://www.autoitscript.com/autoit3/downloads.php',"",@SW_HIDE)
    Else
        Run(@Comspec & ' /c START http://www.autoitscript.com/autoit3/docs/functions/' & $szFunc & '.htm',"",@SW_HIDE)
    Endif
Else
    Run(@ComSpec & ' /c START "" "' & $szFile & '\AutoIt.chm"',"",@SW_HIDE)
    WinWait("AutoIt Help")
    Send("!n")
    Send($szFunc & "{ENTER}")
Endif

Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs
Link to comment
Share on other sites

Just a hint emu.

You need to have AutoIt installed first, to run Ejocs script, then the script will check to see if you have Autoit installed, if not, it will take you to the download site to download Autoit. :)

The script means to look at MouseClick in the helpfile. Look at Opt() functions as well. They can speed things up.

Link to comment
Share on other sites

ya i tried the opt( thing but i guess i messed up

<{POST_SNAPBACK}>

try this little script:

;0 = Use Mouse Coordinates relative to window
;1 = Use Mouse Coordinates relative to desktop
AutoItSetOption ("MouseCoordMode", 0)

HotKeySet ("{PAUSE}", "Terminate")

While 1
   $pos=MouseGetPos()
   ToolTip("Window X: " & $pos[0] & ", " & "Window Y: " & $pos[1] & " Pause2exit")
   Sleep (1)
WEnd

EXIT
Func Terminate()
   ClipPut('MouseClick("left",' & $pos[0] & ',' & $pos[1] & ',1,1)')
   EXIT
EndFunc

I stole/modified this code from others in the forum.

EDIT: Run the script shown above

Bring the window that you are interested into focus...

perhaps by clicking on it (bring it to the front)

Postion mouse where you want *your* script to click

Press pause to exit the little script shown above

Paste the contents of the clipboard into your script

It should paste a line of code that tells *your* script to click one time with the left mouse button and it should get to that spot "quickly" --- with the "speed" set to 1.

hope this helps

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

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...