Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-26-2013, 02:51 AM
dshaulis dshaulis is offline
Registered User
 
Join Date: Nov 2012
Location: Dallas, TX
Posts: 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
Reply With Quote
  #2  
Old 02-26-2013, 09:21 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,636
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:
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.
Could you provide additional information regarding the above statement?

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
Reply With Quote
  #3  
Old 01-11-2019, 01:26 PM
jlev jlev is offline
Registered User
 
Join Date: Oct 2018
Posts: 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.
Reply With Quote
Reply

Tags
execute , scripting

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 06:19 AM.