Jump to content

Tabs in tab??


Recommended Posts

  • Replies 42
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Okey, this is pretty much what i'd like to acomplish

Posted Image

So I found difficulites setting a tab window in a tab... for example...

(this is what i call a tab window(GUICtrlCreateTab(0,0,500)) and this is a tab(GUICtrlCreateTabItem("test1")))

GUICtrlCreateTab(0,0,500)
    GUICtrlCreateTabItem("Hero")
        GUICtrlCreateTab(0,0,100,100)
            GUICtrlCreateTabItem("test1")
            GUICtrlCreateTabItem("test2") ;instead these 2 tabs jumped to the main tab...
        GUICtrlCreateTabItem("Announcment")
        GUICtrlCreateTabItem("Taunt")

i also found difficulites adding another tab window outside the tabs...

GUICtrlCreateTab(0,0,500)
    GUICtrlCreateTabItem("Hero")
        GUICtrlCreateTab(0,0,500)
        GUICtrlCreateTabItem("Announcment")
        GUICtrlCreateTabItem("Taunt")
    GUICtrlCreateTabItem("") ;this should stop items and stuff to come inside the tabs...
GUICtrlCreateTab(0,0,500,200)
    GUICtrlCreateTabItem("anothertest1")
    GUICtrlCreateTabItem("anothertest2") ;but still these 3 tabs jump into the first tab window...
    GUICtrlCreateTabItem("anothertest3")
Link to comment
Share on other sites

I think this approach may solve your problem

; Create GUI

$hGUI = GUICreate("(UDF Created) Tab Control Create", 400, 300)

$hTab = _GUICtrlTab_Create($hGUI, 2, 2, 396, 296)

GUISetState()

; Add tabs

_GUICtrlTab_InsertItem($hTab, 0, "Tab 1")

_GUICtrlTab_InsertItem($hTab, 1, "Tab 2")

_GUICtrlTab_InsertItem($hTab, 2, "Tab 3")

$hTab1 = _GUICtrlTab_Create($hTab, 30, 30, 300, 200)

_GUICtrlTab_InsertItem($hTab1, 1, "Tab 1.1")

_GUICtrlTab_InsertItem($hTab1, 1, "Tab 1.2")

; Loop until user exits

Do

Until GUIGetMsg() = $GUI_EVENT_CLOSE

GUIDelete()

Link to comment
Share on other sites

Careful with this thread because it is close to breaking forum rules.

For me it looks like you are trying to make a bot or a trainer of some sort.

I won't report the thread at this point because I can't be 100% sure.

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

I think this approach may solve your problem

; Create GUI

$hGUI = GUICreate("(UDF Created) Tab Control Create", 400, 300)

$hTab = _GUICtrlTab_Create($hGUI, 2, 2, 396, 296)

GUISetState()

; Add tabs

_GUICtrlTab_InsertItem($hTab, 0, "Tab 1")

_GUICtrlTab_InsertItem($hTab, 1, "Tab 2")

_GUICtrlTab_InsertItem($hTab, 2, "Tab 3")

$hTab1 = _GUICtrlTab_Create($hTab, 30, 30, 300, 200)

_GUICtrlTab_InsertItem($hTab1, 1, "Tab 1.1")

_GUICtrlTab_InsertItem($hTab1, 1, "Tab 1.2")

; Loop until user exits

Do

Until GUIGetMsg() = $GUI_EVENT_CLOSE

GUIDelete()

thanks man, but how do i insert items, like button and stuff into the tabs?? O.o' sorry if i'm bad, but i did check but couldn't find anything

Careful with this thread because it is close to breaking forum rules.

For me it looks like you are trying to make a bot or a trainer of some sort.

I won't report the thread at this point because I can't be 100% sure.

;o is it illegal to make bots?? lol didn't know that... well that's not what i'm dng anyway... i'll make sure to show u my creation when i'm finished if u'd like??

Edited by Wiggyboy
Link to comment
Share on other sites

Why doesn't $herotab show up... it's child of $hero so when i'm on that tab it should show up right??

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <GUIConstants.au3>
#include <EditConstants.au3>
#Include <GuiTab.au3>

$gui = GUICreate("CustomIt",500,300)
    $maintab = _GUICtrlTab_Create($gui,0,0,500)
        $hero = _GUICtrlTab_InsertItem($maintab,0,"Hero")
            $herotab = _GUICtrlTab_Create($hero,110,25,500)
                $althero = _GUICtrlTab_InsertItem($herotab,0,"Alt hero")
                $altrec = _GUICtrlTab_InsertItem($herotab,1,"Recommended")
        _GUICtrlTab_InsertItem($maintab,1,"Annoncer")
        _GUICtrlTab_InsertItem($maintab,2,"Taunt")
