Sign in to follow this  
Followers 0
Swift

My Prodject in which i need help

25 posts in this topic

this is what i have so far...

#include <GuiConstants.au3>

$Gui = GuiCreate("Test", 390, 360)

$Edit = GUICtrlCreateEdit("", 10, 20, 240, 200, $GUI_SS_DEFAULT_EDIT+$ES_READONLY)

$Button_1 = GUICtrlCreateButton("Button 1", 30, 240, 70, 20)
$Button_2 = GUICtrlCreateButton("Button 2", 160, 240, 70, 20)
$menue = GuiCtrlCreateMenu("Bot")
$settings = Guictrlcreatemenu("Settings")
GUICtrlcreatemenuitem("Connect", $menue)
GUICtrlcreatemenuitem("Disconnect", $menue)
GUICtrlcreatemenuitem("", $menue)
GUICtrlCreateMenuItem("Userlist Manager", $menue)
GUICtrlCreateMenuItem("Custom Command Editor", $menue)
GUICtrlCreateMenuItem("User Monitor", $menue)
GUICtrlCreateMenuItem("Get News And Check For Updates", $menue)
GUICtrlCreateMenuItem("", $menue)
GUICtrlCreateMenuItem("Ignore Clan Invitations", $menue)
GUICtrlCreateMenuItem("", $menue)
GUICtrlCreateMenuItem("Quick Channels", $menue)
GUICtrlCreateMenuItem("Exit", $menue)
$botsettings = GUICtrlCreateMenuItem("Bot Settings", $settings)
GUICtrlCreateMenuItem("Use UDF-8 Encoding/Decoding", $settings)
GUICtrlCreateMenuItem("", $settings)
GUICtrlCreateMenuItem("Edit Profile", $settings)
GUICtrlCreateMenuItem("Edit Chat Filters", $settings)
GUICtrlCreateMenuItem("Edit Catch Phrases", $settings)
GUICtrlCreateMenuItem("", $settings)
GUICtrlCreateMenuItem("View Caught Phrases", $settings)
GUICtrlCreateMenuItem("Edit Files...", $settings)
GUICtrlCreateMenuItem("", $settings)
GUICtrlCreateMenuItem("Bot Settings", $settings)
GUICtrlCreateMenuItem("Reload Config", $settings)
GUICtrlCreateMenuItem("Reload Script", $settings)
$hi = GUICtrlCreateMenu("Connect")
GUICtrlCreateMenu("Disconnect")
$window = GUictrlcreatemenu("Window")
Guictrlcreatemenuitem("Toggle Join/Leave Messages", $window)
Guictrlcreatemenuitem("Toggle Chat Window Lock", $window)
Guictrlcreatemenuitem("Toggle Chat Filters", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Use Individual Whisper Windows", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Show Outgoing Whispers In Whisper Box", $window)
Guictrlcreatemenuitem("Hide Whispers In Main Window", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Logging Settings", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Clear Chat Window", $window)
Guictrlcreatemenuitem("Clear Whisper Window", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Flash Window On Events", $window)
Guictrlcreatemenuitem("Disable Void View", $window)
$help = guictrlcreatemenu("Help")
Guictrlcreatemenuitem("About...", $help)
Guictrlcreatemenuitem("Readme and Command List", $help)
Guictrlcreatemenuitem("Homepage", $help)

GUISetState()

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button_1, $Button_2
            $NewData = "Wellcome!"
            If $Msg = $Button_2 Then $NewData = "Hello!"
            
            $Read_Edit = GUICtrlRead($Edit)
            If $Read_Edit <> "" Then $NewData = @CRLF & $NewData
            
            GUICtrlSetData($Edit, $Read_Edit & $NewData)
            GUICtrlSendMsg($Edit, 0xB7, 0, 0)
    EndSwitch
WEnd

but when you click Bot>Bot Settings...i want it to open this GUI

#NoTrayIcon
#include <GUIConstants.au3>
WinMinimizeAll()
;;---Your Program below:
$k = IniRead(@ScriptDir & "\Config.ini", "Config", "Account", "")
$m = Iniread(@Scriptdir & "\config.ini", "config", "Password", "")
$l = Iniread(@Scriptdir & "\config.ini", "config", "HomeChannel", "")
$a = Iniread(@Scriptdir & "\config.ini", "config", "SetServer", "")
$5 = iniread(@scriptdir & "\config.ini", "config", "WeBBoTSiTE", "")
$keyz = iniread(@scriptdir & "\config.ini", "config", "CD-Key", "")



$GUI = GUICreate($k & ", Online in channel Clan ByE", 390, 360, -1, -1)
$Label_1 = GUICtrlCreateLabel("Account Name", 10, 5, 130, 15)
Guictrlcreatelabel("WeBBoT WeBSiTE", 10, 170, 130, 15)
$web = guictrlcreateinput($5, 10, 185, 100, 20)
$Input_1 = GUICtrlCreateInput($k, 10, 20, 100, 20)
$key = GUICtrlcreateinput($keyz, 10, 225, 100, 20)
GUICtrlCreateLabel("Password", 10, 45, 130, 15)
GUICtrlCreateLabel("Home Channel", 10, 85, 130, 15)
GUICtrlCreateLabel("Server", 10, 125, 130, 15)
Guictrlcreatelabel("CD-Key", 10, 210, 130, 15)
$chan = GUICTRLCREATEINPUT($l, 10, 100, 100, 20)
$pass = GUICtrlCreateInput($m, 10, 60, 100, 20)
$server = GUICtrlCreateInput($a, 10, 140, 100, 20)
$Button_3 = GUICtrlCreateButton("Disconnect", 115, 40, 70, 24)
$Button_1 = GUICtrlCreateButton("&Connect", 120, 10, 60, 24)
$Edit_1 = GUICtrlCreateEdit("", 190, 30, 150, 185, BitOR($ES_AUTOVSCROLL, $ES_READONLY))
$Label_3 = GUICtrlCreateLabel("Battle.Net Info", 215, 10, 130, 15)
$Button_4 = GUICtrlCreateButton("Save and Exit", 190, 221, 151)
GUISetState(@SW_SHOW)

While 1
$nMsg = GUIGetMsg()
Select
Case $nMsg = $Button_1
GUICtrlSetData($Edit_1, "Connecting..." & @CRLF & "Connected!" & @CRLF & "[BNLS] Connecting..." & @CRLF & "[BNLS] Connected!" & @CRLF & "Sending Login Information..." & @CRLF & "Login Successful!")
Case $nMsg = $GUI_EVENT_CLOSE
Exit
Case $nMsg = $Button_3
GUIctrlsetdata($edit_1, "[BNET] Disconnected!")
Case $nMsg = $Button_4
    $EDIT_READ = GUICtrlRead($Input_1)
    IniWrite(@ScriptDir & "\Config.ini", "Config", "Account", $EDIT_READ)
    Exit
Case $nMsg = $pass
    $password = GUIctrlread($pass)
    Iniwrite(@Scriptdir & "\config.ini", "Config", "Password", $password)
    Exit
Case $nMsg = $chan
    $homechan = Guictrlread($chan)
    iniwrite(@scriptdir & "\config.ini", "Config", "HomeChannel", $homechan)
Case $nMsg = $server
    $servers = guictrlread($server)
    iniwrite(@scriptdir & "\config.ini", "config", "SetServer", $servers)
Case $nMsg = $web
    $website = GUICtrlRead($web)
    iniwrite(@scriptdir & "\config.ini", "config", "WeBBoTSiTE", $website)
Case $nMsg = $key
    $keys = GUIctrlread($key)
    iniwrite(@scriptdir & "\config.ini", "config", "CD-Key", $keys)
Case $nMsg = $button_1
    Send("C")
EndSelect
WEnd
GUISetState()

and when you press connect @ the top it will write in the first GUI...

[Time] Connecting

[Time] Connected!

[Time] Connecting

Sleep(2000)

[Time] Connected!

[Time] Sending Login Information.

[Time] Successful!

[Time] Joined Channel (read from the config.ini file on the desktop (HomeChannel=Clan ByE)).

same with the Bot>Connect.

and when you press Disconnect. it will add on

[time] Disconnected.

same with the Bot>Disconnect

and have a input box @ the bottom and what you type in...when you press {ENTER} it will add to the box that has connecting...and stuff...it will do

[Time] [] (what you typed in the box)

this is my biggest project yet...and i cannot do it alone...thanks for your help

Share this post


Link to post
Share on other sites



If you're second script doesn't affect the first in any way you could just use something like this:

Run(@ScriptDir & '\BotGUI.au3')

But if it does affect it, put it all in a function and then have the menu item call the function...


My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

i dont know how to do this..thats why i want help :)

