Loading ...
Sorry, an error occurred while loading the content.

Re: [NRN] Problem with Options:PerlExe in ini file

Expand Messages
  • Jason Waugh
    Hi Sheri, S How can I properly update Options:PerlExe before a ^!RunPerl is S executed. I was planning to bypass the ^!RunPerl if the ^$GetValue$ S in
    Message 1 of 2 , Nov 4, 2002
    • 0 Attachment
      Hi Sheri,

      S> How can I properly update Options:PerlExe before a ^!RunPerl is
      S> executed. I was planning to bypass the ^!RunPerl if the ^$GetValue$
      S> in Options:PerlExe doesn't exist (based on ^!IfFileExist).


      I'm not quite sure what you are trying to do here, but ^$GetPerlExe$
      will return the location of your perl.exe.

      example (from my PerlDE clip library, an older version of which is at
      the NoteTab site):

      ^!Shell "^$GetLibraryPath$launch.bat" "^$GetPerlExe$ ^$GetShort("^**")$"


      So for what it seems you want to do, you could check the value of
      ^$GetPerlExe$ and if it's empty, bypass that part of your script that
      does ^!RunPerl.

      I've copied this to the CLIPS list, so any conversation can continue
      there (this list is for discussions on the Next Release)


      --
      Regards,
      Jason Waugh
    • Jason Waugh
      Hi Sheri, S It would be nice if the special purpose function could actually S locate Perl.exe when its on the path, without requiring the user to S browse
      Message 2 of 2 , Nov 5, 2002
      • 0 Attachment
        Hi Sheri,

        S> It would be nice if the special purpose function could actually
        S> locate Perl.exe when its on the path, without requiring the user to
        S> browse to it. However, since this is usually only a one time setup
        S> maybe it doesn't warrant the effort.

        I wasn't aware that ^!GetPerlexe^ prompted for input, I thought it
        just returned a blank value if there was no Perl.

        I suppose your only choice then is to read the .INI file - copy the
        contents of it to a variable, then test that variable with a regexp to
        determine if there is something other than a "\n" next to the
        "PerlExe=" ("PerlExe=\n" will be true if no perl, "PerlExe=.+\n" will
        be true if there is a perl.)


        --
        Regards,
        Jason Waugh
      Your message has been successfully submitted and would be delivered to recipients shortly.