Page 1 of 1

How to invoke script by comand line and javascript?

Posted: 28 May 2014 22:21
by ruslaw
I can call XYplorer from command line with command:

Code: Select all

start "" "D:\programs\xyplorer\XYplorer.exe"
and with javascript:

Code: Select all

<html><head>
        <script type="text/javascript">
        function runProgram()     { 
            var shell = new ActiveXObject("WScript.Shell");
            var appWinMerge = "D:\\programs\\xyplorer\\XYplorer.exe";
            shell.Run(appWinMerge);
        }
        </script>
    </head><body>
    <a href="javascript:runProgram()">Run program</a>
    </body></html>
How to modify them if I need to start XYplorer and invoke script from myscript.xys file and could I put this script file at any place I need not only at "..\Data\Scripts\" ?
Thanks

Re: How to invoke script by comand line and javascript?

Posted: 28 May 2014 23:38
by PeterH
Basically supply start with parameter /script=x:\a\b\name.xys

Don't know how to do that in javascript... :roll:

Re: How to invoke script by comand line and javascript?

Posted: 29 May 2014 00:10
by highend
Is this really different from your previous posting (http://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=11749)?

Code: Select all

<html><head>
        <script type="text/javascript">
        function runProgram()     {
            var shell = new ActiveXObject("WScript.Shell");
            var appWinMerge = "\"D:\\Users\\Highend\\Tools\\XYplorer\\XYplorer.exe\" /script=\"D:\\Temp\\test.xys\"";
            shell.Run(appWinMerge);
        }
        </script>
    </head>

    <body>
        <a href="javascript:runProgram()">Run program</a>
    </body></html>

Re: How to invoke script by comand line and javascript?

Posted: 29 May 2014 00:12
by ruslaw
thanks a lot