Jump to content

How to handle Class: TListBox1


SImplify
 Share

Recommended Posts

Hi again,

Is there any way to handle Class: TListBox1. I tried controlcommand and could gice the focus to TListBox, but I could't made any selection or so... Does anyone have any idea....

Here's what i have tried:

winactivate("classname=TAb_MainForm")
   sleep(1000)
   ControlFocus("classname=TAb_MainForm","","TListBox1")
   sleep(1000)
   ControlCommand("classname=TAb_MainForm","","TListBox1","SetCurrenSelection", 2)
   sleep(1000)
   $s = ControlCommand("classname=TAb_MainForm","","TListBox1","GetCurrentSelection","")
   msgbox(0,"F",$s)

And it always returns number 1. Anyway to handle this one?

Thx.

Link to comment
Share on other sites

I don't think the TListBox behaves as a standard MS listbox does.

Lar.

<{POST_SNAPBACK}>

That's what I think also.

If you have any idea how to solve this one, I will be happy to hear that...

I can use mouseclick and coordinates to click first row in TListBox and go down by using down arrow. But I would like to hear ideas how I can get the text in lines in TListBox...

Cheers

Link to comment
Share on other sites

I will.

Even that I dont know how it would help me in this case...  :ph34r:

Cheers

<{POST_SNAPBACK}>

say the list consists of bmp and jpg, controlsend "j" will select jpg...

"I'm not even supposed to be here today!" -Dante (Hicks)

Link to comment
Share on other sites

try

ControlSend("title","text","TListBox1","[error1")

does that select anything?

perhaps ControlFocus it first..

ControlFocus("title","text","TListBox1")

Lar.

<{POST_SNAPBACK}>

Very nice Lar... Thx.

Anyway my main problem was how to get that text out of the program. Now I can select one row by ControlSend but now I need to get that error message...

Any more good ideas?

Simplify

Link to comment
Share on other sites

  • 1 year later...

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...