GUISetState(@SW_SHOW)
While 1
    $trigger = GUIGetMsg()
    If $trigger = $GUI_EVENT_CLOSE Then Exit
WEnd
Link to comment
Share on other sites

Is this for a game? if i were you i will try to be smarter than that.. :)

EDIT: Don`t try to be a Hero walking on the razor edge of the explicitness. The mods around here don`t like that attitude...

Cut off the game and remove the "bad words" and then i will help you

Edited by monoscout999
Link to comment
Share on other sites

Is this for a game? if i were you i will try to be smarter than that.. :)

EDIT: Don`t try to be a Hero walking on the razor edge of the explicitness. The mods around here don`t like that attitude...

Cut off the game and remove the "bad words" and then i will help you

I'm sorry but i don't rly think i'm understanding ur point??

Edit: i'm totally lost now O.o' 1. i don't know what kind of "attitude" ur imagening so i can't do much about it... and this stuff about razor edge?? i have no idea what that means... sorry might be my english who causes that... and cut of the game? what u mean??, and which bad words??

and yes it's and application for a game, or more like an application for modifying the game... and it's legal, such software's like this already exist, but for some reasons those applications just crash after a few secounds on my PC, so i thought i could make my own...

Edited by Wiggyboy
Link to comment
Share on other sites

I'm sorry but i don't rly think i'm understanding ur point??

Edit: i'm totally lost now O.o' 1. i don't know what kind of "attitude" ur imagening so i can't do much about it... and this stuff about razor edge?? i have no idea what that means... sorry might be my english who causes that... and cut of the game? what u mean??, and which bad words??

and yes it's and application for a game, or more like an application for modifying the game... and it's legal, such software's like this already exist, but for some reasons those applications just crash after a few secounds on my PC, so i thought i could make my own...

the problem is that here we don`t talk about games. I will try to find the solution of your problem because is about design, but get for sure, this thread will be looked.

EDIT about your topic,

You are using a Zero Based Index value when you have to use a window handle to set as parent for the new Tab

Edited by monoscout999
Link to comment
Share on other sites

the problem is that here we don`t talk about games. I will try to find the solution of your problem because is about design, but get for sure, this thread will be looked.

I'm sorry but i still don't think i get ur point...

1. I never mentioned "game" before u did...

2. I thought here u helped or "talk" about Au3, and that's what i'm been talking about... but my apologies if ur suppose to talk about something else...

3. What does this have to do with a game anyway?, if i ask u or people here to help "me" out with "my" au3 script, wouldn't u help me just becouse it's designed or created for a game?

4. I'm gratefull that ur helping me, and please don't imagen any stupid attitude or voice, cuz i don't mean to harm any1

Link to comment
Share on other sites

EDIT about your topic,

You are using a Zero Based Index value when you have to use a window handle to set as parent for the new Tab

okey, do u have any suggestion on how i could get it to work the way i thought it was??? or how i can put the tabs in the correct index cuz i'm rly confused...

Link to comment
Share on other sites

I'm sorry but i still don't think i get ur point...

1. I never mentioned "game" before u did...

2. I thought here u helped or "talk" about Au3, and that's what i'm been talking about... but my apologies if ur suppose to talk about something else...

3. What does this have to do with a game anyway?, if i ask u or people here to help "me" out with "my" au3 script, wouldn't u help me just becouse it's designed or created for a game?

4. I'm gratefull that ur helping me, and please don't imagen any stupid attitude or voice, cuz i don't mean to harm any1

For all your points... just look around the forum to see how a post with a script with a word "hero" like yours ends. nothing personal is the forum rules and have some logic to be that way. What do you think about that?

About your scripting problem, read carefully about GuiSwitch() function in the help file, i never use it before but it seems that do the trick.

Link to comment
Share on other sites

For all your points... just look around the forum to see how a post with a script with a word "hero" like yours ends. nothing personal is the forum rules and have some logic to be that way. What do you think about that?

About your scripting problem, read carefully about GuiSwitch() function in the help file, i never use it before but it seems that do the trick.

I'm not very sure i understand it, i've read it over and over again, tried different ways but i don't understand how it works... could u be kind and explain it to me?

Edited by Wiggyboy
Link to comment
Share on other sites

It seems that i went wrong.. Sorry but i don`t have any idea or how add a control to a specific TabItem... native autoit functions can add buttons, labels, edits, etc. controls to each tab, but when i use _GUICtrlTab_Create() i don`t have any clue.

I think that you can create differents windows with different controls and when a tab is selected you can hide the current window and unhide a specific window.

Edited by monoscout999
Link to comment
Share on other sites

