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 

Selected Text

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



Joined: 20 Jul 2004
Posts: 21
Location: South Africa

PostPosted: Sat Sep 25, 2004 7:57 pm    Post subject: Selected Text Reply with quote

Hi,

I would like to process selected text using a hotkey. Is there any way to read selected text without first copying it to the clipboard. A typical example would be to select some text and press a hotkey which will then convert the selected text to upper or lower case.

Thanks
Wolive
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sat Sep 25, 2004 8:26 pm    Post subject: Reply with quote

If the selected text is in a compatible control (e.g. an Edit), you can do this:

ControlGet, RetrievedString, Selected,, Edit1, Untitled - Notepad

The above is an example for Notepad.

You can then use something like this to replace the selection:
StringUpper, RetrievedString, RetrievedString
Control, EditPaste, %RetrievedString%, Edit1, Untitled - Notepad
Back to top
View user's profile Send private message Send e-mail
wolive



Joined: 20 Jul 2004
Posts: 21
Location: South Africa

PostPosted: Sun Sep 26, 2004 7:50 am    Post subject: Thanks Chris Reply with quote

Much Appreciated.
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