Jump to content

Recommended Posts

Posted

Hello guys :) I'm new at these forums, and new for scripting (Yes, ALL scripting). So do not wonder why I can't do even simple things with AutoIt.

Here we go, I have followed some tutorials, and have created somewhat working autoclicker. I'm trying to create an autoclicker that clicks by RANDOM DELAYS, you heard right, my game does recognize bot/macro-users, if they have, till example 800 Millisecond delay on every click they do -> Ban.

This is what I got so far:

Global $counter=0 ;globally declare $counter to the program, not just as a variable contained in a Function

While 1

HotKeySet("{INSERT}","Start")

HotKeySet("{END}","END")

WEnd

Func Start()

$counter=1

While $counter=1

Sleep(1453)

MouseClick("left")

Sleep(1468)

Mouseclick("Left")

Sleep(1463)

Mouseclick("Left")

Sleep(1634)

Mouseclick("Left")

Sleep(1457)

Mouseclick("Left")

Sleep(1516)

Mouseclick("Left")

Sleep(1469)

Mouseclick("Left")

Sleep(1453)

MouseClick("left")

Sleep(1438)

Mouseclick("Left")

Sleep(1463)

Mouseclick("Left")

Sleep(1434)

Mouseclick("Left")

Sleep(1457)

Mouseclick("Left")

Sleep(1452)

Mouseclick("Left")

Sleep(1456)

Mouseclick("Left")

WEnd

EndFunc

Func End()

$counter=0

EndFunc

I know it is pretty much copy paste, and simple editing, but it's for my own personal use, I'm not going to publish it, until it is worth publishing. So I should make this code, leftclick with RANDOM delay (1400-1500 Milliseconds!).

Could someone lighten up how do random functions work on AutoIt? Any help will be much appreciated! :)

Posted

a random sleep would look like this... Sleep(Random(10, 10000, 1)) (10 milliseconds to 10 seconds). The 1 returns a whole number istead of a floating number.

You can then put that in a loop and run however many times you want.

While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd
Posted

How about this, uae the random function, i chose 800 as the minimum amount and 1600 as the maximum, even 100 over the highest i saw in your quote, 1 returns the integer instead of floating point number.

Hope that helps

James

Global $counter=0;globally declare $counter to the program, not just as a variable contained in a Function

While 1
HotKeySet("{INSERT}","Start")
HotKeySet("{END}","END")
WEnd

Func Start()
$counter=1
While $counter=1
    $randum = Random(800, 1600, 1)
    Sleep($randum)
    MouseClick("left")
WEnd
EndFunc

Func End()
$counter=0
EndFunc

Hello guys :) I'm new at these forums, and new for scripting (Yes, ALL scripting). So do not wonder why I can't do even simple things with AutoIt.

Here we go, I have followed some tutorials, and have created somewhat working autoclicker. I'm trying to create an autoclicker that clicks by RANDOM DELAYS, you heard right, my game does recognize bot/macro-users, if they have, till example 800 Millisecond delay on every click they do -> Ban.

This is what I got so far:

I know it is pretty much copy paste, and simple editing, but it's for my own personal use, I'm not going to publish it, until it is worth publishing. So I should make this code, leftclick with RANDOM delay (1400-1500 Milliseconds!).

Could someone lighten up how do random functions work on AutoIt? Any help will be much appreciated! :)

Posted

How about this, uae the random function, i chose 800 as the minimum amount and 1600 as the maximum, even 100 over the highest i saw in your quote, 1 returns the integer instead of floating point number.

Hope that helps

James

Global $counter=0;globally declare $counter to the program, not just as a variable contained in a Function

While 1
HotKeySet("{INSERT}","Start")
HotKeySet("{END}","END")
WEnd

Func Start()
$counter=1
While $counter=1
    $randum = Random(800, 1600, 1)
    Sleep($randum)
    MouseClick("left")
WEnd
EndFunc

Func End()
$counter=0
EndFunc
Thanks a ton! Really lovely and helpful community! :)

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
×
×
  • Create New...