Iznogoud Posted February 12, 2006 Share Posted February 12, 2006 I have made a script with some help before en just keep trying trying and trying, but i want to create a window with logo and then the tabs.I have looked up some things in the helpfile and yes if i copy the script and try to adjust it works, but now my problem. If i copy and paste my complete finished script under one of those tabs wich are created it doesn't work.With my 0% knowledge of programma, i think it has to be something with GuiSetStateThis is my code:(adjusted some private things )expandcollapse popup#include <GUIConstants.au3> GUICreate("Windows Xp Settings",499,420 ) FileInstall("C:\test\logo1.JPG", @TempDir & "\") FileInstall("C:\test\logo2.JPG", @TempDir & "\") Func _run($q) Select Case $q = 0 ;Some not relevant information of editing the registry and enable some optiosn etc. Case $q = 1 ;Some not relevant information of editing the registry and enable some optiosn etc. Case $q = 2 ;Some not relevant information of editing the registry and enable some optiosn etc. Case $q = 3 ;Some not relevant information of editing the registry and enable some optiosn etc. Case $q = 4 ;Some not relevant information of editing the registry and enable some optiosn etc. Case $q = 5 ;Some not relevant information of editing the registry and enable some optiosn etc. Case $q = 6 ;Some not relevant information of editing the registry and enable some optiosn etc. EndSelect EndFunc GUISetState () Opt ( 'GUICoordMode' , 2 ) Dim $a[7] $a[0]=GUICtrlCreateCheckbox ( '1. test' , 25 , 170 ) GUICtrlSetState (-1,1) GUICtrlSetTip(-1,"test") $a[1]=GUICtrlCreateCheckbox ( '2. test' , -1 , 2 ) GUICtrlSetState (-1,1) GUICtrlSetTip(-1,"test") $a[2]=GUICtrlCreateCheckbox ( '3. test' , -1 , 2 ) GUICtrlSetState (-1,1) GUICtrlSetTip(-1,"test") $a[3]=GUICtrlCreateCheckbox ( '4. test' , -1 , 2 ) GUICtrlSetState (-1,1) GUICtrlSetTip(-1,"test") $a[4]=GUICtrlCreateCheckbox ( '5. test' , -1 , 2 ) GUICtrlSetState (-1,1) GUICtrlSetTip(-1,"test") $a[5]=GUICtrlCreateCheckbox ( '6. test' , -1 , 2 ) GUICtrlSetState (-1,1) GUICtrlSetTip(-1,"test") $a[6]=GUICtrlCreateCheckbox ( '7. test' , -1 , 2 ) GUICtrlSetState(-1,$GUI_CHECKED) GUICtrlSetState(-1,$GUI_DISABLE) GUICtrlSetTip(-1,"test") Opt ( 'GUICoordMode' , 1 ) $okbutton = GUICtrlCreateButton ("Execute",200,340,70,20) GUICtrlSetState(-1,$GUI_FOCUS) GUISetBkColor (0xFFFFFF) $n1 = GUICtrlCreatePic(@TempDir & "\logo1.jpg",0,0, 499,160) $n2 = GUICtrlCreatePic(@TempDir & "\logo2.jpg",0,360, 499,88) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE FileDelete(@TempDir & "\logo1.jpg") FileDelete(@TempDir & "\logo2.jpg") Exit Case $msg = $okbutton ExitLoop EndSelect Wend Dim $o[7] For $n=0 To 6 $o[$n]=GUICtrlRead ( $a[$n] ) If $o[$n]=1 Then _run($n) NextSo if i past this from Func _run($q) to Next and paste this below $tab1=GUICtrlCreateTabitem ("tab1") it doesn't work. So i have tried some different things and add this and leave that but i can't get it to work.Can someone help me?What am i doing wrong or i don't see? Link to comment Share on other sites More sharing options...
eynstyne Posted March 11, 2006 Share Posted March 11, 2006 For the tabs, you have to have the GUICtrlCreateTab() Preceding the GuiCtrlCreateTabItem() GUISetState () Opt ( 'GUICoordMode' , 2 ) Dim $a[7] GUICtrlCreateTab ( 5, 10, 200, 200 ) ' <----- The Tab needed to be created $tab1=GUICtrlCreateTabitem ("tab1") ' <--------- The tab item $a[0]=GUICtrlCreateCheckbox ( '1. test' , 25 , 170 ) GUICtrlSetState (-1,1) GUICtrlSetTip(-1,"test") $a[1]=GUICtrlCreateCheckbox ( '2. test' , -1 , 2 ) GUICtrlSetState (-1,1) GUICtrlSetTip(-1,"test") $a[2]=GUICtrlCreateCheckbox ( '3. test' , -1 , 2 ) GUICtrlSetState (-1,1) GUICtrlSetTip(-1,"test") $a[3]=GUICtrlCreateCheckbox ( '4. test' , -1 , 2 ) GUICtrlSetState (-1,1) GUICtrlSetTip(-1,"test") $a[4]=GUICtrlCreateCheckbox ( '5. test' , -1 , 2 ) GUICtrlSetState (-1,1) GUICtrlSetTip(-1,"test") $a[5]=GUICtrlCreateCheckbox ( '6. test' , -1 , 2 ) GUICtrlSetState (-1,1) GUICtrlSetTip(-1,"test") $a[6]=GUICtrlCreateCheckbox ( '7. test' , -1 , 2 ) GUICtrlSetState(-1,$GUI_CHECKED) GUICtrlSetState(-1,$GUI_DISABLE) GUICtrlSetTip(-1,"test") $tab1=GUICtrlCreateTabitem ("") ' <----- Needed in order to finish the tab This should do. F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent] Link to comment Share on other sites More sharing options...
Valuater Posted March 11, 2006 Share Posted March 11, 2006 how about the GUISetState ??? 8) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now