#1
|
|||
|
|||
VBScript Question
How do I add CRTL F4 (Close Session TAB) into a VBScript? The script looks like this:
Sub Main crt.Screen.Send "****" & chr(13) crt.Screen.WaitForString " # ", 2 crt.Screen.Send "LOGO" & chr(13) crt.Screen.WaitForString " ! ", 2 crt.Screen.Send chr(4) End Sub Need to add Close Session TAB at the end of the script? Help. Thanks, Tom. |
#2
|
|||
|
|||
Hi Tom,
It is not currently possible to close a tab that has a running script. Can you tell me more about your goal? What version of SecureCRT are you using? |
#3
|
|||
|
|||
I'm using SecureCRT 7.0.4. I have a "Logoff" script built into a HotKey that allows me to logoff of a session within a TAB. The script works fine but does not close the TAB. I have to manually close the TAB each time. I would like to have the TAB close at the same time I am logging off of the Session. The VanDyke manual says I can do a "CTRL + F4" to close a TAB, which works ok, but I was thinking I could add the following to my script:
"crt.Session.Disconnect". Will this close the TAB? |
#4
|
|||
|
|||
The other issue I'm having is, ever since we went to WIN 7 from Win XP I have not been able to import .VBS files into MS Visual Basics. This is very frustrating as I do not know how to edit my SecureCRT .VBS files now. Anyone else have this issue?
|
#5
|
|||
|
|||
Hi Tom,
Using the Disconnect() method of the Session object will only disconnect the session. If you were to enable Close on disconnect located in the Terminal category of the Session Options, you may get the behavior you want. Does this help? Quote:
If so, you can edit them in Notepad by right-clicking on the script file and selecting Edit from the context menu. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|