Page 3 of 6

Re: Catch the output of PLINK.exe (PUTTY)

Posted: 27 May 2016 15:21
by highend
Maybe because of that. I have 850. PeterH, your codepage is?

Edit: Yes, that seems to be the reason...

When I execute it from a system with CP 437 -> No output
Switching back to 850 + restart -> Works

Re: Catch the output of PLINK.exe (PUTTY)

Posted: 27 May 2016 15:48
by LittleBiG
It seems it is not related only to plink. This doesn't provide anything either:
text runret("cmd /c chcp", <curpath>);
These give the active codepage correctly:

Code: Select all

run "cmd /k chcp", <curpath>;

Code: Select all

run "cmd /c chcp >result.txt", <curpath>;
I have no choice but:

Re: Catch the output of PLINK.exe (PUTTY)

Posted: 27 May 2016 15:56
by highend
Works fine on a german system with CP 850 :)

Re: Catch the output of PLINK.exe (PUTTY)

Posted: 27 May 2016 19:24
by LittleBiG
Codepage 852, doesn't work either.

Re: Catch the output of PLINK.exe (PUTTY)

Posted: 27 May 2016 20:45
by admin
LittleBiG wrote:It seems it is not related only to plink. This doesn't provide anything either:
text runret("cmd /c chcp", <curpath>);
These give the active codepage correctly:

Code: Select all

run "cmd /k chcp", <curpath>;

Code: Select all

run "cmd /c chcp >result.txt", <curpath>;
I have no choice but:
Ha, love it!

Gonna check that codepage issue...

Re: Catch the output of PLINK.exe (PUTTY)

Posted: 27 May 2016 22:14
by PeterH
Sad to say: my CP is 850

Re: Catch the output of PLINK.exe (PUTTY)

Posted: 27 May 2016 22:30
by PeterH
And also sad to say: not better with v0010.

By the way: the reason can't be the color codes: if I execute "help" no color codes are returned, but runret() still returns "".

Re: Catch the output of PLINK.exe (PUTTY)

Posted: 27 May 2016 22:36
by LittleBiG
text runret... is still empty. :-(

PeterH, have you tried the simple

Code: Select all

text runret("cmd /c chcp", <curpath>);
without any Linux involved?

Re: Catch the output of PLINK.exe (PUTTY)

Posted: 27 May 2016 23:34
by PeterH
LittleBiG wrote:text runret... is still empty. :-(

PeterH, have you tried the simple

Code: Select all

text runret("cmd /c chcp", <curpath>);
without any Linux involved?
Missed that one (here an emoticon for sleeping, instead: :ghost: )

You are right: returns "".
It seems Don sees this, too?

Re: Catch the output of PLINK.exe (PUTTY)

Posted: 28 May 2016 08:12
by admin
Next beta try this, it will return a hex dump of the raw data in the pipe:

Code: Select all

text runret("cmd /c chcp", , 1);

Re: Catch the output of PLINK.exe (PUTTY)

Posted: 28 May 2016 14:11
by highend
With the wrong codepage (437) it still returns nothing...

Code: Select all

text quote(runret("cmd /c chcp", , 1));
chcp.png
While on 850 it works fine:
chcp1.png

Re: Catch the output of PLINK.exe (PUTTY)

Posted: 28 May 2016 14:18
by admin
Well, at least I know now that my own code is not the culprit. Either it's a somehow wrong API call, or Windows itself has an issue here. Needs deeper research. After the weekend... :beer:

Re: Catch the output of PLINK.exe (PUTTY)

Posted: 28 May 2016 20:06
by LittleBiG

Code: Select all

text runret("cmd /c chcp", , 1);
gave back nothing. Not even "". DOS Codepage 852 (OEM Latin II).

Re: Catch the output of PLINK.exe (PUTTY)

Posted: 28 May 2016 21:04
by highend
Not even ""
Without quote()? xD

Re: Catch the output of PLINK.exe (PUTTY)

Posted: 28 May 2016 23:32
by LittleBiG
highend wrote:
Not even ""
Without quote()? xD
yes, without. :-)