Xshell Forum

provide input parameters for vbs via gui

Last post: Monday, October 28, 2013 8:21 PM by lt, 6 reply

 
Friday, January 11, 2013 6:31 AM - Vladimir

provide input parameters for vbs via gui

 
Hi!

I'd like to ask some help here. I've wrote pretty big automation vbs script for XShell, but I have a tiny problem with that. Everytime I launch it I have to change script itself in different places (mainly these parameters are path to bin files). Is there any way to provide this paramter via some type of gui wrote on vbs (or maybe xshell have it's own instruments for such a tasks)?

Thanks in advance.

Program Ver. : Xshell 4
Thursday, January 17, 2013 1:30 AM - Vladimir

Re: provide input parameters for vbs via gui

 
I tried the to run the following script from the Xshell:
Dim str
str = InputBox("Please enter a name for your new file:", "Create File")
WScript.Quit

but failed with the error(in attach), although this script can be easily run just by mouse double click.
Can you, please, tell me if it can be fixed or it is some type of restriction of XShell?

Thank you in advance!
Thursday, January 17, 2013 3:51 PM - mochi

Re: provide input parameters for vbs via gui

 
open xshell and go to help > xshell help. Under search, type in script. there are examples of scripting and has set functions/variables and its parameters you can use with xshell. hope that helps

Friday, January 18, 2013 3:42 AM - Vladimir

Re: provide input parameters for vbs via gui

 
I understand how to write vbs scripts and, actually, I'm pretty good in it ;) The question is why calling InputBox() retruns error like I called it from server side (I mean this error usually pops up when InputBox() is called from, say, asp.net code and this is forbidden). Simple launching of this script works fairly well, but in xshell it fails. I suppose it is restriction of xshell, but, naturally, not sure.
Monday, October 28, 2013 4:16 AM - lt

Re: provide input parameters for vbs via gui

 
The Same Question !
why xsh dose not support inputbox() Call?

Please help!
Monday, October 28, 2013 5:36 PM - Support

Re: provide input parameters for vbs via gui

 
You can use Prompt() to receive user input. It can be used in the following format:

Dim result = xsh.Dialog.Prompt("msg", "title", "editstring", bPassword)



---
Technical Support
Monday, October 28, 2013 8:21 PM - lt

Re: provide input parameters for vbs via gui

 
Thx!