Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-16-2017, 01:01 PM
eFudd eFudd is offline
Registered User
 
Join Date: Nov 2017
Posts: 2
Access to Terminal Window while the message box is displayed

Greetings,

Currently, when I display a message box via VBscript in SecureCRT, I am unable to access the terminal window in the background. Is there a simple way to accomplish this with a message box?

Basically, I am trying to run the script from SecureCRT, which:

1. Sends a command to display some output, like a list of Host Names.
2. Prompts the user to choose an applicable Hostname by copying it from the terminal output.
3. Then I'll do the rest using what's in the clipboard...

I could send the command output in step 1 to a text file and open the file so the user can copy from there, but I'm hoping there is a simpler way.

Thanks in advance!
Reply With Quote
  #2  
Old 11-16-2017, 03:30 PM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 293
Hi eFudd,

A MessageBox will always be "blocking", you will not be able to access SecureCRT without first interacting with the MessageBox.

Without knowing a little more about what exactly you're trying to accomplish it is a little difficult for me to suggest alternatives.

What language are you using? What Operating System will you users being using?

How many hostnames are you expecting to list? What will you do with them after selected?

What type of device are your users connecting to? Can you make any changes to that system? What command are you running to list the available hostnames?

Several potential solutions come to mind.

1) Your MessageBox could simply inform the user to make a selection then "Press Any Key...". Your user would close the MessageBox , make their selection, then press any key to let the
script know to continue.

2) After your MessageBox you could run a loop that looks for a selection to be started and end, running the rest of your script after that selection is made.

3) Using an IE object to create something like a custom UI

Hopefully with a little more insight into what you're trying to accomplish I can help provide a more tailored solution.
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 11-17-2017, 10:49 AM
eFudd eFudd is offline
Registered User
 
Join Date: Nov 2017
Posts: 2
Hi Eric,

Thanks for the reply! I am using VBscript with SecureCRT on Windows 7.

Your first suggestion will work nicely, using crt.Screen.WaitForKey()
Reply With Quote
  #4  
Old 11-17-2017, 11:09 AM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 293
Hi eFudd,

I'm glad to hear that you found a solution that works for you. Please don't hesitate to reach out if you have any other questions.
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 07:48 AM.