xOAT Posted September 10, 2010 Share Posted September 10, 2010 I want a control on a GUI to override whatever is currently being executed and have the most recent control event take over. Example: Let's say I have a GUI with two buttons. The user clicks button1 and the function starts executing it's code. If the user clicks button2, the button1 function should pause and button2 function should take over. Is there a way to interrupt a function and have another complete; instead of waiting for one to finish? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 10, 2010 Moderators Share Posted September 10, 2010 xOAT,Take a look at the Interrupting a running function in the Wiki. 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...
xOAT Posted September 12, 2010 Author Share Posted September 12, 2010 xOAT, Take a look at the Interrupting a running function in the Wiki. M23 That sounds perfect, but there's an error I don't know how to fix. "Missing subscript dimensions in "Dim" statement." for this line: Dim $AccelKeys[1][2]="z", $hAccelInterupt Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 12, 2010 Moderators Share Posted September 12, 2010 xOAT,That is the Wiki formatting messing up the code! The line should read:Dim $AccelKeys[1][2]=[["z", $hAccelInterupt]]but the Wiki converted the [[...]] into a page link. I have fixed it in the Wiki by adding a space between the [ [ - thanks for pointing it out. 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