Jump to content
Sign in to follow this  
yarsye

How to get x/y coordinates for slider?

Recommended Posts

yarsye

I want to simulate mouse click on slider, but I couldn't get x/y coordinates for slider? How to get it?

Share this post


Link to post
Share on other sites
bo8ster

The AutoIt Window Info will give you the mouse coords that you can give to MouseClick().


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites
yarsye

I tried this way but failed.

When I actived a window ,and use MouseClick("left",90,8), but actually the mouse move to x:90 y:8 on screen not the window actived I want.

Share this post


Link to post
Share on other sites
bo8ster

This is due to the MouseCoordMode option being set to screen by default. You might want to do Opt("MouseCoordMode", 0)

In Options->Coord Mode you change what mouse coords the info tool gives you.


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites
yarsye

I changed MouseCoordMode, and now I was confusing whether should I use ControlClick Coords property in Window Info, I couldn't get the exact coords, the mouse move the postion is not I want.

Share this post


Link to post
Share on other sites
bo8ster

If you want to do a simple mouse operation - don't worry about the controlclick coords. Look what is on the mouse tab.

Can can test your coords with MouseMove - to see if the mouse is taken to the right spot.

MouseClick won't move the mouse, just simulates a click at the given coords but you have to know if the coords are correct.


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites
yarsye

I got it. Thank you. I 'd appreciate 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  

×