nitekram Posted April 28, 2009 Share Posted April 28, 2009 Anyway to make this work - I am trying to get this script to run, this is just a sample to get the idea across. If you need more info let me know. Opt('MustDeclareVars', 1) Local $PauseCheckbox GUICreate("My GUICtrlRead") ; will create a dialog box that when displayed is centered $PauseCheckbox = GUICtrlCreateCheckbox('test', '', '') GUISetState() ; will display an empty dialog box For $x = 0 to 1000000 If GUICtrlRead($PauseCheckbox) = 1 Then MsgBox('', '', '1') Do Until GUICtrlRead($PauseCheckbox) = 0 ; MsgBox('', '', '2') EndIf Next 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
KaFu Posted April 28, 2009 Share Posted April 28, 2009 Opt('MustDeclareVars', 1) #include <GUIConstantsEx.au3> Local $PauseCheckbox GUICreate("My GUICtrlRead"); will create a dialog box that when displayed is centered $PauseCheckbox = GUICtrlCreateCheckbox('test', '', '') GUISetState(); will display an empty dialog box If GUICtrlRead($PauseCheckbox) = $GUI_UNCHECKED Then MsgBox('', '', '1') Do Sleep(10) Until GUICtrlRead($PauseCheckbox) = $GUI_CHECKED ; MsgBox('', '', '2') EndIf OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 28, 2009 Moderators Share Posted April 28, 2009 nitekram,GUICtrlRead returns the state value, which is not 0/1 - so you have to check the return against the required state of the control:#include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) Local $PauseCheckbox GUICreate("My GUICtrlRead"); will create a dialog box that when displayed is centered $PauseCheckbox = GUICtrlCreateCheckbox('test', '', '') GUISetState(); will display an empty dialog box For $x = 0 to 1000000 If BitAnd(GUICtrlRead($PauseCheckbox), $GUI_CHECKED) Then MsgBox('', '', '1') Do Sleep(10) ; <<<<< added this to reduce CPU load Until BitAnd(GUICtrlRead($PauseCheckbox), $GUI_UNCHECKED) ; MsgBox('', '', '2') EndIf NextM23 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...
nitekram Posted April 28, 2009 Author Share Posted April 28, 2009 Thanks for both of your help - works like a charm... 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator 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