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

Re: [Clip] Reading path from ini file

Expand Messages
  • Harvey R. Savage
    ... = V5 MultiLine NoSorting TabWidth=30 h=_OnOpen ^!ChDir ^$GetShort(^$GetLibraryPath$)$ ^!SetIniFile testclip ^!Set
    Message 1 of 2 , Jun 1, 2001
    • 0 Attachment
      Marcus wrote:
      >
      > ------------------------------------------------------
      > _OnOpen
      > ^!ChDir ^$GetShort(^$GetLibraryPath$)$
      > ^!SetIniFile testclip
      > ^!Set %path%=^$GetShort("^$GetValue(ClipValues:Directory)$")$
      > ^%path%
      > ---------------------------------------------------------
      >
      > testclip.ini
      >
      > [ClipValues]
      > "Directory"="C:\Program Files\ThisApp\"
      > -------------------------------------------------------
      >
      > Is there a syntax error?
      >
      > Thanks,
      >
      > Marcus


      = V5 MultiLine NoSorting TabWidth=30

      h=_OnOpen
      ^!ChDir ^$GetShort(^$GetLibraryPath$)$
      ^!SetIniFile testclip
      ^!Set %path%=^$GetShort(^$GetValue("ClipValues:Directory")$)$
      ^%path%
      ---------------------------

      [ClipValues]
      Directory="d:\Program Files\ntp\tmp\"


      Marcus,

      The example above works with a legitimate path in the ini file.

      You had extra quotes in the inifile and misplaced quotes in the
      clip.

      hrs
    • Stephen Riddle
      Hi Marcus, Yes. (Why else would there ever be a problem with NoteTab?) ... One problem is that in the .ini file the word Directory is enclosed in double
      Message 2 of 2 , Jun 2, 2001
      • 0 Attachment
        Hi Marcus,
        Yes. (Why else would there ever be a problem with NoteTab?)

        > ^!Set %path%=^$GetShort("^$GetValue(ClipValues:Directory)$")$
        > ^%path%

        > testclip.ini
        >
        > [ClipValues]
        > "Directory"="C:\Program Files\ThisApp\"

        > Is there a syntax error?
        >
        > Thanks,
        >
        > Marcus

        One problem is that in the .ini file the word 'Directory' is enclosed
        in double quotes.
        If that is the way you want to keep it, the command to retrieve it needs
        to be:
        ^!Set %path%=^$GetShort("^$GetValue(ClipValues:"Directory")$")$

        I would suggest instead you look at the clip to save the value and
        remove one layer of quotes. There are specific rules in the clip
        language on the GetValue and SaveValue functions as to needing quotes
        and I believe having the key be in quotes could be confusing to the
        programmer (if not NoteTab itself.)
        G'luck,
        Stephen
      Your message has been successfully submitted and would be delivered to recipients shortly.