Jump to content

I'm stumpted... All help greatly appreciated!


Recommended Posts

Hello Everyone.

I'd first like to say I just love this forum, and all the very helpful community members. Thank you.

My currently designed GUI features tabs. Each tab is a category of various scripts to select with checkboxes. I need help... For example, I need to be able to select any check boxes in tab1, then press 'Apply' button and it applies the selected tweaks, with a progress bar. Below I will paste a registry file to be written to the registry if the checkbox (the only one on my script, thus far):

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Memory Management]

"SecondLevelDataCache"=dword:00000400

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]

"SecondLevelDataCache"=dword:00000400

Below is my current GUI code:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Tabbed Notebook Dialog", 604, 344, 296, 290)
GUISetIcon("D:\005.ico")
$PageControl1 = GUICtrlCreateTab(8, 8, 588, 320)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("Performance Fixes")
$Group1 = GUICtrlCreateGroup("Group1", 32, 40, 537, 265)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Checkbox1 = GUICtrlCreateCheckbox("Cjjj", 56, 64, 73, 17)
$Button1 = GUICtrlCreateButton("Apply Fixes", 472, 272, 75, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet2 = GUICtrlCreateTabItem("OS Fixes")
$Group2 = GUICtrlCreateGroup("Group2", 48, 40, 185, 257)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("Group3", 248, 40, 201, 257)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet3 = GUICtrlCreateTabItem("Network Fixes")
$TabSheet4 = GUICtrlCreateTabItem("Misc Fixes")
$TabSheet5 = GUICtrlCreateTabItem("Clean Up")
$TabSheet6 = GUICtrlCreateTabItem("Software Installer")
$TabSheet7 = GUICtrlCreateTabItem(".......")
GUICtrlSetState(-1,$GUI_SHOW)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd

If someone could just show me how to do this one, I think I should be good to continue on my own with this...

I would really love the help on this issue, and I appreciate it all! ;)

- Josh

Link to comment
Share on other sites

Hi.

You'll need to populate your switch ... case part with actions, triggered by pressing your "apply" buttons.

For progress bars have a look at "GUICtrlCreateProgress()" or "ProgressOn()"

Regards, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

Thanks for your reply.

How would I go about doing that (populate the switch) and have it run by the apply button if selected?

Ill worry about the progress bar another time! ;-)

Maybe an example with the above, so I can learn from it. I starte programming with Autoit last night, and have tried tons of searching on it to try and figure it out.

Thanks againRudi!

Edited by JoshuaP
Link to comment
Share on other sites

Thanks for your reply.

How would I go about doing that (populate the switch) and have it run by the apply button if selected?

Ill worry about the progress bar another time! ;-)

Maybe an example with the above, so I can learn from it. I starte programming with Autoit last night, and have tried tons of searching on it to try and figure it out.

Thanks againRudi!

Look up GuiGetMsg()

Switch $nMsg
    Case $GUI_EVENT_CLOSE
      Exit
    Case $Button1
      ;something to do here when $Button1 pressed
EndSwitch
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...