Sign in to follow this  
Followers 0
wriggerz

Selecting item in listbox

12 posts in this topic

I'm new to AutoIT and can't figure out how to select an item from a listbox.

I want my script to select the CM Viewer option from this screen.

Posted Image

Can anyone offer any help? it would be greatly appreciated

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

ControlClick() or ControlCommand() might do it.

Hover your mouse while running Au3Info.exe

Edited by gamepin126

Share this post


Link to post
Share on other sites

This is the info i get back. It doesn't show it in the "Visible Window Text" section.

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: Daisy v1.5.0.2

Class: #32770

Size: X: 541 Y: 91 W: 453 H: 387

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 374 Y: 618

Cursor ID: 5

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0xD4D0C8 Dec: 13947080

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size:

Control ID:

ClassNameNN:

Text:

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

Listed below are the DDS applications available for installation on your workstation. If an application has already been installed, the installed version of that application is also indicated.

You may install, upgrade, verify, or remove DDS applications, or create new desktop shortcuts for installed DDS applications.

Application

Available Version

Installed Version

Application Info

CM Viewer

The DDS 3270 terminal emulator

Install...

Remove...

Create Icon

Options...

Close

Verify

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

Share this post


Link to post
Share on other sites

What happens when you use shift and tab? Also, if that works, you can use a PixelGetColor to check to see if what you want is highlighted.

Shift and tab - tabs along the bottom buttons "install..." "Options..." "Close"

Share this post


Link to post
Share on other sites

What does Au3Info tell you the ClassNameNN is when you mouse over the list?

If it's a standard ListBox or ListView you can use the beta functions in GuiList.au3 and GuiListView.au3.

If not, you'll have to automate keystrokes/mouse movements.


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

What does Au3Info tell you the ClassNameNN is when you mouse over the list?

If it's a standard ListBox or ListView you can use the beta functions in GuiList.au3 and GuiListView.au3.

If not, you'll have to automate keystrokes/mouse movements.

The ClassNameNN = ListBox1

Where can i obtain GuiList.au3 and GuiListView.au3?

Share this post


Link to post
Share on other sites

The ClassNameNN = ListBox1

Where can i obtain GuiList.au3 and GuiListView.au3?

Check out the beta version.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

ok got the beta version where i found GuiList.au3 and GuiListView.au3. Any idea where i should start with the command?

Share this post


Link to post
Share on other sites

try the function _GUICtrlListSelectIndex

you'll need to get the handle to the listbox 1s tho (ControlGetHandle)


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

try the function _GUICtrlListSelectIndex

you'll need to get the handle to the listbox 1s tho (ControlGetHandle)

How do you do get the handle?

Share this post


Link to post
Share on other sites

How do you do get the handle?

Gary suggested that you use ControlGetHandle.
$hListBox = ControlGetHandle("Daisy", "", "ListBox1")
Please read the helpfile and familiarize yourself with these functions.

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

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  
Followers 0