It works for me. Or you can try one more thing to try: AlertIf( 1, "EXEC C:\\WINDOWS\\system32\\cscript.exe", "C:\\Test.js", 0, 0, 0 );
On Mon, Sep 28, 2009 at 1:46 PM, Herman <[email protected]> wrote: > > > Thanks Mark, but no go :-( if this idea worked we could write simple > function like > > RunJScript( "test.js" ); > > Would be very handy i would think... > > herman > > > Mark Hike wrote: > > Shouldn't it be something like: > AlertIf( 1, "EXEC cscript", "C:\\Test.js", 0, 0, 0 ); > > On Mon, Sep 28, 2009 at 12:28 PM, Herman <[email protected]> wrote: > >> >> >> No go, I tried every mutation i could think of. Single/double backslash, >> spaces no spaces, even placed the script in the root dir: >> >> if ( ParamTrigger( "Test", "TEST" ) ) AlertIf( 1, "CScript >> C:\\Test.js", "", 0, 0, 0 ); >> >> CScript works fine from the Run window. >> >> Can someone show me the correct statement? >> >> Thanks, >> herman >> >> >> >> >> Tomasz Janeczko wrote: >> >> It is possible but... you have syntax error in that line (semicolin inside >> if) >> and there is a space in the path to script and Cscript interprets >> F:\\Program as a path to script >> and the rest as argument. >> >> Best regards, >> Tomasz Janeczko >> amibroker.com >> >> ----- Original Message ----- >> *From:* Herman <[email protected]> >> *To:* [email protected] >> *Sent:* Monday, September 28, 2009 4:00 PM >> *Subject:* Re: [amibroker] Re: Is it possible to launch a jscript from >> AlertIf()? >> >> Thanks murthysuresh, but no go, i tried this: >> >> if ( ParamTrigger( "Test", "TEST" );) AlertIf( 1,"CScript "+"F:\\Program >> Files\\AmiBroker\\Test.js", "", 0, 0, 0 ); >> >> This should lunch the small test.js: >> >> var Shell = new ActiveXObject("WScript.Shell"); >> Shell.Popup("Test", 1); >> >> I am designing a gfx control panel and want to consolidate all system >> operations. Including running jscripts to control AA action, by clicking a >> gfx button. I guess this is not possible. What a pity...Param windows are >> such a pain to work with. >> >> Best regards, >> herman >> >> Herman wrote: >> >> Thanks you, I'll be playing with that :-) >> >> herman >> >> murthysuresh wrote: >> >> you can launch Js file with cscript. >> >> Usage: CScript scriptname.extension [option...] [arguments...] >> Options: >> //B Batch mode: Suppresses script errors and prompts from displaying >> //D Enable Active Debugging >> //E:engine Use engine for executing script >> //H:CScript Changes the default script host to CScript.exe >> //H:WScript Changes the default script host to WScript.exe (default) >> //I Interactive mode (default, opposite of //B) >> //Job:xxxx Execute a WSF job >> //Logo Display logo (default) >> //Nologo Prevent logo display: No banner will be shown at execution time >> //S Save current command line options for this user >> //T:nn Time out in seconds: Maximum time a script is permitted to run >> //X Execute script in debugger >> //U Use Unicode for redirected I/O from the console >> >> >> >> --- In [email protected], Herman <psy...@...> <psy...@...> wrote: >> >> >> Is something like this possible: >> >> AlertIf( 1,"Run"+"F:\\Program Files\\AmiBroker\\temp\\Test.js", "", 0, >> 0, 0 ); >> >> Would anyone know? >> >> thanks, >> herman >> >> >> >> ------------------------------------ >> >> **** IMPORTANT PLEASE READ **** >> This group is for the discussion between users only. >> This is *NOT* technical support channel. >> >> TO GET TECHNICAL SUPPORT send an e-mail directly to >> SUPPORT {at} amibroker.com >> >> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER >> athttp://www.amibroker.com/feedback/ >> (submissions sent via other channels won't be considered) >> >> For NEW RELEASE ANNOUNCEMENTS and other news always check >> DEVLOG:http://www.amibroker.com/devlog/ >> >> Yahoo! Groups Links >> >> >> >> >> >> > >
