Sign in to follow this  
Followers 0
robot999

small program for game

4 posts in this topic

hi i made a small program for a game i am playing, ive jus started to use autoit and am not very good at it i was wondering if any1 could help me with this program..basically it auto preses buttons for u in the game i was wondering how i could pause the script and restart it wen i needed it.

---this is the program so far--------

HotKeySet("b", "Buff")

HotKeySet('{END}','_Exit')

;------function to buff up

Func Buff()

For $i = 6 To 9 Step +1

send($i)

sleep(3000)

Next

send("0")

;-----Function to exit script

Func _Exit()

Exit

EndFunc

while 1

Sleep(100)

WEnd

--------------------end program --------

so im guessing im gonna need 2 more functions a pause and a restart, i would like to assign the pause script to the pause button and the restart script to the scroll lock button.

so the pause function will be something like this...?

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

Global $Paused

while 1=1

Func Pause()

$Paused = NOT $Paused

While $Paused

Sleep (400)

WEnd

EndFunc ; => Pause()

hmm i hve no idea how to code the restart function any help will be greatly appreciated.ill have a go at it though plz correct me where i go wrong

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

Func Start()

EndFunc

Share this post


Link to post
Share on other sites




[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

hi i made a small program for a game i am playing, ive jus started to use autoit and am not very good at it i was wondering if any1 could help me with this program..basically it auto preses buttons for u in the game i was wondering how i could pause the script and restart it wen i needed it.

---this is the program so far--------

HotKeySet("b", "Buff")

HotKeySet('{END}','_Exit')

;------function to buff up

Func Buff()

For $i = 6 To 9 Step +1

send($i)

sleep(3000)

Next

send("0")

;-----Function to exit script

Func _Exit()

Exit

EndFunc

while 1

Sleep(100)

WEnd

--------------------end program --------

so im guessing im gonna need 2 more functions a pause and a restart, i would like to assign the pause script to the pause button and the restart script to the scroll lock button.

so the pause function will be something like this...?

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

Global $Paused

while 1=1

Func Pause()

$Paused = NOT $Paused

While $Paused

Sleep (400)

WEnd

EndFunc ; => Pause()

hmm i hve no idea how to code the restart function any help will be greatly appreciated.ill have a go at it though plz correct me where i go wrong

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

Func Start()

EndFunc

suggestions:

1) use appropiate tags to make your code more readable (Autoit tags)

2) search the forum for similar scripts

3) agree with SmOke_N... post in support forum. This forum is for working scripts...

Wellcome to the forums!!! :whistle:

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