Jump to content

telnet support


Guest M4031
 Share

Recommended Posts

Guest M4031

I am newby with Autoit and trying to write a script that launches a telnet session to a device (managed via TL1) and issues a set of commands and captures the output responses to a text file. I tried using DOS and hyperterminal and neither one seems to give good results.

Here is the hyperterminal version (it would get stuck in the WinWaitActive statement; very strange - it works the first time it was launched but then hangs up on second attempts)

Run("C:\Program Files\Windows NT\hypertrm.exe /t 10.51.17.47")

Sleep(2000)

Send("{ALT T C}")

WinWaitActive("Capture Text","Folder:")

Send("test" &{TAB 2}&{ENTER}")

Sleep(5000)

Send("ACT-USER::USERID:::*****;",0) ; TL1 command to log into device

Send("RTRV-INV-EQPT::ALL;",0) ; TL1 command to retrieve inventory

Send("RTRV-T1::ALL;",0) ; TL1 command to retrieve facility information

Winkill()

I'm not particular to any application (DOS, or hyperterminal works for me). I'm running on Windows NT.

Any suggestions or ideas on to capture device responses from a telnet session?

Link to comment
Share on other sites

Any suggestions or ideas on to capture device responses from a telnet session?

<{POST_SNAPBACK}>

The Kermit Project at Columbia University - Kermit 95 for Windows. The swiss army knife of terminal emulators - cheap and fully scriptable. If you want to kludge something together w/ hyperterm /putty or command line telnet fine... if you're interested in building production quality terminal emulation scripts, look no farther than kermit. At less than $60 for a single user license it's a bargain at any price.

Of course, if you want to write your own terminal emulator, with the new tcp* functions floating around, you could write a telnet client from scratch in 'pure' au3.

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Link to comment
Share on other sites

There have been a couple of threads about capturing telnet output about a month ago... try searching the forum...

There is one here: Need help reading an emulator where DaveF points to "Console Telnet" on SourceForge.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...