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 Retrieve a word?

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



Joined: 30 Oct 2007
Posts: 13

PostPosted: Tue Oct 30, 2007 12:46 pm    Post subject: How to Retrieve a word? Reply with quote

How do I retrieve the word underneath my cursor?
(if it is of any relevance, the vast majority of the time a word would be any text string delimited by spaces)

Thank you.
Back to top
View user's profile Send private message
UnMountie
Guest





PostPosted: Tue Oct 30, 2007 12:48 pm    Post subject: Reply with quote

copy it?
Back to top
Hasso



Joined: 23 Mar 2005
Posts: 158
Location: Germany

PostPosted: Tue Oct 30, 2007 2:02 pm    Post subject: Reply with quote

You only need to double click at the cursors position and copy the word into a variable.
Code:
#2::
clipboard=
MouseClick, L,,,2
send, ^c
word=%clipboard%
MsgBox, The word is: %word%
return


Tested
_________________
Hasso

Programmers don't die, they GOSUB without RETURN
Back to top
View user's profile Send private message
daonlyfreez



Joined: 16 Mar 2005
Posts: 755
Location: Berlin

PostPosted: Tue Oct 30, 2007 2:16 pm    Post subject: Reply with quote

Or...

Accessibility Standard Library Example: Screen Reader

You'd need to adapt the script to return the found text instead of speaking it.
_________________
(sorry, homesite offline atm)
Back to top
View user's profile Send private message
Mountie



Joined: 30 Oct 2007
Posts: 13

PostPosted: Tue Oct 30, 2007 4:27 pm    Post subject: Reply with quote

Thank you for the responses. Razz
Back to top
View user's profile Send private message
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