Jump to content

PuTTY vs. AutoIT vs. Notepad


beabaul
 Share

Recommended Posts

Exactly what are you trying to accomplish? I doubt you will need note pad. Are you just trying to log the sessions?

What I'm trying to do it output the text from a putty ssh session to a unix box after it displays some stats I need to gather and then afterword send it to a printer. Problem with putty is that there is no mechanism for selecting all the text on the screen without using the mouse otherwise it'd be easy to send it to notepad and then print it out... likewise theres no mechanism in putty to just print out the current text on the screen which is why i'm looking at sending it to a text editor somehow. I've been playing with consoleread but i'm thinking thats not exactly going to do what I'd like. This is what I have so far:

WinWait("192.168.100.100 - PuTTY","")

Send("i")

WinWait("192.168.100.100 - PuTTY","")

Send("f")

WinWait("192.168.100.100 - PuTTY","")

; MsgBox( 0,"Please Wait.....","Please Wait while circulation stats generate. Click OK to Continue")

WinWaitActive("192.168.100.100 - PuTTY","")

Sleep(1000)

Local $circstats

While True

$circstats &= ConsoleRead()

If @error Then ExitLoop

Sleep(25)

WEnd

Send("s")

Sleep( 30000 )

WinWait("192.168.100.100 - PuTTY","")

Sleep (5000)

Run("notepad.exe")

WinWaitActive("Untitled - Notepad")

Send("{$circstats}")

Link to comment
Share on other sites

Hi, you cannot read the output of putty with autoit.

You have configure putty to write a logfile.

Then you can parse the logfile and send to notepad.

:D Please reply if you need more help ...

Thanks for the input..... Ive since solved my little problem by just going ahead using a different Terminal program that seems to have a few more feature in its own other then PuTTY. Thanks a bunch though.

Link to comment
Share on other sites

Interesting - What terminal program did you use ?

Apparently the old Tera Term software was ressurected by a group of developers and as they have gone along made it pretty feature rich imho.... well worth checking out if your like me and have the need for a terminal emulator. Here's the link to it:

Tera Term

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...