| View previous topic :: View next topic |
| Author |
Message |
Mountie
Joined: 30 Oct 2007 Posts: 13
|
Posted: Tue Oct 30, 2007 12:46 pm Post subject: How to Retrieve a word? |
|
|
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 |
|
 |
UnMountie Guest
|
Posted: Tue Oct 30, 2007 12:48 pm Post subject: |
|
|
| copy it? |
|
| Back to top |
|
 |
Hasso
Joined: 23 Mar 2005 Posts: 158 Location: Germany
|
Posted: Tue Oct 30, 2007 2:02 pm Post subject: |
|
|
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 |
|
 |
daonlyfreez
Joined: 16 Mar 2005 Posts: 755 Location: Berlin
|
Posted: Tue Oct 30, 2007 2:16 pm Post subject: |
|
|
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 |
|
 |
Mountie
Joined: 30 Oct 2007 Posts: 13
|
Posted: Tue Oct 30, 2007 4:27 pm Post subject: |
|
|
Thank you for the responses.  |
|
| Back to top |
|
 |
|