Share this post


Link to post
Share on other sites

#include <GuiConstants.au3>

$Gui = GuiCreate("Test", 390, 360)

$Edit = GUICtrlCreateEdit("", 10, 20, 240, 200, $GUI_SS_DEFAULT_EDIT+$ES_READONLY)

$Button_1 = GUICtrlCreateButton("Button 1", 30, 240, 70, 20)
$Button_2 = GUICtrlCreateButton("Button 2", 160, 240, 70, 20)
$menue = GuiCtrlCreateMenu("Bot")
$settings = Guictrlcreatemenu("Settings")
GUICtrlcreatemenuitem("Connect", $menue)
GUICtrlcreatemenuitem("Disconnect", $menue)
GUICtrlcreatemenuitem("", $menue)
GUICtrlCreateMenuItem("Userlist Manager", $menue)
GUICtrlCreateMenuItem("Custom Command Editor", $menue)
GUICtrlCreateMenuItem("User Monitor", $menue)
GUICtrlCreateMenuItem("Get News And Check For Updates", $menue)
GUICtrlCreateMenuItem("", $menue)
GUICtrlCreateMenuItem("Ignore Clan Invitations", $menue)
GUICtrlCreateMenuItem("", $menue)
GUICtrlCreateMenuItem("Quick Channels", $menue)
GUICtrlCreateMenuItem("Exit", $menue)
$botsettings = GUICtrlCreateMenuItem("Bot Settings", $settings)
GUICtrlCreateMenuItem("Use UDF-8 Encoding/Decoding", $settings)
GUICtrlCreateMenuItem("", $settings)
GUICtrlCreateMenuItem("Edit Profile", $settings)
GUICtrlCreateMenuItem("Edit Chat Filters", $settings)
GUICtrlCreateMenuItem("Edit Catch Phrases", $settings)
GUICtrlCreateMenuItem("", $settings)
GUICtrlCreateMenuItem("View Caught Phrases", $settings)
GUICtrlCreateMenuItem("Edit Files...", $settings)
GUICtrlCreateMenuItem("", $settings)
$botSettingsItem = GUICtrlCreateMenuItem("Bot Settings", $settings); <--- I Assigned a variable to the "Bot Settings" item
GUICtrlCreateMenuItem("Reload Config", $settings)
GUICtrlCreateMenuItem("Reload Script", $settings)
$hi = GUICtrlCreateMenu("Connect")
GUICtrlCreateMenu("Disconnect")
$window = GUictrlcreatemenu("Window")
Guictrlcreatemenuitem("Toggle Join/Leave Messages", $window)
Guictrlcreatemenuitem("Toggle Chat Window Lock", $window)
Guictrlcreatemenuitem("Toggle Chat Filters", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Use Individual Whisper Windows", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Show Outgoing Whispers In Whisper Box", $window)
Guictrlcreatemenuitem("Hide Whispers In Main Window", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Logging Settings", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Clear Chat Window", $window)
Guictrlcreatemenuitem("Clear Whisper Window", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Flash Window On Events", $window)
Guictrlcreatemenuitem("Disable Void View", $window)
$help = guictrlcreatemenu("Help")
Guictrlcreatemenuitem("About...", $help)
Guictrlcreatemenuitem("Readme and Command List", $help)
Guictrlcreatemenuitem("Homepage", $help)

GUISetState()

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button_1, $Button_2
            $NewData = "Wellcome!"
            If $Msg = $Button_2 Then $NewData = "Hello!"
            
            $Read_Edit = GUICtrlRead($Edit)
            If $Read_Edit <> "" Then $NewData = @CRLF & $NewData
            
            GUICtrlSetData($Edit, $Read_Edit & $NewData)
            GUICtrlSendMsg($Edit, 0xB7, 0, 0)
            
        Case $botSettingsItem; <-- Add an exception for the menu item
            _Bot()
    EndSwitch
WEnd


Func _Bot() 
    WinMinimizeAll()

;;---Your Program below:
    $k = IniRead(@ScriptDir & "\Config.ini", "Config", "Account", "")
    $m = Iniread(@Scriptdir & "\config.ini", "config", "Password", "")
    $l = Iniread(@Scriptdir & "\config.ini", "config", "HomeChannel", "")
    $a = Iniread(@Scriptdir & "\config.ini", "config", "SetServer", "")
    $5 = iniread(@scriptdir & "\config.ini", "config", "WeBBoTSiTE", "")
    $keyz = iniread(@scriptdir & "\config.ini", "config", "CD-Key", "")



    $GUI = GUICreate($k & ", Online in channel Clan ByE", 390, 360, -1, -1)
    $Label_1 = GUICtrlCreateLabel("Account Name", 10, 5, 130, 15)
    Guictrlcreatelabel("WeBBoT WeBSiTE", 10, 170, 130, 15)
    $web = guictrlcreateinput($5, 10, 185, 100, 20)
    $Input_1 = GUICtrlCreateInput($k, 10, 20, 100, 20)
    $key = GUICtrlcreateinput($keyz, 10, 225, 100, 20)
    GUICtrlCreateLabel("Password", 10, 45, 130, 15)
    GUICtrlCreateLabel("Home Channel", 10, 85, 130, 15)
    GUICtrlCreateLabel("Server", 10, 125, 130, 15)
    Guictrlcreatelabel("CD-Key", 10, 210, 130, 15)
    $chan = GUICTRLCREATEINPUT($l, 10, 100, 100, 20)
    $pass = GUICtrlCreateInput($m, 10, 60, 100, 20)
    $server = GUICtrlCreateInput($a, 10, 140, 100, 20)
    $Button_3 = GUICtrlCreateButton("Disconnect", 115, 40, 70, 24)
    $Button_1 = GUICtrlCreateButton("&Connect", 120, 10, 60, 24)
    $Edit_1 = GUICtrlCreateEdit("", 190, 30, 150, 185, BitOR($ES_AUTOVSCROLL, $ES_READONLY))
    $Label_3 = GUICtrlCreateLabel("Battle.Net Info", 215, 10, 130, 15)
    $Button_4 = GUICtrlCreateButton("Save and Exit", 190, 221, 151)
    GUISetState(@SW_SHOW)

    While 1
        $nMsg = GUIGetMsg()
        Select
            Case $nMsg = $Button_1
                GUICtrlSetData($Edit_1, "Connecting..." & @CRLF & "Connected!" & @CRLF & "[BNLS] Connecting..." & @CRLF & "[BNLS] Connected!" & @CRLF & "Sending Login Information..." & @CRLF & "Login Successful!")
            Case $nMsg = $GUI_EVENT_CLOSE
                Exit
            Case $nMsg = $Button_3
                GUIctrlsetdata($edit_1, "[BNET] Disconnected!")
            Case $nMsg = $Button_4
                $EDIT_READ = GUICtrlRead($Input_1)
                IniWrite(@ScriptDir & "\Config.ini", "Config", "Account", $EDIT_READ)
                Exit
            Case $nMsg = $pass
                $password = GUIctrlread($pass)
                Iniwrite(@Scriptdir & "\config.ini", "Config", "Password", $password)
                Exit
            Case $nMsg = $chan
                $homechan = Guictrlread($chan)
                iniwrite(@scriptdir & "\config.ini", "Config", "HomeChannel", $homechan)
            Case $nMsg = $server
                $servers = guictrlread($server)
                iniwrite(@scriptdir & "\config.ini", "config", "SetServer", $servers)
            Case $nMsg = $web
                $website = GUICtrlRead($web)
                iniwrite(@scriptdir & "\config.ini", "config", "WeBBoTSiTE", $website)
            Case $nMsg = $key
                $keys = GUIctrlread($key)
                iniwrite(@scriptdir & "\config.ini", "config", "CD-Key", $keys)
            Case $nMsg = $button_1
                Send("C")
        EndSelect
    WEnd
EndFunc
This should work...

I noticed that under your Settings there are two "Bot Settings"... This code works for the one nearer the bottom...


My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

its awesome...only 1 think that i HATE...is that you close the setttings and it closes the whole bot...can you fix that?

Share this post


Link to post
Share on other sites

No, but you can nice and easy if you were to look in the help file.

Share this post


Link to post
Share on other sites

woot...your so helpful...and i got no clue what to look for...in the helpfile

Share this post


Link to post
Share on other sites

Right by the exit command?

Share this post


Link to post
Share on other sites

so...not gunna give me any names? just gunna make me search for it?

Share this post


Link to post
Share on other sites

What do you not get about: By the exit command? Search it under the index of the helpfile.

But if your too lazy, try ExitLoop.

Share this post


Link to post
Share on other sites

for ExitLoop i belive you need... Do or Continueloop...but if you dont want to be clear...i'll ask someone else thats more helpful

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

You don't need anything for Exitloop except a loop.

Exitloop exits the loop its in.

So when you press close on the settings GUI, only put exitloop, then it will switch back to the main GUI without completely exiting.

Edited by JustinReno

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

that explains it well...could you give me a example..like will this work...?

func blahblah

this is my script blah blah

Exitloop

thats all?

so...

Func _Bot() 

;;---Your Program below:
    $k = IniRead(@ScriptDir & "\Config.ini", "Config", "Account", "")
    $m = Iniread(@Scriptdir & "\config.ini", "config", "Password", "")
    $l = Iniread(@Scriptdir & "\config.ini", "config", "HomeChannel", "")
    $a = Iniread(@Scriptdir & "\config.ini", "config", "SetServer", "")
    $5 = iniread(@scriptdir & "\config.ini", "config", "WeBBoTSiTE", "")
    $keyz = iniread(@scriptdir & "\config.ini", "config", "CD-Key", "")



    $GUI = GUICreate($k & ", Online in channel Clan ByE", 390, 360, -1, -1)
    $Label_1 = GUICtrlCreateLabel("Account Name", 10, 5, 130, 15)
    Guictrlcreatelabel("WeBBoT WeBSiTE", 10, 170, 130, 15)
    $web = guictrlcreateinput($5, 10, 185, 100, 20)
    $Input_1 = GUICtrlCreateInput($k, 10, 20, 100, 20)
    $key = GUICtrlcreateinput($keyz, 10, 225, 100, 20)
    GUICtrlCreateLabel("Password", 10, 45, 130, 15)
    GUICtrlCreateLabel("Home Channel", 10, 85, 130, 15)
    GUICtrlCreateLabel("Server", 10, 125, 130, 15)
    Guictrlcreatelabel("CD-Key", 10, 210, 130, 15)
    $chan = GUICTRLCREATEINPUT($l, 10, 100, 100, 20)
    $pass = GUICtrlCreateInput($m, 10, 60, 100, 20)
    $server = GUICtrlCreateInput($a, 10, 140, 100, 20)
    $Button_3 = GUICtrlCreateButton("Disconnect", 115, 40, 70, 24)
    $Button_1 = GUICtrlCreateButton("&Connect", 120, 10, 60, 24)
    $Edit_1 = GUICtrlCreateEdit("", 190, 30, 150, 185, BitOR($ES_AUTOVSCROLL, $ES_READONLY))
    $Label_3 = GUICtrlCreateLabel("Battle.Net Info", 215, 10, 130, 15)
    $Button_4 = GUICtrlCreateButton("Save and Exit", 190, 221, 151)
    GUISetState(@SW_SHOW)

    While 1
        $nMsg = GUIGetMsg()
        Select
            Case $nMsg = $Button_1
                GUICtrlSetData($Edit_1, "Connecting..." & @CRLF & "Connected!" & @CRLF & "[BNLS] Connecting..." & @CRLF & "[BNLS] Connected!" & @CRLF & "Sending Login Information..." & @CRLF & "Login Successful!")
            Case $nMsg = $GUI_EVENT_CLOSE
                Exit
            Case $nMsg = $Button_3
                GUIctrlsetdata($edit_1, "[BNET] Disconnected!")
            Case $nMsg = $Button_4
                $EDIT_READ = GUICtrlRead($Input_1)
                IniWrite(@ScriptDir & "\Config.ini", "Config", "Account", $EDIT_READ)
                Exit
            Case $nMsg = $pass
                $password = GUIctrlread($pass)
                Iniwrite(@Scriptdir & "\config.ini", "Config", "Password", $password)
                Exit
            Case $nMsg = $chan
                $homechan = Guictrlread($chan)
                iniwrite(@scriptdir & "\config.ini", "Config", "HomeChannel", $homechan)
            Case $nMsg = $server
                $servers = guictrlread($server)
                iniwrite(@scriptdir & "\config.ini", "config", "SetServer", $servers)
            Case $nMsg = $web
                $website = GUICtrlRead($web)
                iniwrite(@scriptdir & "\config.ini", "config", "WeBBoTSiTE", $website)
            Case $nMsg = $key
                $keys = GUIctrlread($key)
                iniwrite(@scriptdir & "\config.ini", "config", "CD-Key", $keys)
            Case $nMsg = $button_1
                Send("C")
        EndSelect
    WEnd
EndFunc

would be....?

Func _Bot() 

;;---Your Program below:
    $k = IniRead(@ScriptDir & "\Config.ini", "Config", "Account", "")
    $m = Iniread(@Scriptdir & "\config.ini", "config", "Password", "")
    $l = Iniread(@Scriptdir & "\config.ini", "config", "HomeChannel", "")
    $a = Iniread(@Scriptdir & "\config.ini", "config", "SetServer", "")
    $5 = iniread(@scriptdir & "\config.ini", "config", "WeBBoTSiTE", "")
    $keyz = iniread(@scriptdir & "\config.ini", "config", "CD-Key", "")



    $GUI = GUICreate($k & ", Online in channel Clan ByE", 390, 360, -1, -1)
    $Label_1 = GUICtrlCreateLabel("Account Name", 10, 5, 130, 15)
    Guictrlcreatelabel("WeBBoT WeBSiTE", 10, 170, 130, 15)
    $web = guictrlcreateinput($5, 10, 185, 100, 20)
    $Input_1 = GUICtrlCreateInput($k, 10, 20, 100, 20)
    $key = GUICtrlcreateinput($keyz, 10, 225, 100, 20)
    GUICtrlCreateLabel("Password", 10, 45, 130, 15)
    GUICtrlCreateLabel("Home Channel", 10, 85, 130, 15)
    GUICtrlCreateLabel("Server", 10, 125, 130, 15)
    Guictrlcreatelabel("CD-Key", 10, 210, 130, 15)
    $chan = GUICTRLCREATEINPUT($l, 10, 100, 100, 20)
    $pass = GUICtrlCreateInput($m, 10, 60, 100, 20)
    $server = GUICtrlCreateInput($a, 10, 140, 100, 20)
    $Button_3 = GUICtrlCreateButton("Disconnect", 115, 40, 70, 24)
    $Button_1 = GUICtrlCreateButton("&Connect", 120, 10, 60, 24)
    $Edit_1 = GUICtrlCreateEdit("", 190, 30, 150, 185, BitOR($ES_AUTOVSCROLL, $ES_READONLY))
    $Label_3 = GUICtrlCreateLabel("Battle.Net Info", 215, 10, 130, 15)
    $Button_4 = GUICtrlCreateButton("Save and Exit", 190, 221, 151)
    GUISetState(@SW_SHOW)

    While 1
        $nMsg = GUIGetMsg()
        Select
            Case $nMsg = $Button_1
                GUICtrlSetData($Edit_1, "Connecting..." & @CRLF & "Connected!" & @CRLF & "[BNLS] Connecting..." & @CRLF & "[BNLS] Connected!" & @CRLF & "Sending Login Information..." & @CRLF & "Login Successful!")
            Case $nMsg = $GUI_EVENT_CLOSE
                Exit
            Case $nMsg = $Button_3
                GUIctrlsetdata($edit_1, "[BNET] Disconnected!")
            Case $nMsg = $Button_4
                $EDIT_READ = GUICtrlRead($Input_1)
                IniWrite(@ScriptDir & "\Config.ini", "Config", "Account", $EDIT_READ)
                Exit
            Case $nMsg = $pass
                $password = GUIctrlread($pass)
                Iniwrite(@Scriptdir & "\config.ini", "Config", "Password", $password)
                Exit
            Case $nMsg = $chan
                $homechan = Guictrlread($chan)
                iniwrite(@scriptdir & "\config.ini", "Config", "HomeChannel", $homechan)
            Case $nMsg = $server
                $servers = guictrlread($server)
                iniwrite(@scriptdir & "\config.ini", "config", "SetServer", $servers)
            Case $nMsg = $web
                $website = GUICtrlRead($web)
                iniwrite(@scriptdir & "\config.ini", "config", "WeBBoTSiTE", $website)
            Case $nMsg = $key
                $keys = GUIctrlread($key)
                iniwrite(@scriptdir & "\config.ini", "config", "CD-Key", $keys)
            Case $nMsg = $button_1
                Send("C")
Exitloop
Edited by Swift

Share this post


Link to post
Share on other sites

No, only for a loop.

Terminate a While/Do/For loop.

Share this post


Link to post
Share on other sites

Case $GUI_EVENT_CLOSE

Exit

PUT:

Case $GUI_EVENT_CLOSE

Exitloop

Share this post


Link to post
Share on other sites

still doesnt work my "highly skilled friend"...all it does is... you click it once...nothing happens...click it twice...it shuts down the whole program...

Share this post


Link to post
Share on other sites

woot with that exitloop you saved it 1 whole click!! yay.......if your going to post...try to be helpful...because what your saying does NOT work...new script:

#include <GuiConstants.au3>

$Gui = GuiCreate("Test", 390, 360)

$Edit = GUICtrlCreateEdit("", 10, 20, 240, 200, $GUI_SS_DEFAULT_EDIT+$ES_READONLY)

$Button_1 = GUICtrlCreateButton("Button 1", 30, 240, 70, 20)
$Button_2 = GUICtrlCreateButton("Button 2", 160, 240, 70, 20)
$menue = GuiCtrlCreateMenu("Bot")
$settings = Guictrlcreatemenu("Settings")
GUICtrlcreatemenuitem("Connect", $menue)
GUICtrlcreatemenuitem("Disconnect", $menue)
GUICtrlcreatemenuitem("", $menue)
GUICtrlCreateMenuItem("Userlist Manager", $menue)
GUICtrlCreateMenuItem("Custom Command Editor", $menue)
GUICtrlCreateMenuItem("User Monitor", $menue)
GUICtrlCreateMenuItem("Get News And Check For Updates", $menue)
GUICtrlCreateMenuItem("", $menue)
GUICtrlCreateMenuItem("Ignore Clan Invitations", $menue)
GUICtrlCreateMenuItem("", $menue)
GUICtrlCreateMenuItem("Quick Channels", $menue)
GUICtrlCreateMenuItem("Exit", $menue)
$botsettingsitem = GUICtrlCreateMenuItem("Bot Settings", $settings)
GUICtrlCreateMenuItem("Use UDF-8 Encoding/Decoding", $settings)
GUICtrlCreateMenuItem("", $settings)
GUICtrlCreateMenuItem("Edit Profile", $settings)
GUICtrlCreateMenuItem("Edit Chat Filters", $settings)
GUICtrlCreateMenuItem("Edit Catch Phrases", $settings)
GUICtrlCreateMenuItem("", $settings)
GUICtrlCreateMenuItem("View Caught Phrases", $settings)
GUICtrlCreateMenuItem("Edit Files...", $settings)
GUICtrlCreateMenuItem("", $settings)
GUICtrlCreateMenuItem("Reload Config", $settings)
GUICtrlCreateMenuItem("Reload Script", $settings)
$hi = GUICtrlCreateMenu("Connect")
GUICtrlCreateMenu("Disconnect")
$window = GUictrlcreatemenu("Window")
Guictrlcreatemenuitem("Toggle Join/Leave Messages", $window)
Guictrlcreatemenuitem("Toggle Chat Window Lock", $window)
Guictrlcreatemenuitem("Toggle Chat Filters", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Use Individual Whisper Windows", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Show Outgoing Whispers In Whisper Box", $window)
Guictrlcreatemenuitem("Hide Whispers In Main Window", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Logging Settings", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Clear Chat Window", $window)
Guictrlcreatemenuitem("Clear Whisper Window", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Flash Window On Events", $window)
Guictrlcreatemenuitem("Disable Void View", $window)
$help = guictrlcreatemenu("Help")
Guictrlcreatemenuitem("About...", $help)
Guictrlcreatemenuitem("Readme and Command List", $help)
Guictrlcreatemenuitem("Homepage", $help)

GUISetState()

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button_1, $Button_2
            $NewData = "Wellcome!"
            If $Msg = $Button_2 Then $NewData = "Hello!"
            
            $Read_Edit = GUICtrlRead($Edit)
            If $Read_Edit <> "" Then $NewData = @CRLF & $NewData
            
            GUICtrlSetData($Edit, $Read_Edit & $NewData)
            GUICtrlSendMsg($Edit, 0xB7, 0, 0)
            
        Case $botSettingsItem; <-- Add an exception for the menu item
            _Bot()
    EndSwitch
WEnd


Func _Bot() 

;;---Your Program below:
    $k = IniRead(@ScriptDir & "\Config.ini", "Config", "Account", "")
    $m = Iniread(@Scriptdir & "\config.ini", "config", "Password", "")
    $l = Iniread(@Scriptdir & "\config.ini", "config", "HomeChannel", "")
    $a = Iniread(@Scriptdir & "\config.ini", "config", "SetServer", "")
    $5 = iniread(@scriptdir & "\config.ini", "config", "WeBBoTSiTE", "")
    $keyz = iniread(@scriptdir & "\config.ini", "config", "CD-Key", "")



    $GUI = GUICreate($k & ", Online in channel Clan ByE", 390, 360, -1, -1)
    $Label_1 = GUICtrlCreateLabel("Account Name", 10, 5, 130, 15)
    Guictrlcreatelabel("WeBBoT WeBSiTE", 10, 170, 130, 15)
    $web = guictrlcreateinput($5, 10, 185, 100, 20)
    $Input_1 = GUICtrlCreateInput($k, 10, 20, 100, 20)
    $key = GUICtrlcreateinput($keyz, 10, 225, 100, 20)
    GUICtrlCreateLabel("Password", 10, 45, 130, 15)
    GUICtrlCreateLabel("Home Channel", 10, 85, 130, 15)
    GUICtrlCreateLabel("Server", 10, 125, 130, 15)
    Guictrlcreatelabel("CD-Key", 10, 210, 130, 15)
    $chan = GUICTRLCREATEINPUT($l, 10, 100, 100, 20)
    $pass = GUICtrlCreateInput($m, 10, 60, 100, 20)
    $server = GUICtrlCreateInput($a, 10, 140, 100, 20)
    $Button_3 = GUICtrlCreateButton("Disconnect", 115, 40, 70, 24)
    $Button_1 = GUICtrlCreateButton("&Connect", 120, 10, 60, 24)
    $Edit_1 = GUICtrlCreateEdit("", 190, 30, 150, 185, BitOR($ES_AUTOVSCROLL, $ES_READONLY))
    $Label_3 = GUICtrlCreateLabel("Battle.Net Info", 215, 10, 130, 15)
    $Button_4 = GUICtrlCreateButton("Save and Exit", 190, 221, 151)
    GUISetState(@SW_SHOW)

    While 1
        $nMsg = GUIGetMsg()
        Select
            Case $nMsg = $Button_1
                GUICtrlSetData($Edit_1, "Connecting..." & @CRLF & "Connected!" & @CRLF & "[BNLS] Connecting..." & @CRLF & "[BNLS] Connected!" & @CRLF & "Sending Login Information..." & @CRLF & "Login Successful!")
            Case $nMsg = $GUI_EVENT_CLOSE
                Exitloop
            Case $nMsg = $Button_3
                GUIctrlsetdata($edit_1, "[BNET] Disconnected!")
            Case $nMsg = $Button_4
                $EDIT_READ = GUICtrlRead($Input_1)
                IniWrite(@ScriptDir & "\Config.ini", "Config", "Account", $EDIT_READ)
                Exit
            Case $nMsg = $pass
                $password = GUIctrlread($pass)
                Iniwrite(@Scriptdir & "\config.ini", "Config", "Password", $password)
                Exit
            Case $nMsg = $chan
                $homechan = Guictrlread($chan)
                iniwrite(@scriptdir & "\config.ini", "Config", "HomeChannel", $homechan)
            Case $nMsg = $server
                $servers = guictrlread($server)
                iniwrite(@scriptdir & "\config.ini", "config", "SetServer", $servers)
            Case $nMsg = $web
                $website = GUICtrlRead($web)
                iniwrite(@scriptdir & "\config.ini", "config", "WeBBoTSiTE", $website)
            Case $nMsg = $key
                $keys = GUIctrlread($key)
                iniwrite(@scriptdir & "\config.ini", "config", "CD-Key", $keys)
            Case $nMsg = $button_1
                Send("C")
        EndSelect
    WEnd
EndFunc

thats the full program...still doesnt work as i want.

Share this post


Link to post
Share on other sites

I think the program is OK but what are you going to do with all the menus??

You know how to make the thing that are in the menu

This is going to be a complicated diablo bot?

I play diablo so I can help :)

(PM)


View my blog :) 3dude's blog <= help with project :S

