5 Replies Latest reply on Mar 18, 2011 12:18 PM by Olav Martin Kvern

    How to pass variable from JSX to VBS

    Skempy Level 1

      Hi,

       

      I have an Event calling a VBS script using the javascript below and want to pass the Event (or the parent of the Event - the document) to the VBS.

       

      myScript = "c:/test.vbs";
           app.doScript(myScript, ScriptLanguage.visualBasic,[myEvent]);

       

      However, my simple VBS script does not display anything.

       

      rem test.vbs script

      msgbox myEvent

       

       

      I have tried just passing a string through as a variable but no luck.

       

      myVariable = "Hello World";

      myScript = "c:/test.vbs";
           app.doScript(myScript, ScriptLanguage.visualBasic,[myVariable]);

       

      rem test.vbs script

      msgbox myVariable

       

       

      I am sure this should be simple but the only info I can find online is to do with javascript and vbs in HTML and ASP.

       

      Thanks for any help.

       

      Simon.