VBScript export log
VBScript export log
Is there a way to export a log file using VBscript? I have a VBS macro that starts and saves a trace, but I want it to automatically save a log file too. Any ideas?
Re: VBScript export log
Hi,
the export of a trace file into log could not be automated by a script, because there will be some user action necessary regarding the setup of the log. This feature is not implemented in PE5 at the moment.
best regards
Michael
the export of a trace file into log could not be automated by a script, because there will be some user action necessary regarding the setup of the log. This feature is not implemented in PE5 at the moment.
best regards
Michael
Re: VBScript export log
I currently have a script set up that makes the .log options window open to export a log. The options selected in this window don't change on their own, but I still need to come up and click 'Ok' or hit 'Enter'. Is there a way to send a keystroke while this window is up?
Could an ExportLog function be submitted as a feature request?
Could an ExportLog function be submitted as a feature request?
Re: VBScript export log
Hi,
ok, here is a VBmacro which will open the Export dialog and hit Enter:
best regards
Michael
ok, here is a VBmacro which will open the Export dialog and hit Enter:
Code: Select all
Sub ExportExample()
' Bring a tracer window into the foreground
Dim wnd
Set wnd = Windows("Test.trc")
wnd.IsActive = True
' Give the Export dialog box some time to open
Wait 500
Dim wsh
Set wsh = CreateObject("WScript.Shell")
' Execute CTRL+E for File->Export...
wsh.SendKeys "^e"
' ...and close the dialog box to start exporting
wsh.SendKeys "{ENTER}"
End Sub
Michael
Re: VBScript export log
Thank you Michael, this is very helpful. This will definitely work for now, but I still think it would be advantageous to have an export command with switches for the different options.
Thanks for the prompt reply!
Thanks for the prompt reply!