It seems that i went wrong.. Sorry but i don`t have any idea or how add a control to a specific TabItem... native autoit functions can add buttons, labels, edits, etc. controls to each tab, but when i use _GUICtrlTab_Create() i don`t have any clue.

I think that you can create differents windows with different controls and when a tab is selected you can hide the current window and unhide a specific window.

i'm afraid i'm not following u

Link to comment
Share on other sites

Did you really dont understand me? because i have a poor english domain, maybe you don`t put any effort on trying to understand me, sooo what is the game now?

Here you got your script problem solve.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiTab.au3>

$hGUI = GUICreate("(UDF Created) Tab Control Create", 600, 400)
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
$hTab1 = _GUICtrlTab_Create($hGUI, 10, 10, 580, 250)
$item11 = _GUICtrlTab_InsertItem($hTab1, 1, "Item 1-1")
$item12 = _GUICtrlTab_InsertItem($hTab1, 2, "Item 1-2")
$item13 = _GUICtrlTab_InsertItem($hTab1, 3, "Item 1-3")
$ChildGui1 = GUICreate("Item 1", 560, 220, 20, 35, $WS_POPUP, $WS_EX_MDICHILD, $hGUI)
$iTab = GuiCtrlCreateTab(110, 10, 450, 210)
$hTab2 = GuiCtrlGetHandle($iTab) ; You will need this to recognize this tab from the WM_NOTIFY
$item21 = GuiCtrlCreateTabItem("Tab 2-1")
GuiCtrlCreatebutton("Test",120,50,150,20)
$item22 = GuiCtrlCreateTabItem("Tab 2-2")
$item23 = GuiCtrlCreateTabItem("Tab 2-3")
GuiCtrlCreateTabItem("")
GUISetState(@SW_SHOW, $hGUI)
GUISetState(@SW_SHOW, $ChildGui1)

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE


Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg, $iwParam
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndTab
    $tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    Switch $hWndFrom
        case $hTab1
            Switch $iCode
                Case $TCN_SELCHANGE; The Selected Tab has change
                    $CurSel = _GUICtrlTab_GetCurSel($hWndFrom)
                    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $CurSel = ' & $CurSel & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
                    Switch $CurSel
                        Case $item11
                            GUISetState(@SW_SHOW, $ChildGui1)
                            Return $GUI_RUNDEFMSG
                        Case $item12
                            GUISetState(@SW_HIDE, $ChildGui1)
                            Return $GUI_RUNDEFMSG
                        Case $item13
                            GUISetState(@SW_HIDE, $ChildGui1)
                            Return $GUI_RUNDEFMSG
                    EndSwitch
            EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_NOTIFY
Edited by monoscout999
Link to comment
Share on other sites

Did you really dont understand me? because i have a poor english domain, maybe you don`t put any effort on trying to understand me, sooo what is the game now?

Here you got your script problem solve.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiTab.au3>

$hGUI = GUICreate("(UDF Created) Tab Control Create", 600, 400)
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
$hTab1 = _GUICtrlTab_Create($hGUI, 10, 10, 580, 250)
$item11 = _GUICtrlTab_InsertItem($hTab1, 1, "Item 1-1")
$item12 = _GUICtrlTab_InsertItem($hTab1, 2, "Item 1-2")
$item13 = _GUICtrlTab_InsertItem($hTab1, 3, "Item 1-3")
$ChildGui1 = GUICreate("Item 1", 560, 220, 20, 35, $WS_POPUP, $WS_EX_MDICHILD, $hGUI)
$iTab = GuiCtrlCreateTab(110, 10, 450, 210)
$hTab2 = GuiCtrlGetHandle($iTab) ; You will need this to recognize this tab from the WM_NOTIFY
$item21 = GuiCtrlCreateTabItem("Tab 2-1")
GuiCtrlCreatebutton("Test",120,50,150,20)
$item22 = GuiCtrlCreateTabItem("Tab 2-2")
$item23 = GuiCtrlCreateTabItem("Tab 2-3")
GuiCtrlCreateTabItem("")
GUISetState(@SW_SHOW, $hGUI)
GUISetState(@SW_SHOW, $ChildGui1)

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE


Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg, $iwParam
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndTab
    $tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    Switch $hWndFrom
        case $hTab1
            Switch $iCode
                Case $TCN_SELCHANGE; The Selected Tab has change
                    $CurSel = _GUICtrlTab_GetCurSel($hWndFrom)
                    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $CurSel = ' & $CurSel & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
                    Switch $CurSel
                        Case $item11
                            GUISetState(@SW_SHOW, $ChildGui1)
                            Return $GUI_RUNDEFMSG
                        Case $item12
                            GUISetState(@SW_HIDE, $ChildGui1)
                            Return $GUI_RUNDEFMSG
                        Case $item13
                            GUISetState(@SW_HIDE, $ChildGui1)
                            Return $GUI_RUNDEFMSG
                    EndSwitch
            EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_NOTIFY

