JSThePatriot Posted December 2, 2008 Author Share Posted December 2, 2008 I offered him a cookie. We'll see how that works. I might have to add a glass of milk... Jarvis AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 2, 2008 Share Posted December 2, 2008 I offered him a cookie. We'll see how that works. I might have to add a glass of milk...JarvisYou want Gary, or Kat? 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...
GaryFrost Posted December 2, 2008 Share Posted December 2, 2008 M$ rarely uses standard checkboxes in the controls. try looking at: _GUICtrlTreeView_SetStateImageIndex and _GUICtrlTreeView_GetStateImageIndex SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
JSThePatriot Posted December 4, 2008 Author Share Posted December 4, 2008 @GaryFrost Thanks for the assistance there. The examples in the helpfile didn't give me much information, but below is what I finally figured out would work.$h_TreeView = ControlGetHandle("Customize Classic Start Menu", "", "SysTreeView321") $h_Item = _GUICtrlTreeView_FindItem($h_TreeView, "Use Personalized Menus") _GUICtrlTreeView_SetImageIndex($h_TreeView, $h_Item, True) ; UnCheck _GUICtrlTreeView_SetImageIndex($h_TreeView, $h_Item, False) ; CheckAlso, you will notice "true" makes it uncheck, and "false" makes it check. Doesn't make much sense, but it works. Thanks, Jarvis AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 4, 2008 Share Posted December 4, 2008 @GaryFrost Thanks for the assistance there. The examples in the helpfile didn't give me much information, but below is what I finally figured out would work.$h_TreeView = ControlGetHandle("Customize Classic Start Menu", "", "SysTreeView321") $h_Item = _GUICtrlTreeView_FindItem($h_TreeView, "Use Personalized Menus") _GUICtrlTreeView_SetImageIndex($h_TreeView, $h_Item, True); UnCheck _GUICtrlTreeView_SetImageIndex($h_TreeView, $h_Item, False); CheckAlso, you will notice "true" makes it uncheck, and "false" makes it check. Doesn't make much sense, but it works. Thanks, Jarvis The third parameter is not supposed to be a boolean True/False, but a 0-based index. When AutoIt expects an integer and gets something else, there is often a conversion by Number(). For example: $Var = True ConsoleWrite("$Var = " & $Var & @LF) $Var = Number($Var) ConsoleWrite("$Var = " & $Var & @LF) $Var = False ConsoleWrite("$Var = " & $Var & @LF) $Var = Number($Var) ConsoleWrite("$Var = " & $Var & @LF) You are getting index = 1 for 'True' and index = 0 for 'False'. These just happen to match the uncheck and check images you want. If the required indexes were 3 and 4 that wouldn't have worked. So you can make that: _GUICtrlTreeView_SetImageIndex($h_TreeView, $h_Item, 1); UnCheck _GUICtrlTreeView_SetImageIndex($h_TreeView, $h_Item, 0); Check 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