autohotkey not sending close apostrophe

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

autohotkey not sending close apostrophe

04 May 2018, 04:27

Hi,

I'm having trouble sending a command with open and close apostrophe. The command is send through SSH, the open apostrophe with no problem but the close apostrophe will not send. What can be the problem? Thanks.

Tried using below two command and the result is the same.

send, set DRDate=``ll /db2_backup/online | tail -c 19 | cut -c1-14``

ControlSend, , set DRDate=``ll /db2_backup/online | tail -c 19 | cut -c1-14``, %v_newtitle%
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: autohotkey not sending close apostrophe

04 May 2018, 11:15

The backtick ` you are showing is AHK's standard escape character and has a special meaning. You might have to escape it itself: https://autohotkey.com/docs/commands/_EscapeChar.htm

But are you sure that you are not looking for "quotation marks" (consists of only one character, one keypress) instead? An apostrophe on the other hand, is usually not used in these contexts and it also looks different than a backtick: ' (totally vertical) - like used in it's. These are three different characters.

Do you have some documentary about the syntax you are trying to use?
chenyl

Re: autohotkey not sending close apostrophe

13 May 2018, 20:38

Hi Gregster, thanks for your reply.

The correct command to use should be "quotation marks"as you has mention. but when I'm tried it the first time, had the same problem that close quotation mark was not capture, search online and some post suggest using `

change the program to using " still give the same result.

set DRDate="ll /db2_backp/online | tail -c 19 | cut -c1-14+cho $DRDate
Unmatched ".

The "cho $DRdate"is the next line of code that say ""send, echo $DRDate{Enter}"

Thanks
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: autohotkey not sending close apostrophe

13 May 2018, 23:46

I'm still not seeing what the outcome should be. If you want to send the string set DRDate="ll /db2_backup/online | tail -c 19 | cut -c1-14" then use

Code: Select all

send, set DRDate="ll /db2_backup/online | tail -c 19 | cut -c1-14"
But I don't know if that is the correct syntax for the program you are sending it to.

So what is the literal string you want to send? What are you typing when you input the command by hand?
chenyl

Re: autohotkey not sending close apostrophe

21 May 2018, 02:51

Hi Gregster, I want to send the command

Code: Select all

set DRDate="ll /db2_backup/online | tail -c 19 | cut -c1-14"
but when I use

Code: Select all

send, set DRDate="ll /db2_backup/online | tail -c 19 | cut -c1-14"
the result will be
set DRDate="ll /db2_backp/online | tail -c 19 | cut -c1-14+cho $DRDate
Unmatched ".
the close quotation will be missing. Thanks
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: autohotkey not sending close apostrophe

22 May 2018, 01:01

No, sending

Code: Select all

send, set DRDate="ll /db2_backup/online | tail -c 19 | cut -c1-14"
creates actually

Code: Select all

set DRDate="ll /db2_backup/online | tail -c 19 | cut -c1-14"
I assume what you posted is how the receiving program reacts to this string after you hit or send enter?!? Where else could Unmatched "come from? It is not from AHK, I believe.

That why I asked if you could link to some documentation of the program you are using this with. And is this your complete script? If you are also using the line send, echo $DRDate{Enter} after the first line, I assume you will have to also send an {Enter} already after the first line - otherwise this will all end up on one line and mess it all up.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ArkuS, mikeyww and 324 guests