Sign in to follow this  
Followers 0
SImplify

How to handle Class: TListBox1

9 posts in this topic

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.

Share this post


Link to post
Share on other sites



"SetCurrenSelection"
Try using "SetCurrentSelection" instead.

Share this post


Link to post
Share on other sites

Try using "SetCurrentSelection" instead.

<{POST_SNAPBACK}>

:ph34r:

I didn't copy-paste my code, so I propably has one typo. I need to check that tomorrow...

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

try controlsend

<{POST_SNAPBACK}>

I will.

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

Cheers

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

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

<{POST_SNAPBACK}>

It's only text...

Posted Image

Any ideas?

Thx

Simplify

Share this post


Link to post
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

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