PsaltyDS Posted June 7, 2007 Share Posted June 7, 2007 What does the whole code look like now? The code I posted (whole thing) works and the buttons work too...The version I posted a long time ago worked for me too. But with a modified $ConfigINI path because I didn't want to recreate his. Something has been wrong with that path every since on his end. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted June 7, 2007 Author Share Posted June 7, 2007 (edited) expandcollapse popup#include <GUIConstants.au3> #include <Constants.au3> #include <array.au3> ;Set Vars Global $ConfigINI = @ScriptDir & "\Glaunch\Launcher Files\Info Files\Config.ini" MsgBox(64, "Debug", $ConfigINI) ; <-- Temporary debug message Global $ver = IniRead($ConfigINI, "Version", "ver", "Not Found") Global $Progs = IniRead($ConfigINI, "Progs", "num", "Not Found") MsgBox(64, "Debug", "$ver = " & $ver & @CRLF & "$Progs = " & $Progs) ; <-- Temporary debug message Global $Program_[$Progs + 1] ; Array to hold button control IDs Global $Name_ = IniReadSection($ConfigINI, "Name") _ArrayDisplay($Name_, "Name_") ; <-- Temporary debug message Global $Path_ = IniReadSection($ConfigINI, "Path") _ArrayDisplay($Path_, "Path_") ; <-- Temporary debug message ;Create Window MsgBox(64, "Debug", "$Progs = " & $Progs) ; <-- Add this line to see if it is reading $Progs correctly If $Progs > 0 Then $i = 1 ; program number $s = 80 ; top of buttons $MainWindow = GUICreate("Game Launcher v1.0", 415, 290) $Tab1 = GUICtrlCreateTab(0, 0, 417, 273) $Programs = GUICtrlCreateTabItem("Games");===>Games Tab Do $Program_[$i] = GUICtrlCreateButton($Name_[$i][1], 237, $s, 120, 17) ;<==== Problem 1 MsgBox(64, "Debug", "$Path = " & $Path_[$i][1]) ; <-- Add this line to see if it is reading $Path correctly $i = $i + 1 $s = $s + 20 Until $i > $Progs GUISetState(@SW_SHOW) ;Launch a Program While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_MINIMIZE GUISetState(@SW_HIDE) ;Case $Exit <===== Problem 2 ExitLoop EndSwitch For $p = 1 To $Progs If $nMsg = $Program_ Then Run($Path_) Sleep(3000) ExitLoop EndIf Next WEnd EndIfIT WORKSSSSS!! Thanks so much for all your help guys. no i just have to play with positioning and making the buttons actually do something. Edited June 7, 2007 by Mast3rpyr0 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 7, 2007 Share Posted June 7, 2007 Hallelujah!!! Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted June 8, 2007 Author Share Posted June 8, 2007 (edited) wow after that part i feel like Autoit is my native language lol EDIT: Oops one more thing, If i have a menu like the one at the top of every windows GUI, how can i have an option when clicked goto a tab Heres my guess: ;Tab initialize $Tab2 = GUICtrlCreateTab(0, 0, 417, 273) ;Create Tab ;In a switch Case $Setup $Tab2 Edited June 8, 2007 by Mast3rpyr0 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 8, 2007 Share Posted June 8, 2007 You need to look closer at the various tab control commands, including the _GuiCtrlTab* series from GuiTab.au3. You don't select the tab, you select the TabItem in the tab. The control to do that is _GUICtrlTabSetCurSel(). Check out the demo script in the help file for that command. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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