MPHillier Posted January 21, 2012 Share Posted January 21, 2012 I've been working with theTrieview example provided within the help files to learn to create and manipulate form and treeview. I wanted to be able to click a treeview option - in my case "User" then outside of treeview would populate a lable and create a combo box and button. The process should run like this - Choose user from treeview - choose option from combo box - click on button to run a command - say @UserProfileDir In testing I created a case $msg = $AppDataRun - which calls the func Apptest () When runs it seems to be in a loop with in the case and continually calls the Apptest. So it seems to me... I'm not getting how to break or separate form commands from command driven from within my case. There has to be a way to separate initiation of commands from inside and outside the treeview. Attached is the example with the following deactivated. ;Case $msg = $AppDataRun ; Apptest() Been using Autoit for awhile now but really relied on VB6 for most my tools and really simply used buttons and functions to run request. Created in VB6 the exact form yet am able to separate the Treeview from other commands - Searched for something that would help in the help files and forums but most finds related to either or subjects. Not in combination. Thanks Much....Tool_Breakdown.au3 I Break and Fix things... If the surf is up I'm outta here..... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 21, 2012 Moderators Share Posted January 21, 2012 michaelhillier,The problem arises because although you have declared $AppDataRun at the top of your script you have not allocated it a value. When the Select loop gets to that Case, it matches with the 0 return GUIGetMsg returns when nothing is queued - hence the contnual firing of the Case. The solution is to give $AppDataRun a placeholder value (I always use 9999 as I do not think I will ever get 10000 controls in a GUI) so that it will not fire until you have a control to action. All clear? 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...
MPHillier Posted January 21, 2012 Author Share Posted January 21, 2012 Melba23 did a search for placeholder value and did exactly as you suggested - Looking good now.... also found a reply with link that you gave FSoft - Managing Multiple GUIs tutorial. going there now... Moving forward...Thank you so much for the assistance and also the link you provided... I Break and Fix things... If the surf is up I'm outta here..... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 21, 2012 Moderators Share Posted January 21, 2012 michaelhillier, My pleasure. 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