For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > September 2004 > Sending "page up" and "page down" character problem.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Sending "page up" and "page down" character problem.
Hiren Bhinde

2004-09-13, 3:56 pm

Hi,

I am writing a script that,

a. Initiates a telnet connection with a server S with user id UI and
Password P
b. It then sends a couple of commands to go in another directory


Now, I want to do a "page up" or a "page down" through my script. The
terminal that I am talking to is a VT220 type and has different escape
sequences.

The escape sequence for a page down is "\e[6~" (without the quotes)

how can I send this through my telnet script.

For e.g. When I want to enter my user id and password i write

$remote = new Net::Telnet (Timeout => 30,Errmode => 'die');
$remote->print("userId");
$remote->waitfor('/password: /i');
$remote-_print("password");


How cann I do the same for sending the escape characters ???

I have tried $remote -> print "\e[6~";

but this does not work.

Any sort of help would be truly appreciated,

Thanks,

Hiren
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com