Jump to content

CaretCoordMode Problems


Gknoll
 Share

Recommended Posts

I have been trying to get this to work but can't seem to. I want to move the mouse to a specific control (drop down list) and click on it then move the mouse down to a specific selection.

First here is my code.

WinActivate ("Inbox - Thunderbird","")

Opt ("CaretCoordMode",0)

MouseClick ("left",290,90)

MouseClick ("left",280,180)

This is just an example I am trying to learn with.

The problem is this, no matter what I set the CaretCoordMode to, the result is, that the mouse moves to the absolute screen coordinates of the full screen, not the active window, which is what I want.

I can get it to work if I maximize the window first, but what if I am trying to use a child windw that won't maximize?

I have tried to put the Opt statment before the WinActivate statement but it doesn

t seem to make a differance.

Incidently I used the Window info tool set in 'Window' Coord mode to get the Coords I needed.

I am trying to learn how to use this really cool tool, so any help would be great!

Thanks in advance.

Greg

Edited by Gknoll
Link to comment
Share on other sites

WinActivate ("Inbox - Thunderbird","")

Opt ("CaretCoordMode",0)

MouseClick ("left",290,90)

MouseClick ("left",280,180)

Try the Mouse* option

WinActivate("Inbox - Thunderbird")
Opt("MouseCoordMode", 0)
MouseClick("left", 290, 90)
MouseClick("left", 280, 180)

Ensure you set AutoIt Info Tool to relative mode as well if needed.

;)

Edited by MHz
Link to comment
Share on other sites

Is it possible to use keystrokes instead of a mouse click to do it? Try it and see. You may be able to do a control send directly to the control, which would make it more stable. You can use the AutoIt Window Info tool that is included in the Standard release to get a ID on the control.

Link to comment
Share on other sites

THANKS! That did it. To be honest I missed that staement in the help file.

Now if you would be so kind as to enlighten me as to what the CaretCoord would refer to? Would that be a text cursor position?

Search CaretCoordMode in the helpfile would help you there. It would have an effect on WinGetCaretPos.
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...