Share this post


Link to post
Share on other sites

I got what you want!! (i Think ;D)

I Hope I Helped ya :)

#include <GuiConstants.au3>

$Settings = 0 ;settings window thing :D

$Gui = GuiCreate("Test", 390, 360)

$Edit = GUICtrlCreateEdit("", 10, 20, 240, 200, $GUI_SS_DEFAULT_EDIT+$ES_READONLY)

$Button_1 = GUICtrlCreateButton("Button 1", 30, 240, 70, 20)
$Button_2 = GUICtrlCreateButton("Button 2", 160, 240, 70, 20)
$menue = GuiCtrlCreateMenu("Bot")
$settings = Guictrlcreatemenu("Settings")
GUICtrlcreatemenuitem("Connect", $menue)
GUICtrlcreatemenuitem("Disconnect", $menue)
GUICtrlcreatemenuitem("", $menue)
GUICtrlCreateMenuItem("Userlist Manager", $menue)
GUICtrlCreateMenuItem("Custom Command Editor", $menue)
GUICtrlCreateMenuItem("User Monitor", $menue)
GUICtrlCreateMenuItem("Get News And Check For Updates", $menue)
GUICtrlCreateMenuItem("", $menue)
GUICtrlCreateMenuItem("Ignore Clan Invitations", $menue)
GUICtrlCreateMenuItem("", $menue)
GUICtrlCreateMenuItem("Quick Channels", $menue)
GUICtrlCreateMenuItem("Exit", $menue)
$botsettingsitem = GUICtrlCreateMenuItem("Bot Settings", $settings)
GUICtrlCreateMenuItem("Use UDF-8 Encoding/Decoding", $settings)
GUICtrlCreateMenuItem("", $settings)
GUICtrlCreateMenuItem("Edit Profile", $settings)
GUICtrlCreateMenuItem("Edit Chat Filters", $settings)
GUICtrlCreateMenuItem("Edit Catch Phrases", $settings)
GUICtrlCreateMenuItem("", $settings)
GUICtrlCreateMenuItem("View Caught Phrases", $settings)
GUICtrlCreateMenuItem("Edit Files...", $settings)
GUICtrlCreateMenuItem("", $settings)
GUICtrlCreateMenuItem("Reload Config", $settings)
GUICtrlCreateMenuItem("Reload Script", $settings)
$hi = GUICtrlCreateMenu("Connect")
GUICtrlCreateMenu("Disconnect")
$window = GUictrlcreatemenu("Window")
Guictrlcreatemenuitem("Toggle Join/Leave Messages", $window)
Guictrlcreatemenuitem("Toggle Chat Window Lock", $window)
Guictrlcreatemenuitem("Toggle Chat Filters", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Use Individual Whisper Windows", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Show Outgoing Whispers In Whisper Box", $window)
Guictrlcreatemenuitem("Hide Whispers In Main Window", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Logging Settings", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Clear Chat Window", $window)
Guictrlcreatemenuitem("Clear Whisper Window", $window)
Guictrlcreatemenuitem("", $window)
Guictrlcreatemenuitem("Flash Window On Events", $window)
Guictrlcreatemenuitem("Disable Void View", $window)
$help = guictrlcreatemenu("Help")
Guictrlcreatemenuitem("About...", $help)
Guictrlcreatemenuitem("Readme and Command List", $help)
Guictrlcreatemenuitem("Homepage", $help)

