Jump to content

Recommended Posts

Posted (edited)

i will post the code on what i have, but please do not execute the script because it's caused me to hit the reset button 2 times so far. soon as the script starts it begins clicking the left mouse button which i don't want it to do. i want it to click the left mouse button only after i clicked the left button and stop clicking when i click the right mouse button. sounds simple right? ive been fiddling around with this for a while taking parts from other scripts while searching and whatever. but those didnt work the way i wanted them to. anyways here's the script:

HotKeySet("{NUMPAD0}","_Start")
HotKeySet("{NUMPAD1}","_Pause")
HotKeySet("{NUMPAD2}", "_Closing")

If MouseClick("left") then Call ("_Start")
If MouseClick("right") then Call ("_Pause")


While 1
 Sleep(200)
WEnd

Func _Start()
While 1
  Sleep(200)
  MouseClick("left")
WEnd
EndFunc

Func _Pause()
While 1
Sleep(200)
WEnd
EndFunc

Func _Closing()
Exit
EndFunc

thanks for your help/assistance with this. this is for a game called digital paintball, so i can have an easier time shooting like a automatic gun instead of clicking the mouse 8000 times a second myself

Edited by BlueForce
Posted

this wont work... its not proper use

If MouseClick("left") then Call ("_Start")

If MouseClick("right") then Call ("_Pause")

look up _IsPressed() in help

also

your function loops do not have an exit capable

see hotKeySet() in help, at the bottom is a great demo

8)

NEWHeader1.png

Posted (edited)

ahh thanks alot ill try and see how i can change this around now

ok well here is what i have so far which isnt clicking the left mouse button when i hold it down:

unorganized but w/e

#include <Misc.au3>

$dll = DllOpen("user32.dll")

HotKeySet("{NUMPAD2}", "_Closing")

Sleep(1000)

While 1
    If _IsPressed("01", $dll) Then
    MouseClick("left")
EndIf
WEnd

DllClose($dll)

Func _Closing()
Exit
EndFunc
Edited by BlueForce

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
  • Recently Browsing   0 members

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