tmcadmin Posted September 19, 2011 Share Posted September 19, 2011 Not sure what I'm doing wrong of if it's possible. I'm still learning AutoIt and was wanting to keep this as simple as I can understand. A lot of the lines of code come from the Help File. I need to be able to display tabs only if a value of 1 is found for it in an ini file. This script works, but it also auto-launches additional Case selections of the script during the loop. If both tab values are 0 in the ini file, the correct Case statement is ran. If either or both values are 1, then I get the auto-launch of additional Case statement. How would I stop this so it only displays the tab or tabs based on the ini value? Thanks for all your help.help.txt Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 20, 2011 Moderators Share Posted September 20, 2011 tmcadmin, Welcome to the AutoIt forum. The Case is firing because GUIGetMsg returns 0 when no events are queued and you have not given a value to $tab0_btn2 - so the Case matches and fires immediately creating the MsgBox. The solution is to give any pre-defined control a placeholder value (I always use 9999 as I have never got close to that many controls in a script!) so that the Case does not fire unless the control is actually created. Please ask if that explanation is not clear enough. 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