shawnmstout Posted July 26, 2009 Share Posted July 26, 2009 (edited) GUICreate("System Information", 900, 600) GUICtrlCreateTab(10,10,850,20) ;Create System Tabs Dim $tabArray, $tabItem $tabArray[7] = ["Hard Drive", "Bios", "Services", "Running Processes", "Display", "System", "Print"] For $i = 1 To $tabArray[0] Step 1 $tabItem[$i] = GUICtrlCreateTabItem($tabArray[$i]) Next For each of the $tabArray Items im trying to create a tab item, trying to keep my code short and i though this might be a good approach but i am getting Error: Subscript used with non-Array variable on the line $tabArray[7] = ["Hard Drive", "Bios", "Services", "Running Processes", "Display", "System", "Print"] where am i going wrong at? Edited July 26, 2009 by shawnmstout Link to comment Share on other sites More sharing options...
shawnmstout Posted July 26, 2009 Author Share Posted July 26, 2009 bump; Link to comment Share on other sites More sharing options...
PAULOGARCIA2005 Posted July 26, 2009 Share Posted July 26, 2009 (edited) You have to edit the next part of your code:;Create System Tabs Dim $tabItem, $tabArray[7] = ["Hard Drive", "Bios", "Services", "Running Processes", "Display", "System", "Print"] For $i = 1 To $tabArray[0] Step 1You have to use Dim when you are going to use [ , , ] with an array Edited July 26, 2009 by PAULOGARCIA2005 Link to comment Share on other sites More sharing options...
shawnmstout Posted July 26, 2009 Author Share Posted July 26, 2009 ok for some reason my form is disappearing on open, am i missing something? attached is the file usedfunctionsSystemInfo.au3 Link to comment Share on other sites More sharing options...
shawnmstout Posted July 26, 2009 Author Share Posted July 26, 2009 ok for some reason my form is disappearing on open, am i missing something?attached is the file usedbump; Link to comment Share on other sites More sharing options...
GEOSoft Posted July 26, 2009 Share Posted July 26, 2009 STOP BUMPING YOUR POSTS !! Your code is only important to you and these forums are "staffed" by volunteers only and said volunteers have their own lives to live and code to write. We can't sit here anxiously awaiting your next question, the answer to which can usually be found by reading the help file and/or searching the forums. GUICreate("System Information", 900, 600) GUICtrlCreateTab(10,10,850,20) ;Create System Tabs Dim $tabArray, $tabItem $tabArray[7] = ["Hard Drive", "Bios", "Services", "Running Processes", "Display", "System", "Print"] For $i = 0 To Ubound($tabArray) -1 GUICtrlCreateTabItem($tabArray[$i]) Next George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
shawnmstout Posted July 26, 2009 Author Share Posted July 26, 2009 STOP BUMPING YOUR POSTS !! Your code is only important to you and these forums are "staffed" by volunteers only and said volunteers have their own lives to live and code to write. We can't sit here anxiously awaiting your next question, the answer to which can usually be found by reading the help file and/or searching the forums. GUICreate("System Information", 900, 600) GUICtrlCreateTab(10,10,850,20) ;Create System Tabs Dim $tabArray, $tabItem $tabArray[7] = ["Hard Drive", "Bios", "Services", "Running Processes", "Display", "System", "Print"] For $i = 0 To Ubound($tabArray) -1 GUICtrlCreateTabItem($tabArray[$i]) Next you dont think i searched before i asked? well i did Link to comment Share on other sites More sharing options...
PAULOGARCIA2005 Posted July 26, 2009 Share Posted July 26, 2009 Use GUISetState() And more code because the GUI is created, and is show with GUISetState() and then close because there isn't more code. And something else: USE KODA! Link to comment Share on other sites More sharing options...
GEOSoft Posted July 26, 2009 Share Posted July 26, 2009 (edited) I was complaining about your bumping posts after being warned earlier today. The norm is 24 hours as mentioned in my signature, which I also pointed you to in this post http://www.autoitscript.com/forum/index.php?showtopic=98924&view=findpost&p=711010 People who do that too often will frequently find themselves taking a holiday from the forums so they have time to research and consider proper forum ettiquette. Edited July 26, 2009 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
shawnmstout Posted July 26, 2009 Author Share Posted July 26, 2009 Use GUISetState()And more code because the GUI is created, and is show with GUISetState() and then close because there isn't more code.And something else: USE KODA!Thanks Paul for responding,if you look at line 38 i am using GUISetState(@SW_SHOW) <---tried with and without the @SW_SHOWas for koda, thats what i started with, but i wanted to create the tabs from an array instead of the manually entering all the lines, this file will get huge if i do it that way, so im trying to save spacei found out why it kept disappearing, i left outWhile 1 $msg = GUIGetMsg() Switch $msg Case $msg = 0 ContinueLoop EndSwitchWEndNo Tabs are showing yet, attached is the updated codefunctionsSystemInfo.au3 Link to comment Share on other sites More sharing options...
shawnmstout Posted July 26, 2009 Author Share Posted July 26, 2009 (edited) I was complaining about your bumping posts after being warned earlier today. The norm is 24 hours as mentioned in my signature, which I also pointed you to in this post#711010People who do that too often will frequently find themselves taking a holiday from the forums so they have time to research and consider proper forum ettiquette.i must of overlooked about the bumping issuei looked back at the link you gave me and you did mention it, sorry about thateither way i apologize, ill give the recommended amount of time before bumping the post Edited July 26, 2009 by shawnmstout Link to comment Share on other sites More sharing options...
shawnmstout Posted July 26, 2009 Author Share Posted July 26, 2009 KODA Code is erroring out, i duplicated everything but the menu items says $GUI_DOCKWIDTH <= Error: Variable used without being declared says $GUI_DOCKHEIGHT <= Error: Variable used without being declared says $GUI_SHOW <= Error: Variable used without being declared my question is, with the generated code, what was this supposed to be or do i simply dim it? Below is the updated code with dim'ing the variables, still no tabsfunctionsSystemInfo.au3 Link to comment Share on other sites More sharing options...
GEOSoft Posted July 26, 2009 Share Posted July 26, 2009 This is working fine ; GUICreate("System Information", 900, 600) GUICtrlCreateTab(10,10,850,20) ;Create System Tabs Local $tabArray[7] = ["Hard Drive", "Bios", "Services", "Running Processes", "Display", "System", "Print"] For $i = 0 To Ubound($tabArray) -1 GUICtrlCreateTabItem($tabArray[$i]) Next GUISetState() While 1 If GUIGetMsg() = -3 Then exit Wend ; George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
shawnmstout Posted July 26, 2009 Author Share Posted July 26, 2009 (edited) This is working fine ; GUICreate("System Information", 900, 600) GUICtrlCreateTab(10,10,850,20) ;Create System Tabs Local $tabArray[7] = ["Hard Drive", "Bios", "Services", "Running Processes", "Display", "System", "Print"] For $i = 0 To Ubound($tabArray) -1 GUICtrlCreateTabItem($tabArray[$i]) Next GUISetState() While 1 If GUIGetMsg() = -3 Then exit Wend ; WORKS!!!!!! thanks GeoSoft only problem is setting up a variable for each Tabitem, is it possible of doing something like that? Edited July 26, 2009 by shawnmstout 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