AutoHotkey Community

It is currently May 27th, 2012, 1:37 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: November 21st, 2009, 9:26 pm 
Offline

Joined: July 30th, 2005, 3:49 pm
Posts: 42
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 21st, 2009, 9:44 pm 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 21st, 2009, 11:11 pm 
Offline

Joined: July 30th, 2005, 3:49 pm
Posts: 42
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2009, 6:05 am 
Offline
User avatar

Joined: October 7th, 2006, 8:45 am
Posts: 3330
Location: Simi Valley, CA
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!


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Apollo, Bing [Bot], bobbysoon, iDrug, Tipsy3000, Yahoo [Bot] and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group