Sign in to follow this  
Followers 0
n3m0

get cursor position on active window

4 posts in this topic

Sorry if this has been posted somewhere, i tried to search and read the faq, but couldnt find it. I am very-very newbie so please be patience with me.

I tried to get mouse position on IE browser using Autoit Window Info and glad that I can click on correct position BUT I can only make it with specific resolution and IE browser set to max.

My question is, how can I click on correct position although the resolution of desktop changed?

My 2nd problem is, I want to access internet option and click some buttons on it. But "internet option menu" could be shown on different position on some pcs, how can i move the mouse and click on the button ONLY in internet options windows? i am sorry, i dunno how to explain it in english... :)

i look forward for hearing from you soon, thank you very much for your advice.

n3m0

Share this post


Link to post
Share on other sites



Sorry if this has been posted somewhere, i tried to search and read the faq, but couldnt find it. I am very-very newbie so please be patience with me.

I tried to get mouse position on IE browser using Autoit Window Info and glad that I can click on correct position BUT I can only make it with specific resolution and IE browser set to max.

My question is, how can I click on correct position although the resolution of desktop changed?

Change the mode for mouse coordinates to be relative to the window client area:
Opt("MouseCoordMode", 2)

My 2nd problem is, I want to access internet option and click some buttons on it. But "internet option menu" could be shown on different position on some pcs, how can i move the mouse and click on the button ONLY in internet options windows? i am sorry, i dunno how to explain it in english... :)

i look forward for hearing from you soon, thank you very much for your advice.

n3m0

If you mean Tools/Internet Options in IE, then you should be using WinMenuSelectItem() or _GuiCtrlToolBar_* UDF functions, or ControlSend() the hotkeys.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Change the mode for mouse coordinates to be relative to the window client area:

Opt("MouseCoordMode", 2)

thank you for your reply.. but still confuse...

If you mean Tools/Internet Options in IE, then you should be using WinMenuSelectItem() or _GuiCtrlToolBar_* UDF functions, or ControlSend() the hotkeys.

:)

i have put Opt("MouseCoordMode", 2), but how can i know the position of mouse in that active window only?

Because if the window client position changed, the position changed too :)

wew.... dont know about that IE setting.... o:).. will try to find out with help file...

thank you!,

n3m0

Edited by n3m0

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

i have put Opt("MouseCoordMode", 2), but how can i know the position of mouse in that active window only?

Because if the window client position changed, the position changed too :)

wew.... dont know about that IE setting.... :).. will try to find out with help file...

thank you!,

n3m0

Now I get it how to works!

When we want to detect mouse position only on client or active window, in Autoit Window Info option, go to Coord Mode, choose Client

Then you can get the position of your mouse only on the client/window you wanted.

Thanks everyone,

n3m0

edit:

sorry to admin.. i dunno how to put "SOLVED" in this topic... thanks

Edited by n3m0

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