shawnmstout Posted August 2, 2009 Posted August 2, 2009 (edited) $driveTab = GUICtrlCreateTabItem("Hard Drives") GetDriveInfo() $biosTab = GUICtrlCreateTabItem("Bios") getBios() $serviceTab = GUICtrlCreateTabItem("Services") getServices() $processTab = GUICtrlCreateTabItem("Running Processes") getRunningProcesses() $displayTab = GUICtrlCreateTabItem("Display") getDisplay() $systemTab = GUICtrlCreateTabItem("System") GetSystemInfo() $printTab = GUICtrlCreateTabItem("Print") GetPrintJobs() $softwareTab = GUICtrlCreateTabItem("Software") GetSoftware() $startupTab = GUICtrlCreateTabItem("Startup") GetStartup() is there a way to start the function when the tab is clicked? the load time on the functions are pretty severe so im trying to only run it when it gets clicked Edited August 2, 2009 by shawnmstout
AdmiralAlkex Posted August 2, 2009 Posted August 2, 2009 You can use Tab's like buttons, e.g. if you use MessageLoop check for $biosTab or use CtrlSetOnEvent if you use OnEvent. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
shawnmstout Posted August 2, 2009 Author Posted August 2, 2009 You can use Tab's like buttons, e.g. if you use MessageLoop check for $biosTab or use CtrlSetOnEvent if you use OnEvent.can you give me an example, i starting trying this, but its not workingWhile 1 If _GUICtrlTab_GetItem($sysTabs) == $driveTab Then MsgBox(0,"","Test") If GUIGetMsg() = -3 Then ExitLoop EndIf WEnd
AdmiralAlkex Posted August 2, 2009 Posted August 2, 2009 Here's one way: #include <GUIConstantsEx.au3> GUICreate("test", 640, 320) $tab = GUICtrlCreateTab(10, 10) $tab1 = GUICtrlCreateTabItem("tab----1") $tab2 = GUICtrlCreateTabItem("tab----2") GUICtrlCreateTabItem("") GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $tab Switch GUICtrlRead($tab, 1) Case $tab1 MsgBox(0, "Something", "You pressed on: tab----1") Case $tab2 MsgBox(0, "Something", "You pressed on: tab----2") EndSwitch EndSelect WEnd .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
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