Sign in to follow this  
Followers 0
ulti

tabs wont work

4 posts in this topic

i have a problem with my tabs

my ui has 4 tabs i have ony placed things on 2 of them

wen i run this script insted of running in new tabs it ope2s 2 seperate guis and on neather one of them bot tabs functions work properly i think i have just made big mistake some whare all tho i cant c whare i went rong.

#Tidy_Parameters = /pr 1 /tc 0 /gd 0 /rels 1 /sci 1
#include <GUIConstants.au3>
#include <GDIPlus.au3>
#include <WinAPI.au3>
#include <GUIConstants.au3>
#include <Constants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#Include <GuiListView.au3>
#Include <Misc.au3>

Opt('GUIEventOptions',0)
Opt('TrayOnEventMode',1)
Opt('TrayMenuMode',1)
#Tidy_Parameters = /pr 1 /tc 0 /gd 0 /rels 1 /sci 1
Opt("WinTitleMatchMode", 3)
#include <GUIConstants.au3>
#Include <Misc.au3>

AutoItSetOption("WinTitleMatchMode", 4)


Global $SetWin = 0, $Loop = 0, $OldSelect, $Casted = 0, $Sec = 28, $Timer, $SLeft, $SRight, $STop, $SBottom
Global $Splash = 0xF6F6F6, $Red = -1


$Form1_1 = GUICreate("BG-Bot Elite", 471, 300, -1, -1)


; TAB
GuiCtrlCreateTab(0, 0, 471, 300)

GUICtrlCreatePic("C:\Program Files\bg bot elite\images\gui back.jpg", 3, 24, 460, 248)
GuiCtrlSetState(-1,$GUI_DISABLE)

                ; TAB Bg Bot ; <------- one of the tabs 
GuiCtrlCreateTabItem("Bg Bot")
GuiCtrlSetState(-1,$GUI_ONTOP)
GUICtrlSetFont(-1, 14, 800, 0, "folkard")
GUICtrlSetColor (-1, 0x571B7e)


$WSG = GUICtrlCreateButton("Warsong Gulch", 8, 32, 110, 40, $BS_BITMAP)
GUICtrlSetImage ($WSG, "C:\Program Files\bg bot elite\images\TONWSG.bmp") 

$AV = GUICtrlCreateButton("Alterac Valley", 122, 32, 110, 40, $BS_BITMAP)
GUICtrlSetImage ($AV, "C:\Program Files\bg bot elite\images\TONAV.bmp") 
$AB = GUICtrlCreateButton("Arathi Basin", 237, 32, 110, 40, $BS_BITMAP)
GUICtrlSetImage ($AB, "C:\Program Files\bg bot elite\images\TONAB.bmp") 
$EOTS = GUICtrlCreateButton("Eye of the Storm", 351, 32, 110, 40, $BS_BITMAP)
GUICtrlSetImage ($EOTS, "C:\Program Files\bg bot elite\images\TONEOTS.bmp") 

$click2 = GUICtrlCreateButton("Auto swing ", 8, 230, 110, 40, $BS_BITMAP)
GUICtrlSetImage ($click2, "C:\Program Files\bg bot elite\images\TONAS.bmp") 
$click3 = GUICtrlCreateButton("Anti AFK", 122, 230, 110, 40, $BS_BITMAP)
GUICtrlSetImage ($click3, "C:\Program Files\bg bot elite\images\TONAFK.bmp") 
$click4 = GUICtrlCreateButton("Class Ability", 237, 230, 110, 40, $BS_BITMAP)
GUICtrlSetImage ($click4, "C:\Program Files\bg bot elite\images\TONCA.bmp") 
$mouseclks = GUICtrlCreateButton("Auto Mouse", 351, 230, 110, 40, $BS_BITMAP)
GUICtrlSetImage ($mouseclks, "C:\Program Files\bg bot elite\images\TONAM.bmp") 

