AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to get current cursor positon?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
vital



Joined: 05 Oct 2005
Posts: 17
Location: china

PostPosted: Sun Jul 01, 2007 7:12 am    Post subject: how to get current cursor positon? Reply with quote

in edit control,in office word,and so on.
thanks
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Sun Jul 01, 2007 7:47 am    Post subject: Reply with quote

A_CaretX A_CaretY

note it does not always work!
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Alexander



Joined: 01 Jul 2007
Posts: 17

PostPosted: Sun Jul 01, 2007 7:13 pm    Post subject: Reply with quote

Retrieves the current position of the mouse cursor, and optionally which window and control it is hovering over.
MouseGetPos, [OutputVarX, OutputVarY, OutputVarWin, OutputVarControl, 1|2|3]

It's all in the help files Smile
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Sun Jul 01, 2007 10:39 pm    Post subject: Reply with quote

Alexander mentions a good point. A cursor is your mouse pointer. A caret is where you are typing. They of course are not always the same place!
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group