| View previous topic :: View next topic |
| Author |
Message |
Stanley Krute
Joined: 30 Jul 2005 Posts: 42
|
Posted: Sat Nov 21, 2009 8:26 pm Post subject: moving insertion cursor in GUI edit control |
|
|
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 |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 3113 Location: MN, USA
|
Posted: Sat Nov 21, 2009 8:44 pm Post subject: |
|
|
| 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 |
|
 |
Stanley Krute
Joined: 30 Jul 2005 Posts: 42
|
Posted: Sat Nov 21, 2009 10:11 pm Post subject: |
|
|
| 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 |
|
 |
[VxE]
Joined: 07 Oct 2006 Posts: 3254 Location: Simi Valley, CA
|
Posted: Sun Nov 22, 2009 5:05 am Post subject: |
|
|
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 |
|
 |
|