$Alloff = GUICtrlCreateButton("stop all", 410, 130, 32, 32, $BS_ICON)
GUICtrlSetImage($Alloff, "shell32.dll", 28)
GUISetState(@SW_SHOW)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                ExitLoop
            Case $alloff
                    GUICtrlSetImage ($WSG, "C:\Program Files\bg bot elite\images\TONWSG.bmp")
                    GUICtrlSetImage ($AV, "C:\Program Files\bg bot elite\images\TONAV.bmp")
                    GUICtrlSetImage ($AB, "C:\Program Files\bg bot elite\images\TONAB.bmp")
                    GUICtrlSetImage ($EOTS, "C:\Program Files\bg bot elite\images\TONEOTS.bmp")
                    GUICtrlSetImage ($click2, "C:\Program Files\bg bot elite\images\TONAS.bmp")
                    GUICtrlSetImage ($click3, "C:\Program Files\bg bot elite\images\TONAFK.bmp") 
                    GUICtrlSetImage ($click4, "C:\Program Files\bg bot elite\images\TONCA.bmp")
                    GUICtrlSetImage ($mouseclks, "C:\Program Files\bg bot elite\images\TONAM.bmp") 
                    ProcessClose ( "muti folo ai.exe")
                    TrayItemDelete ( "muti folo ai.exe" )
                    ProcessClose ( "av folo ai.exe")
                    TrayItemDelete ( "av folo ai.exe" )
                    ProcessClose ( "click mouse.exe")
                    trayItemDelete ( "click mouse.exe" )
                    ProcessClose ( "class sp atack.exe")
                    TrayItemDelete ( "class sp atack.exe" )
                    ProcessClose ( "antiafk.exe")
                    TrayItemDelete ( "antiafk.exe" )
                    ProcessClose ( "ck 2 ato swng.exe")
                    TrayItemDelete ( "ck 2 ato swng.exe" )
            Case $WSG
                 If ProcessExists("muti folo ai.exe") Then
                    ProcessClose("muti folo ai.exe")
                    GUICtrlSetData($WSG, "Warsong Gulch")
                    GUICtrlSetImage ($WSG, "C:\Program Files\bg bot elite\images\TONWSG.bmp")
                    
                Else
                    Run("muti folo ai.exe")
                    GUICtrlSetData($WSG, "Turn off WSG")
                    GUICtrlSetImage ($WSG, "C:\Program Files\bg bot elite\images\TOFFWSG.bmp")
                EndIf
            Case $AV
                 If ProcessExists("av folo ai.exe") Then
                    ProcessClose("av folo ai.exe")
                    GUICtrlSetData($AV, "Alterac Valley")
                    GUICtrlSetImage ($AV, "C:\Program Files\bg bot elite\images\TONAV.bmp")
                Else
                    Run("av folo ai.exe")
                    GUICtrlSetData($AV, "Turn off AV")
                    GUICtrlSetImage ($AV, "C:\Program Files\bg bot elite\images\TOFFAV.bmp")
                EndIf
            Case $AB
                 If ProcessExists("muti folo ai.exe") Then
                    ProcessClose("muti folo ai.exe")
                    GUICtrlSetData($AB, "Arathi Basin")
                    GUICtrlSetImage ($AB, "C:\Program Files\bg bot elite\images\TONAB.bmp")
                Else
                    Run("muti folo ai.exe")
                    GUICtrlSetData($AB, "Turn off AB")
                    GUICtrlSetImage ($AB, "C:\Program Files\bg bot elite\images\TOFFAB.bmp")
                EndIf
            Case $EOTS
                 If ProcessExists("muti folo ai.exe") Then
                    ProcessClose("muti folo ai.exe")
                    GUICtrlSetData($EOTS, "Eye of the Storm")
                    GUICtrlSetImage ($EOTS, "C:\Program Files\bg bot elite\images\TONEOTS.bmp")
                Else
                    Run("muti folo ai.exe")
                    GUICtrlSetData($EOTS, "Turn off EOTS")
                    GUICtrlSetImage ($EOTS, "C:\Program Files\bg bot elite\images\TOFFEOTS.bmp")
                EndIf
            Case $click2
                 If ProcessExists("ck 2 ato swng.exe") Then
                    ProcessClose("ck 2 ato swng.exe")
                    GUICtrlSetData($click2, "Auto Swing")
                    GUICtrlSetImage ($click2, "C:\Program Files\bg bot elite\images\Bmp\TONAS.bmp")
                Else
                    Run("ck 2 ato swng.exe")
                    GUICtrlSetData($click2, "Turn off A Swing")
                    GUICtrlSetImage ($click2, "C:\Program Files\bg bot elite\images\TOFFAS.bmp")
                EndIf
            Case $click3
                If ProcessExists("antiafk.exe") Then
                    ProcessClose("antiafk.exe")
                    GUICtrlSetData($click3, "Anti AFK")
                    GUICtrlSetImage ($click3, "C:\Program Files\bg bot elite\images\TONAFK.bmp") 
                Else
                    Run("antiafk.exe")
                    GUICtrlSetData($click3, "Turn off AFK")
                    GUICtrlSetImage ($click3, "C:\Program Files\bg bot elite\images\TOFFAFK.bmp") 
                EndIf
            Case $click4
                 If ProcessExists("class sp atack.exe") Then
                    ProcessClose("class sp atack.exe")
                    GUICtrlSetData($click4, "Class Ability")
                    GUICtrlSetImage ($click4, "C:\Program Files\bg bot elite\images\TONCA.bmp")
                Else
                    Run("class sp atack.exe")
                    GUICtrlSetData($click4, "Turn off Class A")
                    GUICtrlSetImage ($click4, "C:\Program Files\bg bot elite\images\TOFFCA.bmp")
                EndIf                
            Case $mouseclks
                 If ProcessExists("click mouse.exe") Then
                    ProcessClose("click mouse.exe")
                    GUICtrlSetData($mouseclks, "Auto Mouse")
                    GUICtrlSetImage ($mouseclks, "C:\Program Files\bg bot elite\images\TONAM.bmp") 
                Else
                    Run("click mouse.exe")
                    GUICtrlSetData($mouseclks, "Turn off Mouse")
                    GUICtrlSetImage ($mouseclks, "C:\Program Files\bg bot elite\images\TOFFAM.bmp")
                EndIf
                
            
            
        EndSwitch
    WEnd

                ; TAB 2 <------------- the second tab
