View Single Post
  #4  
Old 10-09-2012, 01:08 PM
miked's Avatar
miked miked is offline
Registered User
 
Join Date: Feb 2004
Posts: 2,039
From pages 85-86 of the SecureCRT Scripting Manual, here is the code I thought would be the solution you needed, at least as far as logging is concerned.
Code:
If crt.Session.Logging Then
    ' Turn off logging before setting up our script's
    ' logging...
    crt.Session.Log False
End If

' Set up the log file so that it resides in the path
' defined in the TEMP environment variable, and is
' named according to the remote IP address:
crt.Session.LogFileName = "%TEMP%\" & _
"LogFileForIP(" & crt.Session.RemoteAddress & ").txt"
crt.Session.LogUsingSessionOptions

' Send commands, etc.
' ...

' Stop logging
crt.Session.Log False

' Perform other script work, or setup on the remote for the
' next batch of logging...
' ...

' Start logging again (be sure to append or else we'll
' overwrite the data we've logged so far).
crt.Session.Log True, True

' Send more commands, etc.
' ...
' ...
__________________
Mike
VanDyke Software
Technical Support
[http://www.vandyke.com/support]

Last edited by miked; 10-09-2012 at 01:11 PM. Reason: incomplete post.
Reply With Quote