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 

shift-enter in long replacements

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



Joined: 24 Sep 2008
Posts: 7

PostPosted: Wed Sep 24, 2008 1:35 pm    Post subject: shift-enter in long replacements Reply with quote

In skype you can send 2 or more consecutive lines separated with a newline in one message, if you end each of these lines with shift-enter. Enter only sends the message. How do you organise this in a autohotkey script with auto-replace 'long replacements'?

Code:
::-t-::
(
line 1{+enter}line 2
)


doesn't work.


Last edited by lima on Wed Sep 24, 2008 2:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
Sivvy



Joined: 21 Jul 2008
Posts: 726
Location: Calgary, AB, Canada

PostPosted: Wed Sep 24, 2008 1:55 pm    Post subject: Reply with quote

Code:
::-t-:: line 1 +{Enter} line 2

I'm not sure if it would work, but maybe try sending `n.

Code:
::-t-:: line 1 `n line 2

"`" is an escape character... `n means "NewLine". Some people get it confused with a single quote, but it's the key underneath your Esc key on a qwerty keyboard.
Back to top
View user's profile Send private message
lima



Joined: 24 Sep 2008
Posts: 7

PostPosted: Wed Sep 24, 2008 2:27 pm    Post subject: Reply with quote

No, already tried these 2. 'line1' is send, and then 'line2', each in a separate message.
Back to top
View user's profile Send private message
Sivvy



Joined: 21 Jul 2008
Posts: 726
Location: Calgary, AB, Canada

PostPosted: Wed Sep 24, 2008 2:59 pm    Post subject: Reply with quote

Code:
:*:-t-::Hello`r`nHow Are you?

This worked for me in Notepad... Give it a try.
Back to top
View user's profile Send private message
lima



Joined: 24 Sep 2008
Posts: 7

PostPosted: Wed Sep 24, 2008 4:16 pm    Post subject: Reply with quote

Alas. Works not in Skype. Lines are send one by one.
Back to top
View user's profile Send private message
Sivvy



Joined: 21 Jul 2008
Posts: 726
Location: Calgary, AB, Canada

PostPosted: Wed Sep 24, 2008 4:28 pm    Post subject: Reply with quote

Code:
:*:-t-::Hello{ShiftDown}`r`n{ShiftUp}How Are you?

Or

Code:
:*:-t-::Hello{ShiftDown}{Enter}{ShiftUp}How Are you?

Do they work?
Back to top
View user's profile Send private message
lima



Joined: 24 Sep 2008
Posts: 7

PostPosted: Wed Sep 24, 2008 6:24 pm    Post subject: Reply with quote

Works fine now. Thanks for all the efforts!
Back to top
View user's profile Send private message
Sivvy



Joined: 21 Jul 2008
Posts: 726
Location: Calgary, AB, Canada

PostPosted: Wed Sep 24, 2008 6:25 pm    Post subject: Reply with quote

Which one worked? Both?
Back to top
View user's profile Send private message
lima



Joined: 24 Sep 2008
Posts: 7

PostPosted: Thu Sep 25, 2008 6:30 am    Post subject: Reply with quote

Both of them. The first one gives a extra white line between 2 consecutive lines. So i use the second one. Great tip. Thanks!
Back to top
View user's profile Send private message
Sivvy



Joined: 21 Jul 2008
Posts: 726
Location: Calgary, AB, Canada

PostPosted: Thu Sep 25, 2008 1:25 pm    Post subject: Reply with quote

Code:
:*:-t-::Hello{ShiftDown}`r`n{ShiftUp}How Are you?

Just so I don't screw up anyone in the future... Code should be:

Code:
:*:-t-::Hello{ShiftDown}`n{ShiftUp}How Are you?
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