GuiCtrlCreateTabItem("Two")
GuiCtrlSetState(-1,$GUI_show)
GUICtrlCreatePic("C:\Program Files\bg bot elite\images\tab2.jpg", 3, 24, 460, 248)
GuiCtrlSetState(-1,$GUI_DISABLE)
$RedPreview = GUICtrlCreateLabel("Please Select A Color!", 30, 265, 100, 75, -1)
GUICtrlSetBkColor($RedPreview, -1)
$SplashPreview = GUICtrlCreateLabel("", 130, 265, 100, 75, -1)
GUICtrlSetBkColor($SplashPreview, $Splash)
$ColorSelect = GUICtrlCreateCombo("", 10, 240, 205, 25)
GUICtrlSetData($ColorSelect, IniRead("Colors.ini", "Standard", "List", Default))
GUICtrlSetColor($ColorSelect, 0x800080)
$Start = GUICtrlCreateButton("Start", 10, 35, 100, 25, 0)
$STop = GUICtrlCreateButton("Stop", 115, 35, 100, 25, 0)
GUISetState(@SW_SHOW)
Global $MaxTime = $Sec * 1000
While 1
    GUI()
    Sleep(5)
WEnd



Func Bot()
    WinActivate("World of Warcraft")
    WinWaitActive("World of Warcraft")
    Sleep(3000)
    Local $WindowPosition = WinGetPos("World of Warcraft")
    Local $BHeight = 23
    Local $BWidth = 4
    $ScreenSize = WinGetClientSize("World of Warcraft")
    ReDim $ScreenSize[4]
    $ScreenSize[2] = $WindowPosition[0] + $BWidth
    $ScreenSize[3] = $WindowPosition[1] + $BHeight
    $Top = $ScreenSize[3] + (.15 * $ScreenSize[1])
    $Bottom = $Top + (.40 * $ScreenSize[1]) - 1
    $Left = $ScreenSize[2] + (.05 * $ScreenSize[0])
    $Right = $Left + $ScreenSize[0] - (.10 * 2.0 * $ScreenSize[0]) - 1
    MouseMove($Left, $Top, 2)
    MouseMove($Right, $Top, 2)
    MouseMove($Right, $Bottom, 2)
    MouseMove($Left, $Bottom, 2)
    Do
        While $Loop = 1
            $Timer = TimerInit()
            MouseMove(0, 0, 0)
            Send("{SPACE}8")
            Sleep(2000)
            Send("1")
            Sleep(3000)
            Do
                GUI()
                Sleep(5)
                $BobberPos = PixelSearch($Left, $Top, $Right, $Bottom, $Red, 10, 3)
                CheckTimer(@error)
            Until @error <> 1
            If IsArray($BobberPos) Then
                MouseMove($BobberPos[0], $BobberPos[1], 5)
                $SLeft = $BobberPos[0] - 35
                $SRight = $SLeft + 60
                $STop = $BobberPos[1] - 35
                $SBottom = $STop + 65
            EndIf
            Sleep(1000)
            Do
                GUI()
                Sleep(5)
                $SplashPos = PixelSearch($SLeft, $STop, $SRight, $SBottom, $Splash, 20, 2)
                CheckTimer(@error)
            Until @error <> 1
            If IsArray($SplashPos) Then MouseClick("right", $SplashPos[0], $SplashPos[1], 1, 0)
            Sleep(3000)
        WEnd
    Until $Loop = 0
