Sign in to follow this  
Followers 0
jeweladdict

button clicking and mouse clicking in a window

6 posts in this topic

I did a search of the forums, but I couldn't seem to find the answer anywhere.

Once i have a window maximized, is there anyway that i can send a command that will click a button with a certain text? Looking through the guide, all i see is a mouse click with coordinates...

Also, the window info tool tells me the coordinates within a window. How do i send a mouse click within a window? Mouse click takes x and y which are relative to the screen, not the window... anyone know how to change that?

thanks!

Share this post


Link to post
Share on other sites



I did a search of the forums, but I couldn't seem to find the answer anywhere.

Once i have a window maximized, is there anyway that i can send a command that will click a button with a certain text? Looking through the guide, all i see is a mouse click with coordinates...

Also, the window info tool tells me the coordinates within a window. How do i send a mouse click within a window? Mouse click takes x and y which are relative to the screen, not the window... anyone know how to change that?

thanks!

In answer to the first part of your question lookup ControlClick in the help file.

For the second part lookup opt(GUICoordMode)

Hope this helps. :lmao:



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

perfect :lmao:

thanks a bunch

quick question:

Opt("GUICoordMode", 1)

Alters the position of a control defined by GUICtrlSetPos.

1 = absolute coordinates (default) still relative to the dialog box.

0 = relative position to the start of the last control (upper left corner)

2 = cell positionining relative to current cell. A -1 for left or top parameter don't increment the start. So next line is -1,0; next cell is 0,-1; current cell is -1,-1

how would I use this to click on a point x,y within a window?

I already have the window focused, but would like to click on point X,Y relative to window not screen. Would I set it to Opt("GUICoordMode", 0) ?

Edited by jeweladdict

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

perfect :lmao:

thanks a bunch

quick question:

Opt("GUICoordMode", 1)

Alters the position of a control defined by GUICtrlSetPos.

1 = absolute coordinates (default) still relative to the dialog box.

0 = relative position to the start of the last control (upper left corner)

2 = cell positionining relative to current cell. A -1 for left or top parameter don't increment the start. So next line is -1,0; next cell is 0,-1; current cell is -1,-1

how would I use this to click on a point x,y within a window?

I already have the window focused, but would like to click on point X,Y relative to window not screen. Would I set it to Opt("GUICoordMode", 0) ?

I think so.

Edit - Got it wrong for mouse control it should be opt(MouseCoordMode,0)

Sorry for telling you wrong. :">

Edited by BigDod


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

i use this with the "0"

opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

i use this with the "0"

opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client

8)

yea... i tried it out last night and it didn't work. Will try mouse one now :lmao:

For the ControlClick function, the control id number of the button keeps resetting each time i open the app... am i using it incorrectly?

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