yes i have difficulities understanding u, for instance just now... what do u mean with "a poor english domain" isn't a domain a webadress?? O.o' what the game is called? it's HoN

and please help me out here, i think i'm starting to understand ur script but not fully,

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiTab.au3>

$hGUI = GUICreate("(UDF Created) Tab Control Create", 600, 400)
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
$hTab1 = _GUICtrlTab_Create($hGUI, 10, 10, 580, 250)
$item11 = _GUICtrlTab_InsertItem($hTab1, 1, "Item 1-1")
$item12 = _GUICtrlTab_InsertItem($hTab1, 2, "Item 1-2")
$item13 = _GUICtrlTab_InsertItem($hTab1, 3, "Item 1-3")
$ChildGui1 = GUICreate("Item 1", 560, 220, 20, 35, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) ;$WS_EX_MDICHILD makes it to a little window inside the parent but how/when do u se it's in $hTab1?? and doesn't "$WS_POPUP" mean it's a popup window and we don't want that so why is it there?? i've nvr seen this kind of usage of gui's i'm new to this...
$iTab = GuiCtrlCreateTab(110, 10, 450, 210)
$hTab2 = GuiCtrlGetHandle($iTab) ; You will need this to recognize this tab from the WM_NOTIFY
$item21 = GuiCtrlCreateTabItem("Tab 2-1")
GuiCtrlCreatebutton("Test",120,50,150,20)
$item22 = GuiCtrlCreateTabItem("Tab 2-2")
$item23 = GuiCtrlCreateTabItem("Tab 2-3")
GuiCtrlCreateTabItem("")
GUISetState(@SW_SHOW, $hGUI)
GUISetState(@SW_SHOW, $ChildGui1)

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE


Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) ;Why is this function here? i can't see it being used?
    #forceref $hWnd, $iMsg, $iwParam
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndTab
    $tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    Switch $hWndFrom
        case $hTab1
            Switch $iCode
                Case $TCN_SELCHANGE; The Selected Tab has change
                    $CurSel = _GUICtrlTab_GetCurSel($hWndFrom)
                    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $CurSel = ' & $CurSel & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
                    Switch $CurSel
                        Case $item11
                            GUISetState(@SW_SHOW, $ChildGui1)
                            Return $GUI_RUNDEFMSG
                        Case $item12
                            GUISetState(@SW_HIDE, $ChildGui1)
                            Return $GUI_RUNDEFMSG
                        Case $item13
                            GUISetState(@SW_HIDE, $ChildGui1)
                            Return $GUI_RUNDEFMSG
                    EndSwitch
            EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_NOTIFY
Link to comment
Share on other sites

I'm sorry but i don't rly think i'm understanding ur point??

Edit: i'm totally lost now O.o' 1. i don't know what kind of "attitude" ur imagening so i can't do much about it... and this stuff about razor edge?? i have no idea what that means... sorry might be my english who causes that... and cut of the game? what u mean??, and which bad words??

and yes it's and application for a game, or more like an application for modifying the game... and it's legal, such software's like this already exist, but for some reasons those applications just crash after a few secounds on my PC, so i thought i could make my own...

hi,

Discussions of this type are not permitted here. This thread certainly already got much further than it should.

Take a moment to read the Forum Rules.

@monoscout999: I can relate to your eagerness to help others, however in cases like these, when you do, you effectively break the rules yourself. Be careful not to fall into this trap. :)

Thread reported.

Regards,

-smartee

Link to comment
Share on other sites

hi,

Discussions of this type are not permitted here. This thread certainly already got much further than it should.

Take a moment to read the Forum Rules.

@monoscout999: I can relate to your eagerness to help others, however in cases like these, when you do, you effectively break the rules yourself. Be careful not to fall into this trap. :)

Thread reported.

Regards,

-smartee

Well honestly, i've already told it, it's not an "bot" tbh it doesn't even thouch the game itself... to be more specific all it's suppose to do is, having alot of options which u can choose, then it will create a zipfile "*.honmod" and inside that there will be a file called "mod.xml" which is the work, inside that file it will have "xaml" code which is created by S2Games, doing this isn't even near illegal or making a "bot" with other words and automatic game...

for instance here is a application mad of Xplitter which SaTo then continue'd, that's pretty much exactly what i wna do, but i wna do it with more feature's... so i'm telling u, this ain't even near a "bot"...

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...