Yes, the script is located in the public documents rigrunner directory. Thanks to some gracious help from Dick Bergsing Poweshell I can get the script to run on or off every time.
Yes, the script is located in the public documents rigrunner directory. Thanks to some gracious help from Dick Bergsing Poweshell I can get the script to run on or off every time.
Dan Simpson
Galisteo Observatory
Santa Fe, NM
Dick, thanks for the suggestions. I have not tried those options. I seem to be running successfully this evening but I'll try them tomorrow morning.
Dan Simpson
Galisteo Observatory
Santa Fe, NM
[edit - sorry for the weird place in the thread. I'm getting punchy, now over 10 hours doing tech support today]
Actually not. The RunProgram function takes a separate exe path and command line. This avoids needing to separately backslash-quote the double quotes needed to prevent choking on the path that contains spaces etc:Shouldn't the statement be written this way:
RunProgram("cscript C:\\Users\\Public\\Public Documents\\RigRunner\\rr-ap.js", "1 1 1 x x");
or even just
RunProgram("C:\\Users\\Public\\Public Documents\\RigRunner\\rr-ap.js", "1 1 1 x x");
-- Bob
Then the lines I posted should work. Be sure to do exactly what I posted in this message (<-- link), with the separate arguments, the comma etc. Maybe you'll need to add the //B at the beginning of the second argument string (the command line) ... I don't know what the defaults for your cscript program are set to. Again if this gets too crazy I have you set for a 10AM MDT call Wednesday.
-- Bob
OK, this is it for today/tonight. Been here since 9AM with one hour break and I've been in and out of this one ticket 5 times ha ha.
-- Bob
Okay, Bob.
It just seemed to me that the executable was rr-ap.js, and not CScript. I previously read all the above and took my cues from the above and the use of Util.ShellExec() in AutoFlat.vbs. In that case, there is
TID = Util.ShellExec(LightCtrlProgram, CmdBuf, 0)
where LightCtrlProgram is the actual path to the executable light control program specified in AutoFlatConfig.txt, and the CmdBuf part is the real settings parameters. I see now that CScript operates by taking ITS cmdBuf and further parsing the path as the first part, followed by the parameters as the second part.
I'm sorry I threw this wrench in the gears.
Dick
www.VirgilObservatory.us
Pier-mounted Meade 12-inch SCT "classic"
Optec TCF-S focuser
SBIG CFW-8A and ST7-XMEv
H-alpha, BVRI, RGB & Clear filters
FOV ~15’ x 10’
No problem I understand. the .js is not itself an executable, though it is possible to set up your system to "associate" .js with cscript.exe, the actual executable that "runs" the scripts. Like all scripting languages, a "runner" is needed. For Python you say "python xxx.py", for Perl, you say "perl yyy.pl". But you could associate (e.g.) .py with python.exe and then be able to double click it. I don't like betting that the association is valid because someone will have it broken by some ham radio program or whatever. For me it's safe (minimal tech support issues) if I do it the old-fashioned way, specifying cscript.exe as the executable (and it is always in C:\Windows so no explicit path needed) and then the path to the script. The Windows API call I use to implement ShjellExec inside ACP also takes separate executable and arguments. The "arguments" in this case include the script file path/name.
-- Bob
Egad, the "coolio" UI* designers at Microsoft strike again. I apologize for this bad data:
Originally Posted by Me (Bob)
I know this but it didn't hit me..... Looking at the location of the rr-ap.js script in the Windows 10 File Finder
VOILA! The real path. Not "Public Documents" but "Documents", so
RunProgram("cscript", "C:\\Users\\Public\\Documents\\RigRunner\\rr-ap.js 1 1 1 x x");
-- Bob
There are currently 1 users browsing this thread. (0 members and 1 guests)