Sign in to follow this  
Followers 0
Somniis

GUI before main GUI shows; dependent on IniRead()

10 posts in this topic

#1 ·  Posted (edited)

Hello all! I'm not a complete newbie with AutoIT, but I cannot find an answer to this problem.

I am writing a bot for an online game to automate macro pressing. What I want to do is have an initial GUI pop-up when the bot is run for the first time, and set a value in a INI so that it will not appear the next time. This initial GUI will give a brief description and warning for the use of bots, etc.

What I have so far: (only putting relevant code)

$r_Ini = IniRead($INI, "Startup", "message", "")

;If $r_Ini = 0 Then
;GUISetState($GUI_DISABLE, $gui_MAIN)
;$gui_INI = GUICreate("First Time Startup - Information", 400, 400, -1, -1, -1, -1, $gui_MAIN)
;GUICtrlCreateLabel(Label info purposely withheld)
;GUISetState(@SW_SHOW, $gui_INI)
;IniWrite($INI, "Startup", "message", "1")
;ElseIf $r_Ini = 1 Then
    GUISetState(@SW_SHOW, $gui_MAIN)
;EndIf

GUISetState(@SW_SHOW, $gui_MAIN)

(I copied the code directly from the file, it is commented out until I can get it working.)

It works perfectly when I run it and the INI value is set to 1, and shows the main GUI. However, when I set the value to 0, the GUI pops up but the text does not appear and the main GUI does not show. Also, when I close this initial GUI, it exits the entire script. I'm sure it is due to the way I have it coded, but I simply cannot figure out how to do this.

To state it simply: I want a child-GUI to pop-up WITH my main GUI, but only for the first time the script is run. When the initial GUI is run, the label information doesn't show (no idea why) and it exits the entire script when I exit the initial GUI. I know why it does this, but, I don't know how to manage two GUIs - especially one that pops up before the main GUI.

Is there any simpler way to do this that I am perhaps overlooking due to working on this all day? :o

Thank you for any help!

Regards,

Somniis

Edited by Somniis

Share this post


Link to post
Share on other sites



There are alot of approaches... place a button on the ini gui for close.. or time it out

small error

GUISetState($GUI_DISABLE, $gui_MAIN)

thats @SW_DISABLE

#include <GuiConstants.au3>

$r_Ini = 0;IniRead($INI, "Startup", "message", "")

$gui_MAIN = GUICreate("Main Gui is here", 400, 400, -1, -1)
GUISetState()
If $r_Ini = 0 Then
GUISetState(@SW_HIDE, $gui_MAIN)
$gui_INI = GUICreate("First Time Startup - Information", 400, 400, -1, -1, $WS_BORDER, -1, $gui_MAIN)
GUICtrlCreateLabel("Label info purposely withheld", 50, 50)
GUISetState(@SW_SHOW, $gui_INI)
Sleep(4000)
GUIDelete($gui_INI)
;IniWrite($INI, "Startup", "message", "1")
ElseIf $r_Ini = 1 Then
    GUISetState(@SW_SHOW, $gui_MAIN)
EndIf

GUISetState(@SW_SHOW, $gui_MAIN)
Sleep(4000)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

There are alot of approaches... place a button on the ini gui for close.. or time it out

small error

thats @SW_DISABLE

#include <GuiConstants.au3>

$r_Ini = 0;IniRead($INI, "Startup", "message", "")

$gui_MAIN = GUICreate("Main Gui is here", 400, 400, -1, -1)
GUISetState()
If $r_Ini = 0 Then
GUISetState(@SW_HIDE, $gui_MAIN)
$gui_INI = GUICreate("First Time Startup - Information", 400, 400, -1, -1, $WS_BORDER, -1, $gui_MAIN)
GUICtrlCreateLabel("Label info purposely withheld", 50, 50)
GUISetState(@SW_SHOW, $gui_INI)
Sleep(4000)
GUIDelete($gui_INI)
;IniWrite($INI, "Startup", "message", "1")
ElseIf $r_Ini = 1 Then
    GUISetState(@SW_SHOW, $gui_MAIN)
