PS1 section not working

Forums Desktop Info PS1 section not working

Viewing 4 reply threads
  • Author
    Posts
    • #5803
      Nathan_KNathan_K
      Participant

        I’ve had some issues with GETHTTP not returning data consistently, so I decided to write a small PS1 section to do the same task. The script I wrote works perfectly in a PowerShell window, but when I put it into a [section] it doesn’t work.

        If I use it as a PowerShell script call, it works:
        CMD=interval:120,color:55cc77,text:WAN Address,read-as-csv:1,csv-header:0,file:powershell.exe, parameters:".\Scripts\wan-ip-lookup.ps1",trim:1,show-window:0,hide-no-result:1, display:{{{IPv4: %1 }}}{{{IPv6: %2}}}{{{ |Reverse DNS: %3}}}

        If I call it directly from the [wan-ip-lookup] section I created, I get errors.

        Any assistance would be appreciated, as I’d rather have it contained in a section vs an external script.

        Thanks!

      • #5806
        GlennGlenn
        Keymaster

          I’ll look into this shortly.

        • #5822
          GlennGlenn
          Keymaster

            I’ll try and convey this without mangling the code:

            getting the single/double quote characters right is all important. the third return value has something in there that’s messing up the csv output.

            probably worth adding no-wait:1 as well.

            • This reply was modified 1 month ago by GlennGlenn.
            • This reply was modified 1 month ago by GlennGlenn.
          • #5825
            GlennGlenn
            Keymaster

              Ok, this version sorts out the null values:

              • This reply was modified 1 month ago by GlennGlenn.
            • #5835
              Nathan_KNathan_K
              Participant

                Thanks Glenn.. I had made several revisions to the original PS1 since posting, so here’s the updated version as a block that works inside the .ini file.

            Viewing 4 reply threads
            • You must be logged in to reply to this topic.
            Glenn's Page