EndFunc  ;==>Bot
Func Window()
    Local $Old = $SetWin
    Select
        Case WinExists("World of Warcraft") And WinGetProcess("World of Warcraft") = ProcessExists("WoW.exe")
            $SetWin = 1
    EndSelect
EndFunc  ;==>Window
Func CheckTimer($PixelError)
    If TimerDiff($Timer) >= $MaxTime Then
        SetError(0)
        Return -1
    EndIf
    SetError($PixelError)
EndFunc  ;==>CheckTimer
Func GUI()
    Local $Msg = GUIGetMsg()
    Select
        Case $Msg = $GUI_EVENT_CLOSE
            MsgBox(0, "Exit...", "Thank you for using World of Warcraft Fisher!")
            GUIDelete($FishGUI)
            Exit
        Case _IsPressed("1B") And $Loop = 1 Or $Msg = $STop And $Loop = 1
            $Loop = 0
            WinActivate("World of Warcraft Fisher")
            WinWaitActive("World of Warcraft Fisher")
            MsgBox(0, "World of Warcraft", "Fisher has stopped.")
        Case $Msg = $Start And $Loop = 0
            $Loop = 1
            Select
                Case $Red = -1
                    MsgBox(16, "Error", "Please select a color first.")
                Case Else
                    Bot()
            EndSelect
        Case $OldSelect <> GUICtrlRead($ColorSelect) And $Msg = $ColorSelect
            $OldSelect = GUICtrlRead($ColorSelect)
            GUICtrlSetBkColor($RedPreview, IniRead("Colors.ini", "Standard", $OldSelect, -1))
            GUICtrlSetData($RedPreview, "")
            $Red = IniRead("Colors.ini", "Standard", $OldSelect, -1)
    EndSelect
    Window()
EndFunc  ;==>GUI


                ; TAB 3
GuiCtrlCreateTabItem("Three")
GUICtrlCreatePic("C:\Program Files\bg bot elite\images\tab3.jpg", 3, 24, 460, 248)
GuiCtrlSetState(-1,$GUI_DISABLE)

                ; TAB welcome
GuiCtrlCreateTabItem("welcome")
GUICtrlCreatePic("C:\Program Files\bg bot elite\images\tab4.bmp", 3, 24, 460, 248)
GuiCtrlSetState(-1,$GUI_DISABLE)

why are they opening seperatly and why isnt it working in one window hmmm im going to keep trying but if any one can offer any solutions id be realy happy and greatfull.

Share this post


Link to post
Share on other sites



@ulti...You don't need the second while loop. The reason why you are not able to click on the tabs is because you are creating a picture rite over the tab item.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

i can c the tabs fine i only have a problem haveing the to tabs scripts running at the same time wen they both will run fine on there seperate tab if the other isnt running.

works the same with or with out images.

