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%
autohotkey not sending close apostrophe
Re: autohotkey not sending close apostrophe
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?
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?
Re: autohotkey not sending close apostrophe
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
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
Re: autohotkey not sending close apostrophe
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
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?
Code: Select all
send, set DRDate="ll /db2_backup/online | tail -c 19 | cut -c1-14"
So what is the literal string you want to send? What are you typing when you input the command by hand?
Re: autohotkey not sending close apostrophe
Hi Gregster, I want to send the command
but when I use
the result will be
Code: Select all
set DRDate="ll /db2_backup/online | tail -c 19 | cut -c1-14"
Code: Select all
send, set DRDate="ll /db2_backup/online | tail -c 19 | cut -c1-14"
the close quotation will be missing. Thanksset DRDate="ll /db2_backp/online | tail -c 19 | cut -c1-14+cho $DRDate
Unmatched ".
Re: autohotkey not sending close apostrophe
No, sending
creates actually
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.
Code: Select all
send, set DRDate="ll /db2_backup/online | tail -c 19 | cut -c1-14"
Code: Select all
set DRDate="ll /db2_backup/online | tail -c 19 | cut -c1-14"
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.
Who is online
Users browsing this forum: Google [Bot], imstupidpleshelp, JoeWinograd, mikeyww, mmflume, Rohwedder and 188 guests