nf67 Posted March 9, 2009 Share Posted March 9, 2009 (edited) Hi,I'm trying to create a little tool that can manage points and keep track of a score.I couldn't seem to figure out how to do certain things, though.Could any of you tell me what the code is to let the script check or uncheck a checkbox?Case $SelectAllButton Check $Checkbox1;<---------------- Check $Checkbox2 Check $Checkbox3 Check $Checkbox4 Check $Checkbox5 Check $Checkbox6 Check $Checkbox7 Check $Checkbox8 Check $Checkbox9 Check $Checkbox10 Case $DeselectAllButton Uncheck $Checkbox1;<----------------- Uncheck $Checkbox2 Uncheck $Checkbox3 Uncheck $Checkbox4 Uncheck $Checkbox5 Uncheck $Checkbox6 Uncheck $Checkbox7 Uncheck $Checkbox8 Uncheck $Checkbox9 Uncheck $Checkbox10Also, I don't know how to make a variable equal to an inputvalue (from an inputbox)... $PlusMinusValue = 0 $ChangeInput = GUICtrlCreateInput("ChangeInput", 104, 224, 73, 21) (...) Case $Apply $PlusMinusValue = the inputvalue of $ChangeinputAnd I need some help with creating a message that can be pasted somewhere, containing variables.$Standings= "$Name1 $Points1 :: $Name2 $Points2 :: $Name3 $Points3";;;;; Like: "John 23 :: Doe 16 :: Pete 86" (...) Case $AutoPostButton Sleep 2000 WinActivate("Notepad") Sleep 6000 Send("{ENTER}") Sleep 500 Send($Standings) Sleep 500 Send("{ENTER}")I'd really appreciate your help Thanks Edited March 9, 2009 by nf67 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 9, 2009 Moderators Share Posted March 9, 2009 nf67,Q1. Look at GUICtrlSetState in the Help file. You will need to use the $GUI_[uN]CHECKED states.Q2. Look at GUICtrlRead in the Help file. You will only need the ControlID - so GUICtrlRead($ChangeInput) will do the trick.Q3. Use the concatenation operator "&" (Help file - "Language Reference - Operators").$Standings = $Name1 & " " & $Points1 & " :: " & $Name2 & " " & $Points2 & " :: " & $Name3 & " " & $Points3will give you "John 23 :: Doe 16 :: Pete 86" - assuming that the variables exist and have been set to those values, of course. ;-)I hope this helps.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
nf67 Posted March 9, 2009 Author Share Posted March 9, 2009 It sure does, thank you Link to comment Share on other sites More sharing options...
nf67 Posted March 9, 2009 Author Share Posted March 9, 2009 (edited) ::SOLVED::Sorry I forgot to mention that $Name1 2 and 3 are actually inputboxes (so I can fill in names) , I need the value they contain.I tried to use GuiCtrlRead($Name1) for the content of inputbox $Name1 but it (obviously?) didn't work .My attempt:$Name1 = GUICtrlCreateInput("Name1", 24, 24, 105, 21) $Name2 = GUICtrlCreateInput("Name2", 24, 56, 105, 21) $Name3 = GUICtrlCreateInput("Name3", 24, 88, 105, 21) (...) $Standings = GUICtrlRead($Name1) & " " & $Points1 & " :: " & GUICtrlRead($Name2) & " " & $Points2 & " :: " & GUICtrlRead($Name3) & " " & $Points3(GuiCtrlRead doesn't work, apparently )Your other solutions were great, I've fixed the other errors now .EDIT: This DOES seem to work now Odd but nice Edited March 9, 2009 by nf67 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 9, 2009 Moderators Share Posted March 9, 2009 nf67,GUICtrlRead is definitely what you use to read the contents of an Input control - honest!GUICreate("Test", 200, 200) $hInput = GUICtrlCreateInput("fred", 10, 10, 180, 20) $sContents = GUICtrlRead($hInput) $hLabel = GUICtrlCreateLabel($sContents, 10, 50, 180, 20) GUISetState() While 1 If GUIGetMsg() = -3 Then Exit WEndIf you cannot get it to work, post the code you are using and we will see what else is causing the problem.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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