EndIf

GUISetState(@SW_SHOW, $gui_MAIN)
Sleep(4000)

8)

I tried this but I get the same problem. The initial GUI ($gui_INI) must be closed by the user, not by a Sleep() function.

Thank you for the reply though.

EDIT: I tried your script and it works like I would want it to. However, the $gui_INI information will be a pretty long read, and there is no way to set a Sleep() time before it closes due to people reading at differing speeds. How would I pass the message to only close the inital GUI, not the main one?

Edited by Somniis

Share this post


Link to post
Share on other sites

that was pretty clear... you could just add a button and remove the sleep ( there is no Close "X" in the top corner)

another way to do it is if the ini is false... then

guiccreate(ini gui)

labels

buton

guisetstate

While 1

get messgae

if message = gui_Evnt_Close then exit loop

Wend

gui create ( main GUI)

...... and continue as normal

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Meh, I'll just post the entire code, as I can't figure exactly what I am doing wrong.

#include <GUIConstants.au3>
#NoTrayIcon

Global Const $VER = "1.0 BETA"
Global Const $INI = @ScriptDir & "\data\skillup.dat"
Global Const $ICON = @ScriptDir & "\data\dsicon.ico"

$r_Ini = IniRead($INI, "Startup", "message", "")

$gui_MAIN = GUICreate("Skill Up v" & $VER, 225, 219, (@DesktopWidth-225)/2, (@DesktopHeight-219)/2)
GUISetIcon($ICON)

$BEGIN = GUICtrlCreateButton("Begin", 8, 168, 72, 40, $BS_ICON)
GUICtrlSetImage(-1, "shell32.dll", 165)
GUICtrlSetTip(-1, "Start the bot with above settings")
$EXIT = GUICtrlCreateButton("Exit", 144, 168, 72, 40, $BS_ICON)
GUICtrlSetImage(-1, "shell32.dll", 131)
GUICtrlSetTip(-1, "Exit the bot")
$WEBSITE = GUICtrlCreateButton("Website", 80, 168, 64, 40, $BS_ICON)
GUICtrlSetImage(-1, "shell32.dll", 135)
GUICtrlSetTip(-1, "Visit website for possible new version")

