Jump to content

Mixing Treeview with out of treeview commands.


Recommended Posts

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

  • Moderators

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. :D

All clear? :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

  • Moderators

michaelhillier,

My pleasure. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...