0

I want to make this script making "if", "else" choises and according on the output then to send different commands.

For example

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Shell "C:\Program Files\PuTTY\putty.exe -l "username" -pw "password" -ssh " & ActiveCell, 1
    Cancel = True
    SendKeys "show int des"
    SendKeys "{ENTER}"
End Sub

i want to edit this script and add something like after the "sh int des" command if the output is "red" send this command.. if its "Green" and "Red" then send this.

Sorry for terrible english.

Thanks !!

Lenkus
  • 1
  • 1
  • 1
    You can hardly read output from PuTTY GUI. Use Plink, the PuTTY command-line SSH tool. See https://stackoverflow.com/q/53523853/850848 – Martin Prikryl Jun 29 '22 at 06:54
  • Thanks for the response.! sure i can change the path to use plink instead but i cant find somewhere how to make vba in excel read the plink output and continue sending commands considering whats the output is. – Lenkus Jun 29 '22 at 08:29

0 Answers0