Sign in to follow this  
Followers 0
BlueForce

i kind of made an autofire script but it doesnt work correctly yet

7 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

it tells me _IsPressed or any combination of IsPressed isnt a valid search in help. hmm mabye i don't have the beta version...

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

it tells me _IsPressed or any combination of IsPressed isnt a valid search in help. hmm mabye i don't have the beta version...

i cant remember if it is in the last public release, however you will need it right away

( i havent used the last release in a long, long time and never looked back )

its here

http://www.autoitscript.com/forum/index.php?showtopic=19717

8

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

i cant remember if it is in the last release, however you will need it right away

( i havent used the last release in a long, long time and never looked back )

its here

http://www.autoitscript.com/forum/index.php?showtopic=19717

8

_IsPressed is in the latest beta release, I use it often.


Share this post


Link to post
Share on other sites

#6 ·  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

Share this post


Link to post
Share on other sites

sorry to double post but editing it doesnt bring it up to the top. if i didnt do this my problem would never be solved :\ thanks

Share this post


Link to post
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
Sign in to follow this  
Followers 0