Jump to content

How to GetText on the third column of a treeview?


Balt
 Share

Recommended Posts

Hi all,

I'm trying to extract the text from a treeview that contains several columns:

Posted Image

I'm already successfully retrieving the 4 letter airport code using this line of code:

$apt = ControlTreeView ( "JeppView", "", "[CLASS:SysTreeView32; INSTANCE:2]", "GetText", "#1")
$apt = LeftString($apt, 4)

I am however unable to obtain the text in the column to the right with the full name of the airport. So for YABA I would like to retrieve "ALBANY". That does not seem to be part of the treeview though, or if it is, I have no clue how to access it?

When using the window info tool, the entire surface showing airport lists comes up as one square, the SysTreeView32 class I use above to get the 4 letter code.

Can anyone provide ideas on how to get to the text next to it? The titlebar of the treeview/listview seems to be its own class, a SysHeader32, maybe that's the way to access the listing to the right?

Any help greatly appreciated!

Cheers

- Balt

Link to comment
Share on other sites

First of all, LeftString() isn't a function. Second of all, that's a ListView, not a TreeView.

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Link to comment
Share on other sites

This question is not about string functions or other trivialities. Your response lacks precision, let alone respect. If you take the effort to respond why not try to be helpful?

Back to the topic:

Both Spy++ and Autoit's Window Info tool return a very clear SysTreeView class information for the control in question. It's not a listview. Unless they subclassed a treeview and added some private behaviour to it that's not readily exposed.

Cheers

- Balt

Link to comment
Share on other sites

1) I was trying to help

2) Your reply had less respect than mine.

I can see now that it's a tree view with multiple columns, so it threw me off. Could you link me to the program so I can look more into it?

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Link to comment
Share on other sites

I'm sorry but I can't redistribute that program for licensing reasons. Maybe the following screenshot helps:

Note that in Spy++, the SysTreeView32 that is highlighted is the one it finds when dropping the target inside the square of the treeview. It looks as if it's subclassed from another treeview, along with a SysHeader?

Thanks for looking into this!

Posted Image

Link to comment
Share on other sites

Actually I'd just like a screenshot of the program with one of the trees open.

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Link to comment
Share on other sites

Haven't heard back.... any idea how to obtain that text to the right?

Cheers

- Balt

I don't think standard treeviews can have more than one column, so that is probably a custom component which would make your task difficult.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...