Author Topic: [EA Scripting] How to get data from user JScript?  (Read 3165 times)

asseco

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
[EA Scripting] How to get data from user JScript?
« on: September 07, 2011, 07:07:04 pm »
I want to write script like "Searching element by guid" so I need geting guid from user.

Is there any method to geting data from user using scripting (JScript)
or maybe other solutions to search EA repository by guid.


pha

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: [EA Scripting] How to get data from user JScri
« Reply #1 on: September 08, 2011, 12:24:21 am »
To obtain data from user use JScript code below:
Code: [Select]
function input_dialog(promptText, title, defaultText)
{
      var window = new ActiveXObject("ScriptControl");
      window.Language = "VBScript";
      promptText = "Text";
      title = "Title";
      defaultText = "Data From User";
      output = window.eval ( "InputBox(\"" + promptText + "\",\"" + title +
"\",\"" + defaultText + "\")");
}
input_dialog();      
« Last Edit: September 08, 2011, 07:05:56 pm by 666999 »

asseco

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: [EA Scripting] How to get data from user JScri
« Reply #2 on: September 08, 2011, 06:59:54 pm »
Clear and simple. It works. Thx