Topic "WinSCP Terminal Automation"

Author Message
sheauyun
[View user's profile]

Joined: 2012-12-27
Posts: 12
Hi there,

It was mentioned that WinSCP does not support commands that require emulation or user input Question . 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.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
You can use input redirection.

For the missing line, please post a session log file.
_________________
Martin Prikryl
sheauyun
[View user's profile]

Joined: 2012-12-27
Posts: 12
prikryl 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
logWinSCP.txt (24.81 KB) [Download]

Description: (none)

sheauyun
[View user's profile]

Joined: 2012-12-27
Posts: 12
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?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
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.
_________________
Martin Prikryl
sheauyun
[View user's profile]

Joined: 2012-12-27
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. Mr. Green
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License