Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: M3SYSTEMS on November 13, 2012, 09:58:03 pm

Title: InputBox function for Jscript ?
Post by: M3SYSTEMS on November 13, 2012, 09:58:03 pm
Hi all,

I use a EA Jscript to generate RTF documents.
I would like to add to this script an "inputbox" (as the VB InputBox function) for opening an user dialog box aiming at setting a list of parameters.
Does anyone have a JScript example?
Thanks!

OG
Title: Re: InputBox function for Jscript ?
Post by: Geert Bellekens on November 14, 2012, 01:03:13 am
I've seen this question (and the answer) come by a couple of times in the past.

Try searching the forum using the top left search button. (and mind the options)

Geert
Title: Re: InputBox function for Jscript ?
Post by: M3SYSTEMS on November 14, 2012, 01:39:34 am
YES!  :)

I found the solution by using the search window & options.

Thanks a lot for your advice.

OG

///////////////////////////////
function InputBox(varname,title) {
     var vb = new ActiveXObject('ScriptControl');
     vb.Language = 'VBScript';
     return vb.eval("InputBox(\"" + varname + "\", \"" + title + "\")");
}