Some basic assistance that I can't find info on Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
r2_t1ckles

Some basic assistance that I can't find info on

15 Mar 2018, 10:01

Hi all and thank you for your patience as I'm extremely new to AHK.

I am working on an extremely simple script; all it is really doing is working as a simple text expander. I put in my desired text such as "inactivechat" would switch to a few sentences about how the chat session has become inactive and will now end) and I am running into some trouble. If I have multiple sentences that I want to break up with a carriage return (so they appear on different lines) and I put that into my stupid-simple AHK script, I receive the error: "This line does not contain a recognized action"

I can duplicate the error using only the following:

; Inactive Chat Session
::inactivechat::As this chat session has been inactive for 10 minutes or more this session will now close as we have other customers currently in our queues that are awaiting assistance. Once this session has ended you will receive an email containing the transcript of our chat. In the event that the issue was not resolved simply reply to the email that contains the transcript and a ticket will be opened and we can continue troubleshooting your issue.

Thank you for contacting Technical Support and have a great day
Return


How is it that I can insert that carriage return prior to my closing, so they appear on different lines? I can't use the {enter} option (assuming that's the right one), as that will actually send the message prematurely via our Chat module, which I do not want. I have tried other like `n and that does not work either as I receive a similar error.

Any tips on how I can insert a carriage return in an incredibly simple script?

Thanks!

-Robert
User avatar
Gio
Posts: 1247
Joined: 30 Sep 2013, 10:54
Location: Brazil

Re: Some basic assistance that I can't find info on

15 Mar 2018, 10:06

Hello Robert.

Welcome to the AutoHotkey community forums.

Individual lines in a script denote individual commands. For this reason, AutoHotkey uses `n as a carriage return indicator symbol inside literal expressions.

Code: Select all

; Inactive Chat Session
::inactivechat::As this chat session has been inactive for 10 minutes or more this session will now close as we have other customers currently in our queues that are awaiting assistance. Once this session has ended you will receive an email containing the transcript of our chat. In the event that the issue was not resolved simply reply to the email that contains the transcript and a ticket will be opened and we can continue troubleshooting your issue.`n`nThank you for contacting Technical Support and have a great day
Return
Best wishes.
r2_t1ckles

Re: Some basic assistance that I can't find info on

15 Mar 2018, 10:21

Holy moly thank you for the speedy response!

So I think I figured it out; my foolhardy eyeballs could not tell that those were the back ticks, instead I thought they were apostrophes!

I feel a fool.

Thanks for the quick help!

-Robert
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Some basic assistance that I can't find info on  Topic is solved

15 Mar 2018, 12:48

To visually fine tune your code, you should check out AHK's regarding continuation sections as well. Good luck :)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: doodles333, Frogrammer, Google [Bot] and 269 guests