simulate pressing the enter key using perl

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jonathan184
    New Member
    • Nov 2006
    • 154

    simulate pressing the enter key using perl

    Hi I am try to create a script to login EMS admin tool *JMS*
    Now the admin account has a blank password.

    so if i login normal

    Code:
    usually i type this:  i press enter
    username(ADMIN) prompt - i press enter
    password - i press enter
    then i am int he system , so basically i press enter twice at the prompts* default admin acct this is what i am using*

    Now the script - according to the doc
    Code:
    connect  connect 10.0.0.1:123456 -username admin -password
    the password is blank but it requires an argument when i run it from perl.

    I tried it this way:
    Code:
    connect  connect 10.0.0.1:123456 -username admin
    It still prompts for password i could press enter here but for the script to be useful it has to login on its own. It does not allow "" or any kind of characters to represent a balank password.

    So please help is there way to fix this or is there a way to simulate a press of the enter key.
  • KevinADC
    Recognized Expert Specialist
    • Jan 2007
    • 4092

    #2
    I believe the Term::ReadKey module is used for that purpose. I've never used it myslef but maybe the documentation will be helpful.

    Comment

    • jonathan184
      New Member
      • Nov 2006
      • 154

      #3
      thank you Kevin I will try that.

      Comment

      Working...