star2 Posted April 23, 2007 Share Posted April 23, 2007 (edited) hi there ppl I'm having a problem getting to know how to deal with checkbox I wish some one can help me with an example of the following one simple checkbox one simple button event_1 when button is pressed (while checkbox is checked) event_2 when button is pressed (while checkbox is unchecked) event_1 = RegWrite ("HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\Copy to","","REG_SZ","{C2FBB630-2971-11D1-A18C-00C04FD75D13}")oÝ÷ ÙëÞÝoÝ÷ ØÓëÞÝpYZuÛayÊ)ÊÚ¢W^®mí¢Ø^®(!µÉbrG(×±¶g§¹ëÞÝ°Ykzj/zØb²mÈßÙ°j+bè®è¦nȳyÏ쥩ÿ²,ÞrØb²+²)©á ÛhºÇ¢¶¢÷Å©©æ®¶sc²7&VFærFRuT¢6æ6ÇVFRfÇC´uT6öç7FçG2æS2fwC°¤uT7&VFRgV÷CµDU5BgV÷C²Â#äuT6WE7FFR £²ÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓФuT7G&Ä7&VFTw&÷WgV÷C²gV÷C²Â"Ã"ÃbÃ3R¤uT7F'Dw&÷W¤uT7G&Ä7&VFTÆ&VÂgV÷C¶FBFò&vB6Æ6²gV÷C²ÃÃ2¤uT7G&Ä7&VFT6V6¶&÷gV÷C´6÷FògV÷C²ÃbÃC¤uT7G&Ä7&VFT'WGFöâgV÷C´ÇgV÷C²ÃbÃsÃÃ#R£²ÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÐ ¥vÆR¢b33c¶×6rÒuTvWD×6r¢bb33c¶×6rÒb33c´uTôUdTåEô4Äõ4RFVâWDÆö÷¥vVæ@ Edited April 23, 2007 by star2 [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u] Link to comment Share on other sites More sharing options...
Toady Posted April 23, 2007 Share Posted April 23, 2007 ; Creating the GUI #include <GUIConstants.au3> GUICreate ("TEST", 200,100) GUISetState () ; ======================================= GUICtrlCreateGroup ("", 2,2,196,35) GUIStartGroup() GUICtrlCreateLabel ("add to right Click",8,13) $checkbox = GUICtrlCreateCheckbox ("Copy to",6,40) $applyButton = GUICtrlCreateButton ("Apply",6,70,80,25) ; ======================================= While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $applyButton Then If BitAND(GUICtrlRead($checkbox),$GUI_CHECKED) = 1 THen RegWrite ("HKEY_CLASSES_ROOTAllFilesystemObjectsshellexContextMenuHandlersCopy to","","REG_SZ","{C2FBB630-2971-11D1-A18C-00C04FD75D13}") Else RegDelete ("HKEY_CLASSES_ROOTAllFilesystemObjectsshellexContextMenuHandlersCopy to") EndIf EndIf Wend www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
smashly Posted April 23, 2007 Share Posted April 23, 2007 (edited) Edit: beaten to it .. Edited April 23, 2007 by smashly Link to comment Share on other sites More sharing options...
November Posted April 23, 2007 Share Posted April 23, 2007 Hi, Add a string to each combo box, then when a do button is selected, read combo string to do selected action. Cheers Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
star2 Posted April 23, 2007 Author Share Posted April 23, 2007 Hi,Add a string to each combo box, then when a do button is selected, read combo string to do selected action.Cheersthank you for the reply but can u but you answer in the above example?that would be much helpful thank you again. [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u] Link to comment Share on other sites More sharing options...
star2 Posted April 23, 2007 Author Share Posted April 23, 2007 ; Creating the GUI #include <GUIConstants.au3> GUICreate ("TEST", 200,100) GUISetState () ; ======================================= GUICtrlCreateGroup ("", 2,2,196,35) GUIStartGroup() GUICtrlCreateLabel ("add to right Click",8,13) $checkbox = GUICtrlCreateCheckbox ("Copy to",6,40) $applyButton = GUICtrlCreateButton ("Apply",6,70,80,25) ; ======================================= While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $applyButton Then If BitAND(GUICtrlRead($checkbox),$GUI_CHECKED) = 1 THen RegWrite ("HKEY_CLASSES_ROOTAllFilesystemObjectsshellexContextMenuHandlersCopy to","","REG_SZ","{C2FBB630-2971-11D1-A18C-00C04FD75D13}") Else RegDelete ("HKEY_CLASSES_ROOTAllFilesystemObjectsshellexContextMenuHandlersCopy to") EndIf EndIf Wend oÝ÷ Ûú®¢×¬7¨ÞÊZËr [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u] 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