GUISetState()

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button_1, $Button_2
            $NewData = "Wellcome!"
            If $Msg = $Button_2 Then $NewData = "Hello!"
            
            $Read_Edit = GUICtrlRead($Edit)
            If $Read_Edit <> "" Then $NewData = @CRLF & $NewData
            
            GUICtrlSetData($Edit, $Read_Edit & $NewData)
            GUICtrlSendMsg($Edit, 0xB7, 0, 0)
            
        Case $botSettingsItem; <-- Add an exception for the menu item
            $Settings = 1 ;enable settings window loop
            _Bot()
    EndSwitch
WEnd


Func _Bot()

;;---Your Program below:
    $k = IniRead(@ScriptDir & "\Config.ini", "Config", "Account", "")
    $m = Iniread(@Scriptdir & "\config.ini", "config", "Password", "")
    $l = Iniread(@Scriptdir & "\config.ini", "config", "HomeChannel", "")
    $a = Iniread(@Scriptdir & "\config.ini", "config", "SetServer", "")
    $5 = iniread(@scriptdir & "\config.ini", "config", "WeBBoTSiTE", "")
    $keyz = iniread(@scriptdir & "\config.ini", "config", "CD-Key", "")



    $GUI = GUICreate($k & ", Online in channel Clan ByE", 390, 360, -1, -1)
    $Label_1 = GUICtrlCreateLabel("Account Name", 10, 5, 130, 15)
    Guictrlcreatelabel("WeBBoT WeBSiTE", 10, 170, 130, 15)
    $web = guictrlcreateinput($5, 10, 185, 100, 20)
    $Input_1 = GUICtrlCreateInput($k, 10, 20, 100, 20)
    $key = GUICtrlcreateinput($keyz, 10, 225, 100, 20)
    GUICtrlCreateLabel("Password", 10, 45, 130, 15)
    GUICtrlCreateLabel("Home Channel", 10, 85, 130, 15)
    GUICtrlCreateLabel("Server", 10, 125, 130, 15)
    Guictrlcreatelabel("CD-Key", 10, 210, 130, 15)
    $chan = GUICTRLCREATEINPUT($l, 10, 100, 100, 20)
    $pass = GUICtrlCreateInput($m, 10, 60, 100, 20)
    $server = GUICtrlCreateInput($a, 10, 140, 100, 20)
    $Button_3 = GUICtrlCreateButton("Disconnect", 115, 40, 70, 24)
    $Button_1 = GUICtrlCreateButton("&Connect", 120, 10, 60, 24)
    $Edit_1 = GUICtrlCreateEdit("", 190, 30, 150, 185, BitOR($ES_AUTOVSCROLL, $ES_READONLY))
    $Label_3 = GUICtrlCreateLabel("Battle.Net Info", 215, 10, 130, 15)
    $Button_4 = GUICtrlCreateButton("Save and Exit", 190, 221, 151)
    GUISetState(@SW_SHOW)
