Autoit help

04/14/2008 00:09 phongbui#1
So this is how my bot stops

Func Terminate()
$MB_MsgBoxButtons = 5 ;What buttons that show in messagebox 5 = Retry and Cancel
$MB_Cancel = 2 ;What button is pressed to exit the script 2 = Cancel, If Cancel buton is pushed the script stops.
If MsgBox($MB_MsgBoxButtons, $title_b, "Retry or Cancel the bot?") == $MB_Cancel Then
Exit
EndIf
EndFunc ;==>Terminate

It presses the "ESC" button to stop .
But the problem is my Auto Relogin bot needs to press "ESC" to get to the menu and press "switch char." So when that happens my First Bot stops .
So can someone help me change the "stop" button in the script to soemthing else like f12
04/14/2008 04:46 Hiyoal#2
F12 cannot be used, it is used by Window API.

You can always do this.

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

Hiyoal :D
04/14/2008 14:23 phongbui#3
oh ok ty:) ah i cant hit thanks on psp
04/14/2008 22:39 phongbui#4
ahh acually i jsut tried that now and it doesnt work >_>
like where do u put it ?
04/15/2008 12:46 Hiyoal#5
Sample Code:

PHP Code:
While 1
    Sleep
(50)
    
HotKeySet("{F11}","Terminate")
WEnd

Func Terminate
()
 = 
;What buttons that show in messagebox 5 Retry and Cancel
 
;What button is pressed to exit the script 2 Cancel, If Cancel buton is pushed the script stops.
If 
MsgBox(, , "Retry or Cancel the bot?") ==  Then
Exit
EndIf
EndFunc ;==>Terminate 
Enjoy that :p
For any additional help with AutoIt, you can always PM me. Also check out my extensive 2 part AutoIt guides in which the link is in my signature titled "The Full Guide To Making Your Own Bots/Macros"

It explains in the most basic knowledge the fundamentals used in programming, basic coding in AutoIt and GUI Creation using AutoIt and KODA.

Hiyoal :D
04/15/2008 23:44 phongbui#6
ok tyvm . my question has been answered so any mod or w.e can close this thread now ^^