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 

move cursor back wards x positions

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





PostPosted: Sat Apr 30, 2005 10:30 am    Post subject: move cursor back wards x positions Reply with quote

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

PostPosted: Sat Apr 30, 2005 10:40 am    Post subject: Reply with quote

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 Smile


Last edited by Jon on Sat Apr 30, 2005 11:00 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
sosaited



Joined: 24 Feb 2005
Posts: 233

PostPosted: Sat Apr 30, 2005 10:46 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
dirks
Guest





PostPosted: Sat Apr 30, 2005 11:59 am    Post subject: Reply with quote

Hello sosaited,
It works fine,
Thank you for your kind and quick help,
dirk
Back to top
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