Jump to content
Sign in to follow this  
PrStalker

Getting info from a certain window

Recommended Posts

PrStalker

Hi all,

I'm new to autoIT and i've been searching the forums, but without any succes to find an answer.

I'm making a script so i don't have to do this every month myself.

The point is that i open this window and i select a site so i can edit it, but every month there are sites added.

I don't know how i can select the correct site, in this example i want to select the site 'aap' and not cult.be.

I've added the window info tool so it might help you guys.

I don't know how to retrieve the information of this "table".

Thx in advance.

Posted Image

Share this post


Link to post
Share on other sites
water

Could you please show us the "Control" Tab of the info window tool? When we know what control is used we can tell how to access its information.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
PrStalker

Sure :D thx for the quick reply

Posted Image

Share this post


Link to post
Share on other sites
water

As it is a ListView you can use _GUICtrlListView_FindInText to search for an item with a specific text or you could use _GUICtrlListView_GetItem to get a specific item by number.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
PrStalker

$item = _GUICtrlListView_FindInText("WebLog Expert","cult.be")
msgbox(0,"",$item)

This is what i use to retriev the information, but i get as response -1. So i think it's not correct :D

Share this post


Link to post
Share on other sites
PrStalker

I also tried a count but i got as result: 0

MsgBox(4160, "Information", "Item Count: " & _GUICtrlListView_GetItemCount("WebLog Expert"))

Share this post


Link to post
Share on other sites
water

The first argument to _GUICtrlListView_FindInText has to be the handle to the ListView.

#Include <GuiListView.au3>
$handle = ControlGetHandle("WebLog Expert","",1)
$item = _GUICtrlListView_FindInText($handle,"cult.be")
msgbox(0,"",$item)
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
PrStalker

Yeah, it works.

Thx alot for your help

Share this post


Link to post
Share on other sites
water

Glad to be of service!


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
PrStalker

I got 1 more question :D .

What function do i have to use to select (focus) 1 particular item?

Share this post


Link to post
Share on other sites
water

_GUICtrlListView_SetItemSelected($handle,<zero based index of item>,True,True) so set an item selected and focused


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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
Sign in to follow this  

×