Remap {Enter} for Outlook messages

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
wideeyedguy
Posts: 60
Joined: 11 Feb 2016, 11:49

Remap {Enter} for Outlook messages

23 Feb 2018, 16:06

I've been playing around with this idea to help avoid the bad habit Outlook has of reading the CRLF's within emails and creating(?) large gaps in the message when they are replied to.
So I thought I would remap the Enter key to Shift-Enter to use a line break instead. It's working in and of itself; not sure it is going to reduce the bad appearance in our emails since I just started using it.

However, it is now creating a problem with the Hotstrings I've been using, which rely on Enter to trigger them, when I'm using them while typing in an email message.
Here is the code for the remap:

Code: Select all

;Remaps the ENTER key to use SHIFT+ENTER to avoid using CRLF's.
;Using Line Breaks instead so that email replies will not have large gaps.
#IfWinActive, Message  ahk_class rctrl_renwnd32
Enter::
SendInput, {Shift Down}{enter}
SendInput, {shift up}
return
Is this just a bad approach and/or is there another way to trigger the hotstrings when a message is active?

Thanks in advance,
weg
I say this optimistically . . . One day I'll understand it.
But today is not that day!
User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

Re: Remap {Enter} for Outlook messages

23 Feb 2018, 16:26

Remaps are normally done more straight forward like this:
Enter::+Enter

If does seem to mess with hotstrings. Might be able to modify the endchar for hotstrings to include +Enter. Not sure.
#Hotstring EndChars -()[]{}:;'"/\,.?!`n `t is the default.

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks
wideeyedguy
Posts: 60
Joined: 11 Feb 2016, 11:49

Re: Remap {Enter} for Outlook messages

23 Feb 2018, 17:00

Thank you for your input. Yes, I was reading about EndChars because of this need, but wasn't sure I should modify. I may have to abandon this as not having Enter key available may have other issues with typing in emails.

weg
I say this optimistically . . . One day I'll understand it.
But today is not that day!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: filipemb, Google [Bot], Ineedhelplz, Spawnova and 328 guests