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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autoexpect in Windows - can't get it to work

Status
Not open for further replies.

semmel

Technical User
Mar 21, 2008
5
US
Hi,
I spent most of the day finding most of the information I needed, and I finally got ActiveTCL installed and ran "teacup install Expect" which seemed to work.
Autoexpect doesn't seem to be included anymore, but I finally even found that for download - and I can't get it to work.

I thought TCL was platform compatible, yet when I try to run autoexpect from an Explorer window, I get typical Linux errors (command chmod not found and similar).

I found no way of running it inside a shell. I named it "autoexpect.tcl" or just "autoexpect", I tried running it with and without .tcl at the end, I tried "exec" - nothing.

Also, I don't know where the file should go by default - I tried various locations for that, too.

Sooner or later, if I can get it to work, I will also have to try it on Mac and Linux.

Can someone help me getting it to work on Windows for now?

Thanks!

 
Semmel,

Expect is a recent addition to windows thanks to the very hard work of the Tcl Core group.
I'd suggest that you comment out the chmod +x based on an env check for platform type. Please see the documentation for your proposed platform for what tcl's native 'file attributes' supports.

After a brief study of the script all the rest seems tcl safe cross-platform, though some breakage may be incurred with unsupported options for expect core commands under windows.


 
Hi,
I already found one more when it tries to open a prompt - I'll see if I can modify that part. I guess it'll need the prompt, or there will be no way to stop recording :)
 
Please post the final result here or at the Tcler's wiki when you get done. This could be useful for a lot of folks and I haven't googled similar or seen a windows example at the Tcler's wiki.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top