$MPREST = GUICtrlCreateCheckbox("Rest for MP", 64, 32, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetTip(-1, "Bot will rest for MP if checked")
$LOG = GUICtrlCreateCheckbox("Logout", 64, 64, 97, 17)
GUICtrlSetTip(-1, "Bot will logout after it is finished") 
$AUTOL = GUICtrlCreateCheckbox("Auto-login", 64, 96, 97, 17)
GUICtrlSetTip(-1, "Bot will auto-login if checked (first character slot only)")

$Input1 = GUICtrlCreateInput("10", 112, 128, 40, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlSetTip(-1, "The number of times the macro loop will run, min 10, max 50")
$Updown1 = GUICtrlCreateUpdown($Input1)
GUICtrlSetLimit($Updown1, 50, 10)

GUICtrlCreateLabel("Loop amount =", 32, 128, 75, 17)
GUICtrlCreateLabel("Hover mouse for more information", 32, 8, 162, 17)

Global $MP_REST = 1
Global $LOGOUT = 0
Global $AUTOLOG = 0
Global $MAX_COUNT = 10

GUISetState()
If $r_Ini = 0 Then
    GUISetState(@SW_HIDE, $gui_MAIN)
    $gui_INI = GUICreate("First Time Startup - Information", 400, 400, -1, -1, -1, -1, $gui_MAIN)
    GUICtrlCreateLabel(-1, 'Skill Up v' & $VER & ' first time start-up information - ' & @LF & _
                    @LF & _
                    'Please read this before using this bot.  You use this bot at your own risk,' & @LF & _
                    'and will not hold the creator of this program liable if your account is banned.' & @LF & _
                    'Please do not openly speak about using ANY third-party programs in the game.' & @LF & _
                    @LF & _
                    'To start using this bot, create the macros you wish to use in the first five(5)' & @LF & _
                    'Control Macros.  Please also be aware that you will have approx. 17 seconds per macro.' & @LF & _
                    'These macros can contain any spell and/or ability that can directly be casted on' & @LF & _
                    'your character.  If you are skilling up summoning magic, put /release in each macro.' & @LF & _
                    @LF & _
                    'This bot is designed to be left on over night or for long periods of time.  Please' & @LF & _
                    'treat it that way.' & @LF & _
                    @LF & _
                    'Have fun!', 50, 50)
    GUISetState(@SW_SHOW, $gui_INI)
    Sleep(5000)
    IniWrite($INI, "Startup", "message", "1")
ElseIf $r_Ini = 1 Then
    GUISetState(@SW_SHOW, $gui_MAIN)
EndIf

GUISetState(@SW_SHOW, $gui_MAIN)
Sleep(4000)

While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $EXIT
        ExitLoop
    Case $msg = $WEBSITE
        _Web('removed for privacy concerns')
    Case $msg = $BEGIN
        Dim $sd = GUICtrlRead($LOG)
        Dim $al = GUICtrlRead($AUTOL)
        Dim $mp = GUICtrlRead($MPREST)
        $MAX_COUNT = GUICtrlRead($Input1)
        
        Dim $infoLOGO, $infoALOGO, $infoMP
        
        If $sd = $GUI_CHECKED Then
            $LOGOUT = 1
            $infoLOGO = "Yes"
        ElseIf $sd = $GUI_UNCHECKED Then
            $LOGOUT = 0
            $infoLOGO = "No"
        EndIf
        
        If $al = $GUI_CHECKED Then
            $AUTOLOG = 1
            $infoALOGO = "Yes"
        ElseIf $al = $GUI_UNCHECKED Then
            $AUTOLOG = 0
            $infoALOGO = "No"
        EndIf
        
        If $mp = $GUI_CHECKED Then
            $MP_REST = 1
            $infoMP = "Yes"
        ElseIf $mp = $GUI_UNCHECKED Then
            $MP_REST = 0
            $infoMP = "No"
        EndIf
        
        If $MAX_COUNT >= 50.0000001 Then
            $MAX_COUNT = 50
            GUICtrlSetData($Input1, "50")
            Msgbox(64, "Error", "Loop amount greater than allowed; setting to 50.")
        EndIf
        
        If $MAX_COUNT <= 9.9999999 Then
            $MAX_COUNT = 10
            GUICtrlSetData($Input1, "10")
            Msgbox(64, "Error", "Loop amount less than allowed; setting to 10.")
        EndIf
            
    ; debug only
    ;Msgbox(64, "Debug", $MP_REST & "," & $LOGOUT & "," & $AUTOLOG & "," & $MAX_COUNT)
        
        Sleep(500)
        
        Opt("TrayIconHide", 0)
        Opt("SendKeyDelay", 1100)
        Opt("SendKeyDownDelay", 1100)
        GUISetState(@SW_HIDE, $gui_MAIN)
        
        Sleep(1000)
        
        If Not WinActive("removed for privacy concerns") Then
            Msgbox(64, "Information",   "Start the game with the Windower enabled to continue." & @LF & _
                                    @LF & _
                                    "Rest for MP: " & $infoMP & @LF & _
                                    "Logout: " & $infoLOGO & @LF & _
                                    "Auto-login: " & $infoALOGO & @LF & _
                                    "Loop amount: " & $MAX_COUNT & @LF & _
                                    @LF & _
                                    "Right-click the icon in the taskbar and select Exit to stop the script.")
        Else
            Msgbox(64, "Information",   "Rest for MP: " & $infoMP & @LF & _
                                    "Logout: " & $infoLOGO & @LF & _
                                    "Auto-login: " & $infoALOGO & @LF & _
                                    "Loop amount: " & $MAX_COUNT & @LF & _
                                    @LF & _
                                    "Right-click the icon in the taskbar and select Exit to stop the script.")
        EndIf
        
        WinWaitActive("removed for privacy concerns")
        If $AUTOLOG = 1 Then
            TrayTip("Starting...", "The script is now auto-logging you in." & @LF & _
                                @LF & _
                                "Please do not press any keys during this process.", 2, 1)
            _A_LOGIN()
        ElseIf $AUTOLOG = 0 Then
            TrayTip("Starting...", "You have one minute to log in.", 2, 1)
            Sleep(61000)
        EndIf
        TrayTip("Started!", "The script has started!" & @LF & _
                        @LF & _
                        "Please do not press any keys while the bot is running.", 5, 2)
        
        Dim $count = 0
        
        Do
            Send("{F1}") ; target player
            Sleep(5000)
            Send("^1")
            Sleep(Random(16000, 21000, 1))
            Send("^2")
            Sleep(Random(16000, 21000, 1))
            Send("^3")
            Sleep(Random(16000, 21000, 1))
            Send("^4")
            Sleep(Random(17000, 21000, 1))
            Send("^5")
            Sleep(Random(12000, 16000, 1))
            $count = $count + 1
            
            If $MP_REST = 1 Then
                Select
                    Case $count = 3
                        _HEAL_MP()
                    Case $count = 6
                        _HEAL_MP()
                    Case $count = 9
                        _HEAL_MP()
                    Case $count = 12
                        _HEAL_MP()
                    Case $count = 15
                        _HEAL_MP()
                    Case $count = 18
                        _HEAL_MP()
                    Case $count = 21
                        _HEAL_MP()
                    Case $count = 24
                        _HEAL_MP()
                    Case $count = 27
                        _HEAL_MP()
                    Case $count = 30
                        _HEAL_MP()
                    Case $count = 33
                        _HEAL_MP()
                    Case $count = 36
                        _HEAL_MP()
                    Case $count = 39
                        _HEAL_MP()
                    Case $count = 42
                        _HEAL_MP()
                    Case $count = 45
                        _HEAL_MP()
                    Case $count = 48
                        _HEAL_MP()
                EndSelect
            EndIf
        Until $count = $MAX_COUNT
        
        If $LOGOUT = 1 Then
            Opt("SendKeyDelay", 400)
            Opt("SendKeyDownDelay", 400)
            Send("{ESCAPE}")
            Sleep(2000)
            Send("/shutdown")
            Sleep(2000)
            Send("{ENTER}")
            Sleep(1000)
            TrayTip("Exiting...", "Exiting in 5 seconds.", 2, 1)
            Sleep(5000)
            ExitLoop
        ElseIf $LOGOUT = 0 Then
            TrayTip("Exiting...", "Exiting in 5 seconds.", 2, 1)
            Sleep(5000)
            ExitLoop
        EndIf
        
    Case Else
    ;;;;;;;
    EndSelect
WEnd

Func _A_LOGIN()
    Sleep(3000)
    Send("{ENTER}")
    Sleep(7000)
    Send("{ENTER}")
    Sleep(5500)
    Send("{ENTER}")
    Sleep(700)
    Send("{ENTER}")
    Sleep(28000)
EndFunc

Func _HEAL_MP()
    Send("{ESCAPE}");ensure player is not targeted - cannot heal
    Send("{NumPadMult}")
    Sleep(120000)
    Send("{NumPadMult}")
EndFunc

Func _Web($WebPath)
    If @OSType = 'WIN32_NT' Then
        $StartStr = @ComSpec & ' /c start "" '
    Else
        $StartStr = @ComSpec & ' /c start '
    EndIf
    Run($StartStr & $WebPath, '', @SW_HIDE)
EndFunc

Exit

Share this post


Link to post
Share on other sites

i noticed this

Global Const $INI = @ScriptDir & "\data\skillup.dat"

then you try to read that dat as an ini

maybe it should be

Global Const $INI = @ScriptDir & "\data\skillup.ini"

( that was at a glance )

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

i noticed this

Global Const $INI = @ScriptDir & "\data\skillup.dat"

then you try to read that dat as an ini

maybe it should be

Global Const $INI = @ScriptDir & "\data\skillup.ini"

( that was at a glance )

8)

It reads it fine. :o I know this because I have the .dat file open in the same editor as the code, and it always asks me if I want to reload "skillup.dat" when I run the .au3 file. Just my personal preference. :geek:

Share this post


Link to post
Share on other sites

got it... **** TESTED *****

#include <GUIConstants.au3>
#NoTrayIcon

Global Const $VER = "1.0 BETA"
Global Const $INI = @ScriptDir & "\data\skillup.ini"
Global Const $ICON = @ScriptDir & "\data\dsicon.ico"

$r_Ini = IniRead($INI, "Startup", "message", "")


If $r_Ini = 0 Then
    $gui_INI = GUICreate("First Time Startup - Information", 400, 400, -1, -1, $WS_BORDER, -1);, $gui_MAIN)
    GUICtrlCreateLabel( 'Skill Up v' & $VER & ' first time start-up information - ' & @LF & _
                    @LF & _
                    'Please read this before using this bot.  You use this bot at your own risk,' & @LF & _
                    'and will not hold the creator of this program liable if your account is banned.' & @LF & _
                    'Please do not openly speak about using ANY third-party programs in the game.' & @LF & _
                    @LF & _
                    'To start using this bot, create the macros you wish to use in the first five(5)' & @LF & _
                    'Control Macros.  Please also be aware that you will have approx. 17 seconds per macro.' & @LF & _
                    'These macros can contain any spell and/or ability that can directly be casted on' & @LF & _
                    'your character.  If you are skilling up summoning magic, put /release in each macro.' & @LF & _
                    @LF & _
                    'This bot is designed to be left on over night or for long periods of time.  Please' & @LF & _
                    'treat it that way.' & @LF & _
                    @LF & _
                    'Have fun!', 10, 20, 380, 300)
    $Closer = GUICtrlCreateButton("Close", 150, 320, 100, 30)
    GUISetState(@SW_SHOW, $gui_INI)
    While 1
        $msg = GUIGetMsg()
        If $msg = $GUI_EVENT_CLOSE Or $msg = $Closer Then 
            GUIDelete($gui_INI)
            ExitLoop
        EndIf
    WEnd
    DirCreate(@ScriptDir & "\data")
    IniWrite($INI, "Startup", "message", "1")
