Page 4 of 4 FirstFirst 1234
Results 31 to 38 of 38
  1. #31

    Default

    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

  2. #32

    Default

    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

  3. #33
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    30,761

    Default

    [edit - sorry for the weird place in the thread. I'm getting punchy, now over 10 hours doing tech support today]

    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");
    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:



    -- Bob

  4. #34
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    30,761

    Default

    Quote Originally Posted by Dan Simpson View Post
    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.
    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

  5. #35
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    30,761

    Default

    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

  6. #36
    Join Date
    Nov 2005
    Location
    Virgil, NY
    Posts
    5,536

    Default

    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-XME
    H-alpha, BVRI, RGB & Clear filters
    FOV ~ 15' x 10'


  7. #37
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    30,761

    Default

    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

  8. #38
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    30,761

    Default

    Egad, the "coolio" UI* designers at Microsoft strike again. I apologize for this bad data:

    Quote Originally Posted by Me (Bob)
    Almost, the program and command line need to be separate arguments:

    RunProgram("cscript", "C:\\Users\\Public\\Public Documents\\RigRunner\\rr-ap.js 1 1 1 x x");

    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

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. ACP Web Utility for Controlling Observatory Power Strip over the Internet
    By Robert Capon in forum Add-Ons, Enhancements, and Helper Components
    Replies: 53
    Last Post: Feb 14, 2017, 15:28
  2. Web Switch/Windows 10
    By Steve Reilly in forum Hardware/Software/Driver Topics Not Directly Related to Our Software
    Replies: 18
    Last Post: Mar 25, 2016, 00:53
  3. IP Power Switch control over ACP Web interface
    By Josef Huber in forum Add-Ons, Enhancements, and Helper Components
    Replies: 2
    Last Post: Jan 13, 2015, 11:25

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •