Sign in to follow this  
Followers 0
litlmike

Is this considered a ComboBox?

19 posts in this topic

What is this thing considered on the .jpg below? The "From" button. It kinda acts like a ComboBox, in that it drops down when you click it, and gives a couple of options. I am trying to calculate what kind of commands I might be able to send to this thing.

Thanks.

Share this post


Link to post
Share on other sites



I guess so? Why not post the program here so we can look at it.

Share this post


Link to post
Share on other sites

Looks like an Edit to me:

Make a script to tell you:

Local $WindowName = 'Put Window Title Here'

While 1
    ToolTip(ControlGetFocus($WindowName))
    Sleep(10)
WEnd

[center]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.[/center]

Share this post


Link to post
Share on other sites

I guess so? Why not post the program here so we can look at it.

Well, I didn't post the code, because I have run through about 100 different ways to activate this thing. But here is what I can tell you about my attempts.

When I use this code, it will change the Text of the Icon from "From" to "Next Text". So I assumed I had the correct ClassNameNN.

ControlSetText("Eudora", "", "Static2", "New Text" )

However when I use this, it does not Show the DropDown, so I wonder if maybe it is not considered a ComboBox. Or, if possible the ClassNameNN only refers to the Text.

ControlCommand ("Eudora", "", "Static2", "ShowDropDown", "")

So then, I tried this to see if I could get a different type of result:

$a_Selected = ControlCommand ("Eudora", "", "Static2", "GetCurrentSelection", "")
$a_FindSelected = ControlCommand ("Eudora", "", "Static2", "FindString", $a_Selected)
MsgBox(0, "", "Occurrence: " & $a_FindSelected)

But I only received "0"s in return. Regardless, I tried the following:

$Occurrence = 0; and also the numbers 0, 1 , 2
ControlCommand ("Eudora", "", "Static2", "SetCurrentSelection", $Occurrence)

Any ideas?

Share this post


Link to post
Share on other sites

I noticed the 12 pages on the previous p[ost and now this one...

maybe control commands aren't going to get it....so

you can force things since it appears to be an active window

use mouse click with send... that will do it

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Looks like an Edit to me:

Make a script to tell you:

Local $WindowName = 'Put Window Title Here'

While 1
    ToolTip(ControlGetFocus($WindowName))
    Sleep(10)
WEnd
Dang, sorry I am such a noob, but I have no idea what this is supposed to do. Obviously, its supposed to generate a ToolTip at some point, but I ran it, and it didn't and now I don't know how I did it incorrectly.

I stripped down the code to this, then change the $WindowName to 'Eudora'. Even if it did work, I don't see how that will me about the Control, or its Selections. Probably, because I am so nubbish.

#include <IE.au3>
#include <Date.au3>
#include <GUIConstants.au3>


Global $Paused
HotKeySet("^7","eudora")

HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")

;;;; Body of program would go here;;;;
While 1
    Sleep(100)
WEnd
;;;;;;;;

; Pause and Escape Functions
Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","This is a message.")
EndFunc

Func Eudora()
WinWait("Eudora","")
If Not WinActive("Eudora","") Then WinActivate("Eudora","")
WinWaitActive("Eudora","")  
Sleep(800)

Local $WindowName = 'Eudora'

While 1
    ToolTip(ControlGetFocus($WindowName))
    Sleep(10)
WEnd

EndFunc

Share this post


Link to post
Share on other sites

I noticed the 12 pages on the previous p[ost and now this one...

maybe control commands aren't going to get it....so

you can force things since it appears to be an active window

use mouse click with send... that will do it

8)

Actually, the other post was about another Control, and actually I got that work now! Yea!!!

In regards to the MouseClick, I am a bit afraid to use (x,y) because this has to work on 10 different PCs, which all could organize their windows differently. And when I last tried to program in AutoIt....version 1, I think. That caused big problems.

I am unaware of the precise definition of 'active window', but my guess means that it would be a window just like Notepad. But that is untrue, it is a email window, inside of an email client. So toolbars, etc. can be arranged differently per Eudora user.

Now.... maybe, if I could 100% guaruntee a mouseclick on the Control, no matter the arrangement of the window(s), then that could be a solution. So (psudeo code), if this is possible, would be:

$control_position = ControlGetPosition(''Eudora", "", "Static2"); so $control_position would be a X,Y
MouseClick("left",$control_position)
Send("{DOWN}"); or {UP}

Share this post


Link to post
Share on other sites

Actually, the other post was about another Control, and actually I got that work now! Yea!!!

In regards to the MouseClick, I am a bit afraid to use (x,y) because this has to work on 10 different PCs, which all could organize their windows differently. And when I last tried to program in AutoIt....version 1, I think. That caused big problems.

I am unaware of the precise definition of 'active window', but my guess means that it would be a window just like Notepad. But that is untrue, it is a email window, inside of an email client. So toolbars, etc. can be arranged differently per Eudora user.

Now.... maybe, if I could 100% guaruntee a mouseclick on the Control, no matter the arrangement of the window(s), then that could be a solution. So (psudeo code), if this is possible, would be:

$control_position = ControlGetPosition(''Eudora", "", "Static2"); so $control_position would be a X,Y
MouseClick("left",$control_position)
Send("{DOWN}"); or {UP}
lol...

You've been a member for over 15 months and your a 'Noob'?

Anyway... About your fear of 10 different PC's and MouseClick

Use Client Coords for the mouse clicks (Change it in the AutoInfo Tool when getting coords under options).

Then at the top of the script use: Opt('MouseCoordMode', 2)

------

Guess you didn't try my suggeston.


[center]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.[/center]

Share this post


Link to post
Share on other sites

Anyway... About your fear of 10 different PC's and MouseClick

Use Client Coords for the mouse clicks (Change it in the AutoInfo Tool when getting coords under options).

Then at the top of the script use: Opt('MouseCoordMode', 2)

Ahhh..... I see. Well, then I guess that would work. I still would like to be able to do it via the controls, but that will make me happy for now.

lol...
You've been a member for over 15 months and your a 'Noob'?

Yes, I joined way back when, took a 14 month break, then came back.

------
Guess you didn't try my suggeston.

Yes I did. You will see my post. I didn't understand what to do with it. Just look above. Thanks.

Share this post


Link to post
Share on other sites

Oops! :o

No, just use it by itself ... in a test script, and click on the control that you are wanting to look at, and it should give you it's proper name.

If it's a Non-Standard Window, then you're about basically SOL but... who knows... It was just an attempt to help.

Weird how you are having problems with all your Controls in each application you use... If I might offer a suggestion, is to post an AutoInfo Screen Shot of it for future debugging by those of us that don't use any application you are having problems in.

Make sure you get all the info from Control Under Mouse in that screen shot.


[center]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.[/center]

Share this post


Link to post
Share on other sites

Oops! :o

No, just use it by itself ... in a test script, and click on the control that you are wanting to look at, and it should give you it's proper name.

If it's a Non-Standard Window, then you're about basically SOL but... who knows... It was just an attempt to help.

Weird how you are having problems with all your Controls in each application you use... If I might offer a suggestion, is to post an AutoInfo Screen Shot of it for future debugging by those of us that don't use any application you are having problems in.

Make sure you get all the info from Control Under Mouse in that screen shot.

Well I think I am SOL. How do I know if it is "Non-Standard"? Thanks for the note about the AutoInfo Window Screen Shot. I will give that a try next time.

Yea I am not sure why all my Controls give me issues. It is either that they are totally easy, or near impossible to obtain. No in-between at all.

Thanks for the help.

Share this post


Link to post
Share on other sites

Anyway... About your fear of 10 different PC's and MouseClick

Use Client Coords for the mouse clicks (Change it in the AutoInfo Tool when getting coords under options).

Then at the top of the script use: Opt('MouseCoordMode', 2)

So let me get this straight...you are saying that Opt('MouseCoordMode', 2) will make it click on the samd button/box, no matter where it is on the screen? I must not understand how it works. Let me give you two extreme examples in these .jpg's.

Let's say that on picture 'A', this works:

MouseClick("left", 217,157)

You are saying that the SAME code will work for picture 'B'? As long as this is the code:

Opt('MouseCoordMode', 2)
MouseClick("left", 217,157)

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

So let me get this straight...you are saying that Opt('MouseCoordMode', 2) will make it click on the samd button/box, no matter where it is on the screen? I must not understand how it works. Let me give you two extreme examples in these .jpg's.

Let's say that on picture 'A', this works:

MouseClick("left", 217,157)

You are saying that the SAME code will work for picture 'B'? As long as this is the code:

Opt('MouseCoordMode', 2)
MouseClick("left", 217,157)
Of course not, this is assuming that the interface in which you want to react in is the same on each PC. You could do some error handling though, to check situations (Will take some coding on your part)... and change coords respectfully so.

Edit: What version are you using on Eudora... Have you checked to see if you could/can use COM on it?

Edited by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

Of course not, this is assuming that the interface in which you want to react in is the same on each PC. You could do some error handling though, to check situations (Will take some coding on your part)... and change coords respectfully so.

Edit: What version are you using on Eudora... Have you checked to see if you could/can use COM on it?

Frankly, I am glad this was your answer, because otherwise it would eliminate all my previous beliefs about programming. :)

The burden with the 10 clients is that they all at any moment make a slight adjustment to their Eudora and throw off all of their coordinates.

I am using Eudora 6.2.1.2. No I have not checked to see if I can use COM, because I have never heard of COM. What is it?

Share this post


Link to post
Share on other sites

Frankly, I am glad this was your answer, because otherwise it would eliminate all my previous beliefs about programming. :)

The burden with the 10 clients is that they all at any moment make a slight adjustment to their Eudora and throw off all of their coordinates.

I am using Eudora 6.2.1.2. No I have not checked to see if I can use COM, because I have never heard of COM. What is it?

I'm the last one that should be explaing COM to you, but you should look at in the beta Help file... Is 6.2.1.2. the free version, I'm thinking of downloading to see if I can help.

[center]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.[/center]

Share this post


Link to post
Share on other sites

I'm the last one that should be explaing COM to you, but you should look at in the beta Help file... Is 6.2.1.2. the free version, I'm thinking of downloading to see if I can help.

Well I looked at the Help File, but COM looks a bit over my head for now. Maybe in the future when I get past my simple knowledge of Send(""), MouseClick, Sleep(), and GUICreate(). Haha.

We use the Paid/Registered version of Eudora 6.2.1.2. Maybe its downloadable from some source on the Net, but it looks like version 7 is the latest, and available on the website. I am sure that version would be easy to code with, but of course, we will never get that version. We will prolly upgrade to ver. 7 when ver. 10 comes out. Haha.

Let me do this... I will paste what shows in the AutoIt Window when the mouse is over the Control. I will put it in the next post, since it is long.

Share this post


Link to post
Share on other sites

Press CTRL-ALT-F to pause the display.

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

Title: Eudora - [No Recipient, 09:39 AM 3/8/2006, ATTN: ]

Class: EudoraMainWindow

Size: X: -4 Y: -4 W: 1032 H: 723

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

Screen: X: 274 Y: 199

Cursor ID: 0

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

RGB: Hex: 0xC6C3C6 Dec: 13026246

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

Size: X: 217 Y: 157 W: 73 H: 16

Control ID: 5001

ClassNameNN: Static2

Text: F&rom:

Style: 0x50020102

ExStyle: 0x00000004

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

(1): For Help, press F1

(2):

(3):

(4):

(5):

(6): NUM

(7):

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

No Recipient, 09:39 AM 3/8/2006, ATTN:

T&o:

F&rom:

[Name <Email@Email.com>]

S&ubject:

ATTN:

&Cc:

&Bcc:

&Attached:

NNNNN:

On behalf of [secret Name], I thank you for your consideration of [secret Company]. I have enclosed a PDF document that contains our basic marketing strategies.

Feel free to familiarize yourself at our website, [www.Secret Website.com]. [secret Name] has some specific ideas for XXXXX that are not included in this email.

What would be helpful for me, is if after looking at the website, you do not feel that [secret Company] would be a good fit, then send me a quick email letting me know.  But if it seems worth discussing, which I am sure you will find, [secret Name] would like to call you back and discuss the specific ideas he has in mind.

It would be most appreciated if you could respond to this email so that I can effectively coordinate [secret Name] schedule.

Do not hesitate to let me know if there is anything else you should need.

Kind regards,

[secret Signature]

[secret Name]

[secret Company]

[secret Company Info]

Format

Format

Arial

Read Message

8£ª

¸b¯

({ª

For Help, press F1

Search Bar

Search Bar

Search Eudora

?

Search Eudora

Toolbar

AdWazooBar

WazooBar1

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

WazooBar2

WazooBar2

WazooBar3

List1

AdWazooBar

Share this post


Link to post
Share on other sites

Bingo! Got it too work. Wasn't what I was hoping for, but it worked. That's all I care about at this point. And it should work for everyone. Thanks for your help.

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