LGC Posted October 15, 2007 Share Posted October 15, 2007 putty is a telnet client, although I'm sure most of you know that.You input the ip address of the computer your sending the commands to, and putty opens a window that is named " 'ip address' - putty "That would be fine if I was using the script for one ip address but i am not.I was thinking that autoit can ask me for the ip address then use the ip address I input to launch putty and also use the ip address as a variable to control the window, but I can't figure out how to do that.here are some screen caps from putty so that you can get a better idea:Only problem is, I don't know how to do that. lol.Any help would be appreciated. Link to comment Share on other sites More sharing options...
weaponx Posted October 15, 2007 Share Posted October 15, 2007 Running it from the command line would be a good start:http://the.earth.li/%7Esgtatham/putty/0.53...apter3.html#3.7And then reference each window by instance rather than window title. Link to comment Share on other sites More sharing options...
cpuobsessed Posted November 14, 2007 Share Posted November 14, 2007 (edited) One way to do it is log onto the system and allow putty to accept the key. Afterwards the authentication box will no longer appear. I have scripted a few AutoIT scripts because we do a lot of remote administration of Unix systems and use putty on a daily basis with dozens of different servers.expandcollapse popupFunc do_backup() Send("cd dba ; tail `ls -tr *backup* | tail -1` | (grep Finished && ls -ltr *backup*) || (tail -f `ls -tr *backup* | tail -1`){ENTER}") EndFunc Func get_idpw() #region --- GuiBuilder code Start --- ; Script generated by AutoBuilder 0.6 Prototype GuiCreate("Enter ID/Password", 197, 110,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Input_id = GuiCtrlCreateInput("Input1", 80, 20, 110, 20) $Label_2 = GuiCtrlCreateLabel("ID", 10, 20, 40, 20) $Label_3 = GuiCtrlCreateLabel("Password", 10, 50, 60, 20) $Input_pw = GuiCtrlCreateInput("Input4", 80, 50, 110, 20) $Button_5 = GuiCtrlCreateButton("OK", 50, 80, 60, 20) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop case $msg = $Button_5 ExitLoop Case Else ;;; EndSelect WEnd $id = GUICtrlRead($Input_id) $pw = GUICtrlRead($Input_pw) GUIDelete() #endregion --- GuiBuilder generated code End --- EndFunc Func send_idpw() Send( $id & "{ENTER}" ) Sleep (3000) Send( $pw & "{ENTER}" ) Sleep (3000) EndFunc Of course this only works when the putty window is active, next step is to incorporate plink into AutoIT. Edited November 14, 2007 by cpuobsessed Link to comment Share on other sites More sharing options...
bhns Posted March 12, 2013 Share Posted March 12, 2013 my sample, not read window..... conect on $user = "root" $password ="" $host ="5.0.0.1" $port ="22" $puty_exe = @ScriptDir & "\putty.exe"; putty salve local folder script ; putty -ssh -l usuario 5.0.0.1 p "port" -pw senha ;input $command = RunWait(@comspec & " /C "&$puty_exe&" -ssh -l "&$user&" "&$host&" p "&$port&" -pw "&$password,@ScriptDir, @SW_HIDE, 1) ;$command = RunWait(@comspec & " /C "&$puty_exe&" system scripts run mario",@ScriptDir, @SW_HIDE, 1) While 1 $data = StdoutRead($command) ConsoleWrite($data&@CRLF) If @error Then ExitLoop Wend maniootek 1 :bike: Att...Cleber Antônio Made in Bio zonte Minas Gerais :sweating: Link to comment Share on other sites More sharing options...
FireFox Posted March 12, 2013 Share Posted March 12, 2013 God save the resurrection. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 12, 2013 Moderators Share Posted March 12, 2013 bhns, please don't necro-post, this thread is almost 6 years old. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
tito Posted February 24, 2014 Share Posted February 24, 2014 thx bhns! I was looking for this! btw, what's wrong with posting in such old topics that turn up as first result upon a google search "autoit putty" ? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 26, 2014 Moderators Share Posted February 26, 2014 tito,We ask peopel not to necro-post for two main reasons:- 1. The language advances and the functionality might well be included in core or UDF code by now.- 2. The changes in language syntax mean that it is likely that code from more than a couple of years ago may well not run under the current release interpreter without significant modification.Clear enough? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
arlight1 Posted August 15, 2018 Share Posted August 15, 2018 (edited) I found this on google! Thanks a lot bhns! Just wish the images from the OP still worked. Edited August 15, 2018 by arlight1 Link to comment Share on other sites More sharing options...
arlight1 Posted August 7, 2019 Share Posted August 7, 2019 LGC, can you please re-upload those images? Link to comment Share on other sites More sharing options...
Developers Jos Posted August 7, 2019 Developers Share Posted August 7, 2019 Don't hold your breath as the OP hasn't been around since October 16, 2007. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Zedna Posted August 7, 2019 Share Posted August 7, 2019 Try to look at the results of this search: https://www.autoitscript.com/forum/search/?q=putty&search_in=titles Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now