Forum Discussion
TanyaYatskovska
Alumni
12 years agoHi Steve,
Try using the following approach: copy the PuTTY window's contents to the clipboard. The following code snippet gets the output of the PuTTY window and prints it to the log to the Additional Info panel:
//...
var w = Sys["Process"]("putty")["Window"]("PuTTY", "*", 1);
w["SystemMenu"]["Click"]("Copy All to Clipboard");
Log["Message"](w["WndCaption"], Sys["Clipboard"]);
//...
As soon as you get the needed text, you can use the indexOf method or a regular expression to find out whether the text matches a specific search pattern. Please see the "C++Script, C#Script - Working With Strings" article for information on these features and some sample scripts.