While $settings = 1 ;settings on
        $nMsg = GUIGetMsg()
        Select
            Case $nMsg = $Button_1
                GUICtrlSetData($Edit_1, "Connecting..." & @CRLF & "Connected!" & @CRLF & "[BNLS] Connecting..." & @CRLF & "[BNLS] Connected!" & @CRLF & "Sending Login Information..." & @CRLF & "Login Successful!")
            Case $nMsg = $GUI_EVENT_CLOSE
                GUIDelete($k & ", Online in channel Clan ByE") ;delete settings window
                $Settings = 0 ;turn off settings
            Case $nMsg = $Button_3
                GUIctrlsetdata($edit_1, "[BNET] Disconnected!")
            Case $nMsg = $Button_4
                $EDIT_READ = GUICtrlRead($Input_1)
                IniWrite(@ScriptDir & "\Config.ini", "Config", "Account", $EDIT_READ)
                Exit
            Case $nMsg = $pass
                $password = GUIctrlread($pass)
                Iniwrite(@Scriptdir & "\config.ini", "Config", "Password", $password)
                Exit
            Case $nMsg = $chan
                $homechan = Guictrlread($chan)
                iniwrite(@scriptdir & "\config.ini", "Config", "HomeChannel", $homechan)
            Case $nMsg = $server
                $servers = guictrlread($server)
                iniwrite(@scriptdir & "\config.ini", "config", "SetServer", $servers)
            Case $nMsg = $web
                $website = GUICtrlRead($web)
                iniwrite(@scriptdir & "\config.ini", "config", "WeBBoTSiTE", $website)
            Case $nMsg = $key
                $keys = GUIctrlread($key)
                iniwrite(@scriptdir & "\config.ini", "config", "CD-Key", $keys)
            Case $nMsg = $button_1
                Send("C")
            EndSelect
WEnd
EndFunc

Share this post


Link to post
Share on other sites

Isn't that the same!? (i don't know :P )

I don't know what swift wants but...

This is a big program with many things!

I hope he know how to make those buttons do the things that they have to do!

(need help PM :blink: )

:)


View my blog :) 3dude's blog <= help with project :S

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