Jump to content

Selecting from Box


Recommended Posts

Hi all, i new at autoit...

i'm tring to select from the attached picture specific "COMXX" that was pre-define by the user.

with the "Autoit Window info" all the area were all the port appear every thing is the same.

how can i select pre define COM PORT?

thanks

bentzi

post-69202-0-74053500-1325400543_thumb.p

Link to comment
Share on other sites

Not enough information. Open the dialog, run AU3Info.exe and point it to the list box, then freeze it and switch to the Summary tab. Post the data from the Summary tab so we can see things like the class of the window and the control.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

first, Thnak you very much!

second here is the data from the summary tab,

thanks

bentzi

--------------

>>>> Window <<<<

Title: Choose Device

Class: WindowsForms10.window.8.app.0.2bf8098_r14_ad1

Position: 25, 25

Size: 247, 384

Style: 0x16CF0000

ExStyle: 0x00050100

Handle: 0x00020CA4

>>>> Control <<<<

Class: WindowsForms10.LISTBOX.app.0.2bf8098_r14_ad1

Instance: 1

ClassnameNN: WindowsForms10.LISTBOX.app.0.2bf8098_r14_ad11

Name: lstboxPorts

Advanced (Class): [NAME:lstboxPorts]

ID: 134310

Text:

Position: 12, 16

Size: 206, 199

ControlClick Coords: 111, 115

Style: 0x560100C1

ExStyle: 0x00000200

Handle: 0x00020CA6

>>>> Mouse <<<<

Position: 156, 186

Cursor ID: 0

Color: 0xFFFFFF

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<

Setup Type

Cancel

Connect

>>>> Hidden Text <<<<

Link to comment
Share on other sites

Try something like this, using the NAME property of the control to get its handle:

#include <GuiListBox.au3>
Global $sTxt, $hWin, $hLB, $iIdx
; ...
$sTxt = "COM7"
$hWin = WinGetHandle("Choose Device")
$hLB = ControlGetHandle($hWin, "[NAME:lstboxPorts]")
$iIdx = _GUICtrlListBox_SelectString($hLB, $sTxt))

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...