View Single Post
  #2  
Old 07-16-2019, 08:56 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,636
Hi melarnell,

I think the simplest way is to calculate how many 15 second intervals in an hour (4 per min * 60 = 240) and then just use a simple For/Next loop with a Sleep(). You might even use variables to make the construct more flexible.

Code:
nInterval = 15 * 1000
nIterations = 240
For i = 0 to nIterations
    ' Run command
    crt.Screen.Send "tmsh show sys connection cs-server-addr x.x.x.x" & chr(13)
    ' Sleep 15 seconds
    crt.Sleep nInterval
Next
Quote:
Is there a way to script it to run for an hour and then automatically open the log file or to export the data into a csv or excel file? All help is appreciated.
You reference *the* log file. Do you already have code in your script for logging? (Or is this the entire script at this time?)

If not, adding the logging or Excel interaction would be much more involved.

What version of SecureCRT are you using?

On what OS/platform?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote