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 

moving insertion cursor in GUI edit control

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Stanley Krute



Joined: 30 Jul 2005
Posts: 42

PostPosted: Sat Nov 21, 2009 8:26 pm    Post subject: moving insertion cursor in GUI edit control Reply with quote

I have an Edit control in a GUI.

I want to move the insertion cursor around in it.

Specifically, right now, I'd like to at least be able to move it to the end (bottom) of the Edit control's text.

Searched about a bit, but didn't find anything.

Anyone got clues/ideas/techniques ??

thx

-- noob stan
Back to top
View user's profile Send private message Visit poster's website
jaco0646



Joined: 07 Oct 2006
Posts: 3113
Location: MN, USA

PostPosted: Sat Nov 21, 2009 8:44 pm    Post subject: Reply with quote

The simplest way is to just send (or ControlSend to be more reliable) keys. You can use the arrows to move one character at a time, and also the {Home}, {PgUp}, {PgDn}, and {End} keys.
Back to top
View user's profile Send private message Visit poster's website
Stanley Krute



Joined: 30 Jul 2005
Posts: 42

PostPosted: Sat Nov 21, 2009 10:11 pm    Post subject: Reply with quote

jaco0646 wrote:
The simplest way is to just send (or ControlSend to be more reliable) keys. You can use the arrows to move one character at a time, and also the {Home}, {PgUp}, {PgDn}, and {End} keys.


Aha !! That sounds good. Gonna go and check it out ....

thx muchos jaco0646
Back to top
View user's profile Send private message Visit poster's website
[VxE]



Joined: 07 Oct 2006
Posts: 3254
Location: Simi Valley, CA

PostPosted: Sun Nov 22, 2009 5:05 am    Post subject: Reply with quote

Use ControlSend to send the keys {ctrldown}{end}{ctrlup} to the edit control.

The best way to make sure you get the correct control is to use the hwnd option when creating the control. This option puts the control's hwnd into a variable. Then you do this:
Code:
ControlSend,, {ctrldown}{end}{ctrlup}, Ahk_ID %Variable_With_The_Edit_Controls_HWND%

_________________
Ternary (a ? b : c) guide     TSV Table Manipulation Library
Post code inside [code][/code] tags!
Back to top
View user's profile Send private message
Display posts from previous:   
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