#1
|
|||
|
|||
How to execute another CRT VBS script from within one
Thanks for any help you can provide. I am looking to launch one of three scripts based on input from an IE Dialog box. If the user selects to run Procedure A, then a.vbs would be executed in the window. Same for Procedure B and C respectively.
The posts that i have seen on the forum talk about reading in the VBS script and using the "execute" or "executeglobal" methods which neither one seem to work for me. I know that if the VBS scripts are run via a button or from the Script->Run menu option, they complete without issues. Also, each script (A, B or C) is very lengthy and has many Sub's and Functions in each one. Any help would be greatly appreciated. David |
#2
|
|||
|
|||
Hi David,
The Execute or ExecuteGlobal statements will be the only way you can accomplish your objective in SecureCRT. Ideally you would just have one script and then each (script ABC) is in its own function, but it is understandable if you have to handle it this way due to each script (script ABC) having multiple subs and functions within. Quote:
In what way do these methods not work for you? Did you get an error? If so, what was it? Does the "main script" (responsible for the IE dialog box) seem to "hang"? If so, if you choose Cancel from the Script menu option, what is the error? As a note, I have added this thread to a feature request in our product enhancement database to add the ability to run multiple scripts in succession. Should a future release of SecureCRT include this feature, notification will be posted here. If you prefer direct e-mail notification, contact support@vandyke.com and include "Feature Request - Forum Thread #10905" in the subject line.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
Quote:
I know that if the VBS scripts are run via a button or from the Script->Run menu option, they complete without issues. If using the "Execute" or "ExecuteGlobal" commands, the scripts A, B, and C, should not be able to work independently within SecureCRT when using the "Run > Script" menu option. Scripts A, B, and C that are being called or executed cannot have the SecureCRT header at the top of the script. Last edited by ekoranyi; 01-11-2019 at 01:52 PM. |
![]() |
Tags |
execute , scripting |
Thread Tools | |
Display Modes | Rate This Thread |
|
|