| View previous topic :: View next topic |
| Author |
Message |
dirks Guest
|
Posted: Sat Apr 30, 2005 10:30 am Post subject: move cursor back wards x positions |
|
|
Hi AutoHotKey community,
I'm trying to minimize keystrokes for html tags. Here is one example:
^e::
Send, <em></em>
return
Works fine. However, the cursor position will be at the end of the closing </em> tag.
Quesiton: What code do I need to position the cursor between the opening and closing tag? So i can start typing immediately without moving back the cursor.
I looked in the manual, faq and forum, found nothing.
Any help will be greatly appreciated,
Thanks in advance,
dirk |
|
| Back to top |
|
 |
Jon
Joined: 28 Apr 2004 Posts: 373
|
Posted: Sat Apr 30, 2005 10:40 am Post subject: |
|
|
Try this-
| Code: | ^e::
send, <em></em> {NumpadHome}
return |
It might depend what editor you are using. It works in notepad.
edit:
I really aught to start reading the questions properly 
Last edited by Jon on Sat Apr 30, 2005 11:00 am; edited 1 time in total |
|
| Back to top |
|
 |
sosaited
Joined: 24 Feb 2005 Posts: 233
|
Posted: Sat Apr 30, 2005 10:46 am Post subject: |
|
|
if i got you right... you want the cursor IN BETWEEN <em> and </em> ?
if this is your approach... this will do the trick:
| Code: | ^e::
Send, <em></em>
Send, {Left 5} ; Send LEFT ARROW 5 times
return |
you'll have to edit the number of times LEFT is sent according to your current tag |
|
| Back to top |
|
 |
dirks Guest
|
Posted: Sat Apr 30, 2005 11:59 am Post subject: |
|
|
Hello sosaited,
It works fine,
Thank you for your kind and quick help,
dirk |
|
| Back to top |
|
 |
|