EndIf

$gui_MAIN = GUICreate("Skill Up v" & $VER, 225, 219, (@DesktopWidth-225)/2, (@DesktopHeight-219)/2)
GUISetIcon($ICON)

$BEGIN = GUICtrlCreateButton("Begin", 8, 168, 72, 40, $BS_ICON)
GUICtrlSetImage(-1, "shell32.dll", 165)
GUICtrlSetTip(-1, "Start the bot with above settings")
$EXIT = GUICtrlCreateButton("Exit", 144, 168, 72, 40, $BS_ICON)
GUICtrlSetImage(-1, "shell32.dll", 131)
GUICtrlSetTip(-1, "Exit the bot")
$WEBSITE = GUICtrlCreateButton("Website", 80, 168, 64, 40, $BS_ICON)
GUICtrlSetImage(-1, "shell32.dll", 135)
GUICtrlSetTip(-1, "Visit website for possible new version")

$MPREST = GUICtrlCreateCheckbox("Rest for MP", 64, 32, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetTip(-1, "Bot will rest for MP if checked")
$LOG = GUICtrlCreateCheckbox("Logout", 64, 64, 97, 17)
GUICtrlSetTip(-1, "Bot will logout after it is finished")
$AUTOL = GUICtrlCreateCheckbox("Auto-login", 64, 96, 97, 17)
GUICtrlSetTip(-1, "Bot will auto-login if checked (first character slot only)")

$Input1 = GUICtrlCreateInput("10", 112, 128, 40, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlSetTip(-1, "The number of times the macro loop will run, min 10, max 50")
$Updown1 = GUICtrlCreateUpdown($Input1)
GUICtrlSetLimit($Updown1, 50, 10)

GUICtrlCreateLabel("Loop amount =", 32, 128, 75, 17)
GUICtrlCreateLabel("Hover mouse for more information", 32, 8, 162, 17)

Global $MP_REST = 1
Global $LOGOUT = 0
Global $AUTOLOG = 0
Global $MAX_COUNT = 10

GUISetState()

While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $EXIT
        ExitLoop
    Case $msg = $WEBSITE
        _Web('removed for privacy concerns')
    Case $msg = $BEGIN
        Dim $sd = GUICtrlRead($LOG)
        Dim $al = GUICtrlRead($AUTOL)
        Dim $mp = GUICtrlRead($MPREST)
        $MAX_COUNT = GUICtrlRead($Input1)
        
        Dim $infoLOGO, $infoALOGO, $infoMP
        
        If $sd = $GUI_CHECKED Then
            $LOGOUT = 1
            $infoLOGO = "Yes"
        ElseIf $sd = $GUI_UNCHECKED Then
            $LOGOUT = 0
            $infoLOGO = "No"
        EndIf
        
        If $al = $GUI_CHECKED Then
            $AUTOLOG = 1
            $infoALOGO = "Yes"
        ElseIf $al = $GUI_UNCHECKED Then
            $AUTOLOG = 0
            $infoALOGO = "No"
        EndIf
        
        If $mp = $GUI_CHECKED Then
            $MP_REST = 1
            $infoMP = "Yes"
        ElseIf $mp = $GUI_UNCHECKED Then
            $MP_REST = 0
            $infoMP = "No"
        EndIf
        
        If $MAX_COUNT >= 50.0000001 Then
            $MAX_COUNT = 50
            GUICtrlSetData($Input1, "50")
            Msgbox(64, "Error", "Loop amount greater than allowed; setting to 50.")
        EndIf
        
        If $MAX_COUNT <= 9.9999999 Then
            $MAX_COUNT = 10
            GUICtrlSetData($Input1, "10")
            Msgbox(64, "Error", "Loop amount less than allowed; setting to 10.")
        EndIf
            
   ; debug only
   ;Msgbox(64, "Debug", $MP_REST & "," & $LOGOUT & "," & $AUTOLOG & "," & $MAX_COUNT)
        
        Sleep(500)
        
        Opt("TrayIconHide", 0)
        Opt("SendKeyDelay", 1100)
        Opt("SendKeyDownDelay", 1100)
        GUISetState(@SW_HIDE, $gui_MAIN)
        
        Sleep(1000)
        
        If Not WinActive("removed for privacy concerns") Then
            Msgbox(64, "Information",    "Start the game with the Windower enabled to continue." & @LF & _
                                    @LF & _
                                    "Rest for MP: " & $infoMP & @LF & _
                                    "Logout: " & $infoLOGO & @LF & _
                                    "Auto-login: " & $infoALOGO & @LF & _
                                    "Loop amount: " & $MAX_COUNT & @LF & _
                                    @LF & _
                                    "Right-click the icon in the taskbar and select Exit to stop the script.")
        Else
            Msgbox(64, "Information",    "Rest for MP: " & $infoMP & @LF & _
                                    "Logout: " & $infoLOGO & @LF & _
                                    "Auto-login: " & $infoALOGO & @LF & _
                                    "Loop amount: " & $MAX_COUNT & @LF & _
                                    @LF & _
                                    "Right-click the icon in the taskbar and select Exit to stop the script.")
        EndIf
        
        WinWaitActive("removed for privacy concerns")
        If $AUTOLOG = 1 Then
            TrayTip("Starting...", "The script is now auto-logging you in." & @LF & _
                                @LF & _
                                "Please do not press any keys during this process.", 2, 1)
            _A_LOGIN()
        ElseIf $AUTOLOG = 0 Then
            TrayTip("Starting...", "You have one minute to log in.", 2, 1)
            Sleep(61000)
        EndIf
        TrayTip("Started!", "The script has started!" & @LF & _
                        @LF & _
                        "Please do not press any keys while the bot is running.", 5, 2)
        
        Dim $count = 0
        
        Do
            Send("{F1}"); target player
            Sleep(5000)
            Send("^1")
            Sleep(Random(16000, 21000, 1))
            Send("^2")
            Sleep(Random(16000, 21000, 1))
            Send("^3")
            Sleep(Random(16000, 21000, 1))
            Send("^4")
            Sleep(Random(17000, 21000, 1))
            Send("^5")
            Sleep(Random(12000, 16000, 1))
            $count = $count + 1
            
            If $MP_REST = 1 Then
                Select
                    Case $count = 3
                        _HEAL_MP()
                    Case $count = 6
                        _HEAL_MP()
                    Case $count = 9
                        _HEAL_MP()
                    Case $count = 12
                        _HEAL_MP()
                    Case $count = 15
                        _HEAL_MP()
                    Case $count = 18
                        _HEAL_MP()
                    Case $count = 21
                        _HEAL_MP()
                    Case $count = 24
                        _HEAL_MP()
                    Case $count = 27
                        _HEAL_MP()
                    Case $count = 30
                        _HEAL_MP()
                    Case $count = 33
                        _HEAL_MP()
                    Case $count = 36
                        _HEAL_MP()
                    Case $count = 39
                        _HEAL_MP()
                    Case $count = 42
                        _HEAL_MP()
                    Case $count = 45
                        _HEAL_MP()
                    Case $count = 48
                        _HEAL_MP()
                EndSelect
            EndIf
        Until $count = $MAX_COUNT
        
        If $LOGOUT = 1 Then
            Opt("SendKeyDelay", 400)
            Opt("SendKeyDownDelay", 400)
            Send("{ESCAPE}")
            Sleep(2000)
            Send("/shutdown")
            Sleep(2000)
            Send("{ENTER}")
            Sleep(1000)
            TrayTip("Exiting...", "Exiting in 5 seconds.", 2, 1)
            Sleep(5000)
            ExitLoop
        ElseIf $LOGOUT = 0 Then
            TrayTip("Exiting...", "Exiting in 5 seconds.", 2, 1)
            Sleep(5000)
            ExitLoop
        EndIf
        
    Case Else
   ;;;;;;;
    EndSelect
WEnd

Func _A_LOGIN()
    Sleep(3000)
    Send("{ENTER}")
    Sleep(7000)
    Send("{ENTER}")
    Sleep(5500)
    Send("{ENTER}")
    Sleep(700)
    Send("{ENTER}")
    Sleep(28000)
EndFunc

Func _HEAL_MP()
    Send("{ESCAPE}");ensure player is not targeted - cannot heal
    Send("{NumPadMult}")
    Sleep(120000)
    Send("{NumPadMult}")
EndFunc

Func _Web($WebPath)
    If @OSType = 'WIN32_NT' Then
        $StartStr = @ComSpec & ' /c start "" '
    Else
        $StartStr = @ComSpec & ' /c start '
    EndIf
    Run($StartStr & $WebPath, '', @SW_HIDE)
EndFunc

Exit

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Wow! Thank you very much! Jeez.. that was a very simple fix. :o

I guess I was just thinking too hard.. /sigh

Share this post


Link to post
Share on other sites

Welcome

8)


NEWHeader1.png

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