Sign in to follow this  
Followers 0
JesusIsKing

Checking Listbox

21 posts in this topic

How do I read a listbox and if it has any list items in it then do a certain action, otherwise take no action.

Share this post


Link to post
Share on other sites



I already gave you that info.


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

So it is the same whether you're checking a listbox or an Input?

Share this post


Link to post
Share on other sites

Is it the same? I have no idea of how to go about checking to see if a listbox has any items in it. Can someone help?

Share this post


Link to post
Share on other sites

FireLord, Aceloc, and any other aliases you are going by.

Please (note the asking) ... Do not open another thread on ListViews. If you can't find your answers or are not satisfied with them, move on.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

I don't know who those aliases are, and I have never asked this before, so I'll continue my question .

Is it possible to read a listbox and if ANY item is found in it then take no action otherwise so a msgbox.

Would it be like this:

If $Listbox = "" Then
    ; no action
Else
     MsgBox(0, "", "Item(s) found.")
EndIf

Share this post


Link to post
Share on other sites

I don't know who those aliases are, and I have never asked this before, so I'll continue my question .

Is it possible to read a listbox and if ANY item is found in it then take no action otherwise so a msgbox.

Would it be like this:

If $Listbox = "" Then
; no action
Else
     MsgBox(0, "", "Item(s) found.")
EndIf
Yes, and as a matter of fact, you'll find with Gary's new GUI functions... you'll be able to do that... you'll just need to crack open the help file and find the one that works for you.

On the other hand, since I know what you are doing this for, and what application specifically... I'll save you some time and tell you it isn't going to work, and has be exhausted in this forum in the past.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

I don't know who those aliases are, and I have never asked this before, so I'll continue my question .

Is it possible to read a listbox and if ANY item is found in it then take no action otherwise so a msgbox.

Would it be like this:

If $Listbox = "" Then
; no action
Else
     MsgBox(0, "", "Item(s) found.")
EndIf
Yes.

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

It's not working. I'm pretty sure there is nothing in the listbox and it doesn't show a msgbox.

Share this post


Link to post
Share on other sites

It's not working. I'm pretty sure there is nothing in the listbox and it doesn't show a msgbox.

Well, how are you getting the value of $Listbox?

Nevermind... it's not worth helping someone that is to lazy to open up the help file and go through each example of the "ListBox" functions to understand how to use them and obtain values... On the other hand... I tried saved you time on this... as you are not going to get values from that listbox with anything in autoit.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Use the AutoIt Info Tool to get the control information and post it here.


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

Well, how are you getting the value of $Listbox?

Nevermind... it's not worth helping someone that is to lazy to open up the help file and go through each example of the "ListBox" functions to understand how to use them and obtain values... On the other hand... I tried saved you time on this... as you are not going to get values from that listbox with anything in autoit.

Wow, I'm surprised at how rude and disrespectful moderators (you) are to people new to autoit who are just asking for verification and a little human help. And yes, I have looked in the helpfile, I just wanted to confirm and maybe ask for a few tips. But thanks for your rudeness and rejection.

@Fossil Rock

Obtained using AutoIt Win Info Tool:

Class: Listbox

Instance: 1

ClassnameNN: Listbox1

ID: 259

Text: (nothing here)

Position: 11,41 (I'm pretty sure that's not useful)

Size: 251,160

ControlClick Coords: 108, 53

Style: 0x50311003

ExStyle: 0x00000204

BTW: The listbox is on a separate application, I obtained the handle for the listbox control by using ControlGetHandle("Find Player", "", 259)

Just letting you know ^

Share this post


Link to post
Share on other sites

Wow, I'm surprised at how rude and disrespectful moderators (you) are to people new to autoit who are just asking for verification and a little human help.

I help those that actually attempt to help themselves, and the rest... well they don't belong here anyway.

You've started at least 10 topics on the same application you are trying to automate all on the same exact control. Some controls are "owner drawn" and will resist any type of automation or information gathering from windows standard API calls.

Might take a look at ControlCommand() to see if you can read it with the ListBox options provided there before moving into the more advanced areas of Gary's new API methods.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Wow, I'm surprised at how rude and disrespectful moderators (you) are to people new to autoit who are just asking for verification and a little human help. And yes, I have looked in the helpfile, I just wanted to confirm and maybe ask for a few tips. But thanks for your rudeness and rejection.

Just wait until you meet Valik ...

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

Just wait until you meet Valik ...

I don't want to and don't plan on it.

Share this post


Link to post
Share on other sites

Yes, and as a matter of fact, you'll find with Gary's new GUI functions... you'll be able to do that... you'll just need to crack open the help file and find the one that works for you.

On the other hand, since I know what you are doing this for, and what application specifically... I'll save you some time and tell you it isn't going to work, and has be exhausted in this forum in the past.

I beg to differ. All I am doing is trying to mimick and application that does exactly what you say is not going to work except in autoit.

Share this post


Link to post
Share on other sites

I beg to differ. All I am doing is trying to mimick and application that does exactly what you say is not going to work except in autoit.

Ok, let me re-phrase this... READ BEFORE YOU POST ... I gave you what to look for.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

rudenes and rejection.. hmm that's a harsh statement coming from someone who lies and gambles.

Lies:

I don't know who those aliases are

Gambles: FullTiltPoker..

Cheers

Share this post


Link to post
Share on other sites

rudenes and rejection.. hmm that's a harsh statement coming from someone who lies and gambles.

Lies:

Gambles: FullTiltPoker..

Cheers

So...who are you again? I'm sorry but I don't think you have a clue as to what your talking about nor have a clue as to what this post is about. Please quit spamming posts with information you are assuming.

P.S: Who gambles?

Share this post


Link to post
Share on other sites

If you like I'll pull up all your posts under this alias and your other aliases.. then say you don't know what I mean...

Cheers

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