Jump to content

Script Exit problem


Recommended Posts

I have this script .. but ... after i use the script ..and i press the tray buttons , they dont work.

Opt("TrayMenuMode",1)   ; Default tray menu items (Script Paused/Exit) will not be shown.
$helptitem  = TrayCreateItem("Help")
TrayCreateItem("")
$aboutitem  = TrayCreateItem("About")
TrayCreateItem("")
$exititem   = TrayCreateItem("Exit")
TraySetState()

While 1
    $msg = TrayGetMsg()
    Select
        Case $msg = 0
            ContinueLoop
        Case $msg = $helptitem
            MsgBox(0," -= Bathory AutoBuff=-","-=Bathory Autobuff=-" & @CRLF & "" & @CRLF & "F9 : Start" & @CRLF & "F10: Stop" & @CRLF & "" & @CRLF & "Setari Buff :" & @CRLF & "#1: Heal" & @CRLF & "#2: Defence" & @CRLF & "#3: Damage" & @CRLF & "" & @CRLF & "Mu rezolution : 1024*768 , fullscreen"& @CRLF& "" & @CRLF & "Version 1.03(Public)" & @CRLF & "(C)2008 Bathory (cfvlad@gmail.com)")
        Case $msg = $aboutitem
            MsgBox(0,"About :     -= Bathory AutoBuff=-","             Bathory Autobuff" & @CRLF & "" & @CRLF & "Version 1.03(Public)" & @CRLF & "" & @CRLF & "" & @CRLF & "(C) 2008 Bathory   (cfvlad@gmail.com)")
        Case $msg = $exititem
            Exit
            ExitLoop
    EndSelect
WEnd

sry for my bad english :)

Edited by Bathory
Link to comment
Share on other sites

dosent work :)((

here is the full script code

is an muonline autobuffer for season 3 ep2

#Include <Constants.au3>
#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=D:\desk\ico\ms-expression-blend.ico
#AutoIt3Wrapper_outfile=AutoBuff1.03.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****




     ;reg write
RegWrite("HKEY_CURRENT_USER\SOFTWARE\Webzen\Mu\Config", "Resolution", "REG_DWORD", "2")
RegWrite("HKEY_CURRENT_USER\SOFTWARE\Webzen\Mu\Config", "WindowMode", "REG_DWORD", "0")
     ;/regwrite
MsgBox(0," -= Bathory AutoBuff=-","-=Bathory Autobuff=-" & @CRLF & "" & @CRLF & "F9 : Start" & @CRLF & "F10: Stop" & @CRLF & "" & @CRLF & "Setari Buff :" & @CRLF & "#1: Heal" & @CRLF & "#2: Defence" & @CRLF & "#3: Damage" & @CRLF & "" & @CRLF & "Mu rezolution : 1024*768 , fullscreen"& @CRLF&"" & @CRLF & "Version 1.03(Public)" & @CRLF & "(C)2008 Bathory (cfvlad@gmail.com)")
     ;hotkey set
HotkeySet("{F10}", "HK_STOP")
HotKeySet("{F9}",  "Autobuff")
      ;/hotkey set
      
      ;tray sett
Opt("TrayMenuMode",1)   ; Default tray menu items (Script Paused/Exit) will not be shown.
$helptitem  = TrayCreateItem("Help")
TrayCreateItem("")
$aboutitem  = TrayCreateItem("About")
TrayCreateItem("")
$exititem   = TrayCreateItem("Exit")
TraySetState()

While 1
    $msg = TrayGetMsg()
    Select
        Case $msg = $helptitem
            MsgBox(0," -= Bathory AutoBuff=-","-=Bathory Autobuff=-" & @CRLF & "" & @CRLF & "F9 : Start" & @CRLF & "F10: Stop" & @CRLF & "" & @CRLF & "Setari Buff :" & @CRLF & "#1: Heal" & @CRLF & "#2: Defence" & @CRLF & "#3: Damage" & @CRLF & "" & @CRLF & "Mu rezolution : 1024*768 , fullscreen"& @CRLF& "" & @CRLF & "Version 1.03(Public)" & @CRLF & "(C)2008 Bathory (cfvlad@gmail.com)")
        Case $msg = $aboutitem
            MsgBox(0,"About :     -= Bathory AutoBuff=-","             Bathory Autobuff" & @CRLF & "" & @CRLF & "Version 1.03(Public)" & @CRLF & "" & @CRLF & "" & @CRLF & "(C) 2008 Bathory   (cfvlad@gmail.com)")
        Case $msg = $exititem
            Call ("SEXIT")
            ExitLoop
    EndSelect
WEnd
          ;/tray sett
          
          ;func
Func Autobuff()
While (1)
Send("1")
Opt("MouseCoordMode", 1)
MouseClick("Right",70,50)
Opt("MouseClickDownDelay", 700)
Send("2")
Opt("MouseCoordMode", 1)
MouseClick("Right",70,50)
Opt("MouseClickDownDelay", 700)
Send("3")
Opt("MouseCoordMode", 1)
MouseClick("Right",70,50)
Opt("MouseClickDownDelay", 700)

Send("1")
Opt("MouseCoordMode", 1)
MouseClick("Right",70,90)
Opt("MouseClickDownDelay", 700)
Send("2")
Opt("MouseCoordMode", 1)
MouseClick("Right",70,90)
Opt("MouseClickDownDelay", 700)
Send("3")
Opt("MouseCoordMode", 1)
MouseClick("Right",70,90)
Opt("MouseClickDownDelay", 700)

Send("1")
Opt("MouseCoordMode", 1)
MouseClick("Right",70,130)
Opt("MouseClickDownDelay", 700)
Send("2")
Opt("MouseCoordMode", 1)
MouseClick("Right",70,130)
Opt("MouseClickDownDelay", 700)
Send("3")
Opt("MouseCoordMode", 1)
MouseClick("Right",70,130)
Opt("MouseClickDownDelay", 700)

Send("1")
Opt("MouseCoordMode", 1)
MouseClick("Right",70,170)
Opt("MouseClickDownDelay", 700)
Send("2")
Opt("MouseCoordMode", 1)
MouseClick("Right",70,170)
Opt("MouseClickDownDelay", 700)
Send("3")
Opt("MouseCoordMode", 1)
MouseClick("Right",70,170)
Opt("MouseClickDownDelay", 700)

Send("1")
Opt("MouseCoordMode", 1)
MouseClick("Right",70,210)
Opt("MouseClickDownDelay", 700)
Send("2")
Opt("MouseCoordMode", 1)
MouseClick("Right",70,210)
Opt("MouseClickDownDelay", 700)
Send("3")
Opt("MouseCoordMode", 1)
MouseClick("Right",70,210)
Opt("MouseClickDownDelay", 700)


Wend
Endfunc

; Stops the program
Func HK_STOP()
while 1 = 1
  Sleep(1000)
wend
EndFunc

Func SEXIT()
    while 1=1
        Exit
    WEnd
EndFunc
; Need to keep the program running until you press the hotkey
while(1)
sleep(1000)
WEnd

    ;/func
Link to comment
Share on other sites

Case $msg = $exititem
Exit
EndSelect
WEnd

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Link to comment
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
 Share

  • Recently Browsing   0 members

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