is there another way i can phrase this to fit in to the other scripts loop? so they dont conflict each other.

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                ExitLoop               
                    Case $alloff
                    GUICtrlSetImage ($WSG, "C:\Program Files\bg bot elite\images\TONWSG.bmp")
                    GUICtrlSetImage ($AV, "C:\Program Files\bg bot elite\images\TONAV.bmp")
                    GUICtrlSetImage ($AB, "C:\Program Files\bg bot elite\images\TONAB.bmp")
                    GUICtrlSetImage ($EOTS, "C:\Program Files\bg bot elite\images\TONEOTS.bmp")
                    GUICtrlSetImage ($click2, "C:\Program Files\bg bot elite\images\TONAS.bmp")
                    GUICtrlSetImage ($click3, "C:\Program Files\bg bot elite\images\TONAFK.bmp") 
                    GUICtrlSetImage ($click4, "C:\Program Files\bg bot elite\images\TONCA.bmp")
                    GUICtrlSetImage ($mouseclks, "C:\Program Files\bg bot elite\images\TONAM.bmp") 
                    ProcessClose ( "muti folo ai.exe")
                    TrayItemDelete ( "muti folo ai.exe" )
                    ProcessClose ( "av folo ai.exe")
                    TrayItemDelete ( "av folo ai.exe" )
                    ProcessClose ( "click mouse.exe")
                    trayItemDelete ( "click mouse.exe" )
                    ProcessClose ( "class sp atack.exe")
                    TrayItemDelete ( "class sp atack.exe" )
                    ProcessClose ( "antiafk.exe")
                    TrayItemDelete ( "antiafk.exe" )
                    ProcessClose ( "ck 2 ato swng.exe")
                    TrayItemDelete ( "ck 2 ato swng.exe" )
            Case $WSG
                 If ProcessExists("muti folo ai.exe") Then
                    ProcessClose("muti folo ai.exe")
                    GUICtrlSetData($WSG, "Warsong Gulch")
                    GUICtrlSetImage ($WSG, "C:\Program Files\bg bot elite\images\TONWSG.bmp")
                    
                Else
                    Run("muti folo ai.exe")
                    GUICtrlSetData($WSG, "Turn off WSG")
                    GUICtrlSetImage ($WSG, "C:\Program Files\bg bot elite\images\TOFFWSG.bmp")
                EndIf
            Case $AV
                 If ProcessExists("av folo ai.exe") Then
                    ProcessClose("av folo ai.exe")
                    GUICtrlSetData($AV, "Alterac Valley")
                    GUICtrlSetImage ($AV, "C:\Program Files\bg bot elite\images\TONAV.bmp")
                Else
                    Run("av folo ai.exe")
                    GUICtrlSetData($AV, "Turn off AV")
                    GUICtrlSetImage ($AV, "C:\Program Files\bg bot elite\images\TOFFAV.bmp")
                EndIf
            Case $AB
                 If ProcessExists("muti folo ai.exe") Then
                    ProcessClose("muti folo ai.exe")
                    GUICtrlSetData($AB, "Arathi Basin")
                    GUICtrlSetImage ($AB, "C:\Program Files\bg bot elite\images\TONAB.bmp")
                Else
                    Run("muti folo ai.exe")
                    GUICtrlSetData($AB, "Turn off AB")
                    GUICtrlSetImage ($AB, "C:\Program Files\bg bot elite\images\TOFFAB.bmp")
                EndIf
            Case $EOTS
                 If ProcessExists("muti folo ai.exe") Then
                    ProcessClose("muti folo ai.exe")
                    GUICtrlSetData($EOTS, "Eye of the Storm")
                    GUICtrlSetImage ($EOTS, "C:\Program Files\bg bot elite\images\TONEOTS.bmp")
                Else
                    Run("muti folo ai.exe")
                    GUICtrlSetData($EOTS, "Turn off EOTS")
                    GUICtrlSetImage ($EOTS, "C:\Program Files\bg bot elite\images\TOFFEOTS.bmp")
                EndIf
            Case $click2
                 If ProcessExists("ck 2 ato swng.exe") Then
                    ProcessClose("ck 2 ato swng.exe")
                    GUICtrlSetData($click2, "Auto Swing")
                    GUICtrlSetImage ($click2, "C:\Program Files\bg bot elite\images\Bmp\TONAS.bmp")
                Else
                    Run("ck 2 ato swng.exe")
                    GUICtrlSetData($click2, "Turn off A Swing")
                    GUICtrlSetImage ($click2, "C:\Program Files\bg bot elite\images\TOFFAS.bmp")
                EndIf
            Case $click3
                If ProcessExists("antiafk.exe") Then
                    ProcessClose("antiafk.exe")
                    GUICtrlSetData($click3, "Anti AFK")
                    GUICtrlSetImage ($click3, "C:\Program Files\bg bot elite\images\TONAFK.bmp") 
                Else
                    Run("antiafk.exe")
                    GUICtrlSetData($click3, "Turn off AFK")
                    GUICtrlSetImage ($click3, "C:\Program Files\bg bot elite\images\TOFFAFK.bmp") 
                EndIf
            Case $click4
                 If ProcessExists("class sp atack.exe") Then
                    ProcessClose("class sp atack.exe")
                    GUICtrlSetData($click4, "Class Ability")
                    GUICtrlSetImage ($click4, "C:\Program Files\bg bot elite\images\TONCA.bmp")
                Else
                    Run("class sp atack.exe")
                    GUICtrlSetData($click4, "Turn off Class A")
                    GUICtrlSetImage ($click4, "C:\Program Files\bg bot elite\images\TOFFCA.bmp")
                EndIf                
            Case $mouseclks
                 If ProcessExists("click mouse.exe") Then
                    ProcessClose("click mouse.exe")
                    GUICtrlSetData($mouseclks, "Auto Mouse")
                    GUICtrlSetImage ($mouseclks, "C:\Program Files\bg bot elite\images\TONAM.bmp") 
                Else
                    Run("click mouse.exe")
                    GUICtrlSetData($mouseclks, "Turn off Mouse")
                    GUICtrlSetImage ($mouseclks, "C:\Program Files\bg bot elite\images\TOFFAM.bmp")
                EndIf
                
            
            
        EndSwitch
    WEnd
EndFunc
Edited by ulti

Share this post


Link to post
Share on other sites

OMG lol i was over looking a diference between the 2 scripts Case $Msg = just fixed the descrepancys then works great

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