kcvinu Posted May 22, 2015 Posted May 22, 2015 Hi all,I am experimenting with ControlTreeView function. But when i try this code, it is not doing anything.ControlTreeView("PhraseExpress Freeware v10.5.41f","",132066,"Select","PhraseExpress|Ahat|#3")Please see this image. I have use "WinActivate" function before this code. But no way. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
BrewManNH Posted May 22, 2015 Posted May 22, 2015 What's not working? Where's the code that shows it not working, I see one line of code with absolutely no explanation? What is 132066? Is that a control ID, a control handle, what does it represent on the GUI? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
kcvinu Posted May 22, 2015 Author Posted May 22, 2015 I have write code for activating Phrase express window and then selecting an item from this treeview(see image.) So i am expecting the result as a selection. But nothing is selected after the execution. And 132066 is the control id of this treeview. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
Starstar Posted May 22, 2015 Posted May 22, 2015 (edited) Put the control id in quotes......."[ID:132066]" Edited May 22, 2015 by Starstar Editing after Melba23 suggestions Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."
Moderators Melba23 Posted May 22, 2015 Moderators Posted May 22, 2015 Starstar,If you are going to make suggestions, at least make them sensible - since when have ControlIDs of any sort been strings?From the Help file:ID - The internal control ID. The Control ID is the internal numeric identifier that windows gives to each controlM23 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
Starstar Posted May 22, 2015 Posted May 22, 2015 Starstar,If you are going to make suggestions, at least make them sensible - since when have ControlIDs of any sort been strings?From the Help file:ID - The internal control ID. The Control ID is the internal numeric identifier that windows gives to each controlM23O>K....Now is it fine......???? Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."
Moderators Melba23 Posted May 22, 2015 Moderators Posted May 22, 2015 Starstar,Much better - although you might as well use the numeric value directly.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
Starstar Posted May 22, 2015 Posted May 22, 2015 Starstar,Much better - although you might as well use the numeric value directly.M23Thanks... Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."
kcvinu Posted May 23, 2015 Author Posted May 23, 2015 @Melba does the ControlID change automatically after a system restart ?. I have experienced so. Last day control ID was 132066. But today the ID is 197582. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
BrewManNH Posted May 23, 2015 Posted May 23, 2015 Use ControlGetHandle to get the handle to the control you need, handles change every time you run the script as a general rule. You don't have to use the numeric control ID of the control in the function, there are other ways of determining which control you want to get the handle from. kcvinu 1 If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
kcvinu Posted May 23, 2015 Author Posted May 23, 2015 Thank you @BrewManNH Let me try. »»» Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
kcvinu Posted May 23, 2015 Author Posted May 23, 2015 I am going to drop this project for 2 reasons.1. Control ID is changing after system restart.2. "Select", "Item" command in ControlTreeView function is not working properly. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
Starstar Posted May 23, 2015 Posted May 23, 2015 (edited) I am going to drop this project for 2 reasons.1. Control ID is changing after system restart.2. "Select", "Item" command in ControlTreeView function is not working properly. There is no need to discard.Keep it up every problem have a solution....If you are a hard-worker...$ctrHndl = ControlGetHandle("Tilte".""."[CLASS:Your Class]") ControlTreeView("PhraseExpress Freeware v10.5.41f","",$ctrHndl,"Select","PhraseExpress|Ahat|#3")Try like this one....... Edited May 23, 2015 by Starstar kcvinu 1 Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."
kcvinu Posted May 24, 2015 Author Posted May 24, 2015 Thank you @Starstar for the encouragement. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
kcvinu Posted May 24, 2015 Author Posted May 24, 2015 @Starstar , Your code didn't work. After that i tried this, but didn't work. see thisLocal $classlist = WinGetClassList("PhraseExpress Freeware v10.5.41f") Local $ID = ControlGetHandle("PhraseExpress Freeware v10.5.41f","","[CLASS:TVirtualStringTree]") Local $count = ControlTreeView("PhraseExpress Freeware v10.5.41f","",$ID,"GetItemCount","PhraseExpress|Ahat" ) Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
LarsJ Posted May 24, 2015 Posted May 24, 2015 From the helpfile: ControlTreeView sends a command to a TreeView32 control. Are you sure this is a TreeView32 control? Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions
kcvinu Posted May 26, 2015 Author Posted May 26, 2015 From the helpfile: ControlTreeView sends a command to a TreeView32 control. Are you sure this is a TreeView32 control?Commands like "GetItemCount, GetText" are worked very well for this control. And it really looks like a treeview control.Please see the image in my first post. But "Basic Control Info" in Window Info Tool is empty. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
LarsJ Posted May 26, 2015 Posted May 26, 2015 For a TreeView32 control the class name in AutoIt Window Info tool will be something like SysTreeView321 as in Windows Explorer left pane treeview control. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions
kcvinu Posted May 26, 2015 Author Posted May 26, 2015 @LarsJ Here is screenshot of window info tool Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only)
LarsJ Posted May 26, 2015 Posted May 26, 2015 I'm pretty sure it's not a TreeView32 control. It's for this reason that ControlTreeView doesn't work. You can probably automate the treeview with the UI Automation framework. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions
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