Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Expect & TCL/TK i want to login to my application;

Status
Not open for further replies.

HIMAs

Programmer
May 6, 2003
7
US
OS:WINDOWS
Using Expect & TCL/TK i want to login to my application:
But my appl'n got a character User Interface Which conatins one boxframe with "USER" and "PASSWORD" field
Now i want to login to go to next screeen.but i can reach there by
" set exit_status 1
set user USER
puts $user
set pass PASSWORD
puts $pass
cd $env(HOME)
set id bobby #this my application's exe
send [exec $id] #i am invoking my application from propmt
send "$user\t$pass\r" #i am sending user & password
expect "Exit System" #i am expecting mySIGN

My logon screen is :[dos application]

----------------------------------------------------
USERNAME [ ]
PASSWORD [ ]
Exit System
----------------------------------------------------

Ok well my problem is to send USERname and Password simoultaneously.and then press enter to go to next screen
i used command: send "$user\t$pass\r" but what happens is it's just giving both id & password in some place.not in the designated columns:SO Logon is not happening

How to do that so that i can go to next screen:
----------------------------
HAI WELCOME
opt[]
-----------------------

Looking fwd for you valuable suggestion
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top