WinSCP Terminal Automation

Advertisement

sheauyun
Joined:
Posts:
12

WinSCP Terminal Automation

Hi there,

It was mentioned that WinSCP does not support commands that require emulation or user input :?: . But, I am wondering if is there anyway for WinSCP to accept user input like "y" and "n" only?

Beside that, I am wondering why some of the output is missing from the terminal output. Everything is there but the line where asking
user input "Is the LCD completely dark? [y/n] " is just vanish from the WInSCP terminal.

[00:00:06] [fp_backlight] .......................... STARTED
Is the LCD completely dark? [y/n]

Thanks for advice.

Reply with quote

Advertisement

sheauyun
Joined:
Posts:
12

Re: WinSCP Terminal Automation

martin wrote:

You can use input redirection.

For the missing line, please post a session log file.

Hi Martin,

I attched the full log. As you can see from the log, the same goes to the log. The line I mentioned is missing too from the log.

[00:00:06] [fp_backlight] .......................... STARTED
Is the LCD completely dark? [y/n]

I try to use winscp.StandardInput.WriteLine("y") without seeing the line appear on the output, but, it looks like it will not work too.

But, I am sure that this line appear when I am using Putty.

Thanks,
SY

Reply with quote

sheauyun

I have a question... the process.standardinput.writeline will not intercept while previous proess executed with process.standardinput.wrieline had not end?

If the answer is "yes" and I still want to do so, is there anyway to do it?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,468
Location:
Prague, Czechia

Re: WinSCP Terminal Automation

Is the prompt line terminate with new line? WinSCP does not (and cannot) output lines that are not terminated yet.
By redirection, I've meant shell-level redirection on the remote side.
Also I need to stress out that you are abusing WinSCP for something it was absolutely not designed for. It's not a terminal client.

Reply with quote

Advertisement

sheauyun
Joined:
Posts:
12

Hah.... that is the point. Output lines are not terminated yet.
So, it is right. That is not as easy as I think - it only send the input to the shell-level only.

Sorry to use WinSCP for something else. I had think it is easier with WinSCP. :mrgreen:

Reply with quote

Advertisement

You can post new topics in this forum