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

Flushing .ini file to disk

Expand Messages
  • Jamal Mazrui
    Is there a way to make sure that a .ini file chaged in a clip is written to disk? As I understand it, Windows buffers the saving of .ini files. Some other
    Message 1 of 7 , May 9, 2005
      Is there a way to make sure that a .ini file chaged in a clip is written
      to disk? As I understand it, Windows buffers the saving of .ini files.
      Some other programming languages with which I'm familiar include a
      "Flush" command that one can use to ensure that any bufferred changes
      are written to disk. I did not find such a command in NoteTab Pro.

      I suspect that some problems I'm having with .ini file changes being
      recognized either by NTB or another program with which NTB is exchanging
      data is due to this problem. As a work-around, I wonder if copying the
      .ini file to another, dummy file via the ^!CopyFile command would force
      the .ini file to be saved to disk.

      Jamal
    • hsavage
      ... Jamal, From NoteTab help, ^!ProgIniSave [IniName] entered at an appropriate point in the clip should save the current ???.ini file contents to disk.
      Message 2 of 7 , May 9, 2005
        Jamal Mazrui wrote:

        > Is there a way to make sure that a .ini file chaged in a clip is written
        > to disk? As I understand it, Windows buffers the saving of .ini files.
        > Some other programming languages with which I'm familiar include a
        > "Flush" command that one can use to ensure that any bufferred changes
        > are written to disk. I did not find such a command in NoteTab Pro.
        >
        > I suspect that some problems I'm having with .ini file changes being
        > recognized either by NTB or another program with which NTB is exchanging
        > data is due to this problem. As a work-around, I wonder if copying the
        > .ini file to another, dummy file via the ^!CopyFile command would force
        > the .ini file to be saved to disk.
        >
        > Jamal

        Jamal,

        From NoteTab help, ^!ProgIniSave [IniName] entered at an appropriate
        point in the clip should save the current ???.ini file contents to disk.
        —————————————————————————————————————————————
        ^!ProgIniSave [IniName] (added in v4.6)
        Saves the current program settings into the NoteTab ini file or
        registry. Optionally, you can specify an alternative INI file (it is
        automatically created if it does not exist).

        —————————————————————————————————————————————
        ^!ProgIniLoad [IniName] (added in v4.6)
        Loads options from the NoteTab ini file or registry. Optionally, you can
        specify an alternative INI file (it must exist or else the command sets
        the error condition). Note that the [AutoLoad] section is ignored by
        this command.

        ºvº
        05.05.09
        hrs > hsavage@...
      • Jamal Mazrui
        Thanks for your response. Those are the commands I ve been using. The problem, as I understand it, is that Windows treats .ini files differently from others,
        Message 3 of 7 , May 9, 2005
          Thanks for your response. Those are the commands I've been using. The problem, as I understand it, is that Windows treats .ini files differently from others, buffering changes in memory for a while before actually writing them to disk.
          Jamal



          -----Original Message-----
          From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of hsavage
          Sent: Monday, May 09, 2005 4:15 PM
          To: ntb-clips@yahoogroups.com
          Subject: Re: [Clip] Flushing .ini file to disk


          Jamal Mazrui wrote:

          > Is there a way to make sure that a .ini file chaged in a clip is written
          > to disk? As I understand it, Windows buffers the saving of .ini files.
          > Some other programming languages with which I'm familiar include a
          > "Flush" command that one can use to ensure that any bufferred changes
          > are written to disk. I did not find such a command in NoteTab Pro.
          >
          > I suspect that some problems I'm having with .ini file changes being
          > recognized either by NTB or another program with which NTB is exchanging
          > data is due to this problem. As a work-around, I wonder if copying the
          > .ini file to another, dummy file via the ^!CopyFile command would force
          > the .ini file to be saved to disk.
          >
          > Jamal

          Jamal,

          From NoteTab help, ^!ProgIniSave [IniName] entered at an appropriate
          point in the clip should save the current ???.ini file contents to disk.
          ---------------------------------------------
          ^!ProgIniSave [IniName] (added in v4.6)
          Saves the current program settings into the NoteTab ini file or
          registry. Optionally, you can specify an alternative INI file (it is
          automatically created if it does not exist).

          ---------------------------------------------
          ^!ProgIniLoad [IniName] (added in v4.6)
          Loads options from the NoteTab ini file or registry. Optionally, you can
          specify an alternative INI file (it must exist or else the command sets
          the error condition). Note that the [AutoLoad] section is ignored by
          this command.

          ºvº
          05.05.09
          hrs > hsavage@...




          Fookes Software: http://www.fookes.us, http://www.fookes.com
          Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm

          Yahoo! Groups Links
        • Larry Hamilton
          James, The ini files that you create with NoteTab are usually ini files for use with a clip to store values between runs of the clip. I have never had any
          Message 4 of 7 , May 9, 2005
            James,

            The ini files that you create with NoteTab are usually ini files for use
            with a clip to store values between runs of the clip.

            I have never had any issues with "timing" and the ini files I use with
            some of my clips.

            If you are working with the ini file that goes with another program,
            then you need to understand that program very well. Most programs do not
            write to their own ini file until the program exits normally. This is
            true of NoteTab's ini file, if Windows crashes before NoteTab shuts
            down. This would be the buffering. The ini files that the clip commands
            use are written to immediately.

            Larry Hamilton
            Kairos Computer Solutions
            http://www.kairoscomputers.com/
            Sales Affiliate for Grisoft Anti-Virus

            Jamal Mazrui wrote:
            > Thanks for your response. Those are the commands I've been using. The problem, as I understand it, is that Windows treats .ini files differently from others, buffering changes in memory for a while before actually writing them to disk.
            > Jamal
            >
            >
            >
            > -----Original Message-----
            > From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of hsavage
            > Sent: Monday, May 09, 2005 4:15 PM
            > To: ntb-clips@yahoogroups.com
            > Subject: Re: [Clip] Flushing .ini file to disk
            >
            >
            > Jamal Mazrui wrote:
            >
            > > Is there a way to make sure that a .ini file chaged in a clip is written
            > > to disk? As I understand it, Windows buffers the saving of .ini files.
            > > Some other programming languages with which I'm familiar include a
            > > "Flush" command that one can use to ensure that any bufferred changes
            > > are written to disk. I did not find such a command in NoteTab Pro.
            > >
            > > I suspect that some problems I'm having with .ini file changes being
            > > recognized either by NTB or another program with which NTB is exchanging
            > > data is due to this problem. As a work-around, I wonder if copying the
            > > .ini file to another, dummy file via the ^!CopyFile command would force
            > > the .ini file to be saved to disk.
            > >
            > > Jamal
            >
            > Jamal,
            >
            > From NoteTab help, ^!ProgIniSave [IniName] entered at an appropriate
            > point in the clip should save the current ???.ini file contents to disk.
            > ---------------------------------------------
            > ^!ProgIniSave [IniName] (added in v4.6)
            > Saves the current program settings into the NoteTab ini file or
            > registry. Optionally, you can specify an alternative INI file (it is
            > automatically created if it does not exist).
            >
            > ---------------------------------------------
            > ^!ProgIniLoad [IniName] (added in v4.6)
            > Loads options from the NoteTab ini file or registry. Optionally, you can
            > specify an alternative INI file (it must exist or else the command sets
            > the error condition). Note that the [AutoLoad] section is ignored by
            > this command.
            >
            > ºvº
            > 05.05.09
            > hrs > hsavage@...
          • John Zeman
            ... The problem, as I understand it, is that Windows treats .ini files differently from others, buffering changes in memory for a while before actually writing
            Message 5 of 7 , May 9, 2005
              --- In ntb-clips@yahoogroups.com, "Jamal Mazrui" <Jamal.Mazrui@f...>
              wrote:
              > Thanks for your response. Those are the commands I've been using.
              The problem, as I understand it, is that Windows treats .ini files
              differently from others, buffering changes in memory for a while
              before actually writing them to disk.
              > Jamal
              >


              In addition to what the others have said, here is another way you can
              think about NoteTab ini files.

              Basically changing values in the NoteTab ini file involves a 3 step
              procedure.

              In a clip at the point where you are ready to do something with the
              ini file, the first step is to save the actual dynamic settings of
              the ini file (which is contained in Windows memory) to disk by file
              using

              ^!ProgIniSave

              Then write whatever changes you want to the ini file immediately
              after that. Finally, you'll want to reload the ini file back into
              Windows memory again by using

              ^!ProgIniLoad

              For example the following simple clip adjusts the NoteTab ini file
              (regardless of what it is at the moment in Windows memory) to set the
              widths of the Clipbook, Quicklist, and outline columns to 150 pixels.


              ^!ProgIniSave
              ^!SaveValue Clipbook:PanelWidth=150
              ^!SaveValue Quicklist:PanelWidth=150
              ^!SaveValue OutlineList:PanelWidth=150
              ^!ProgIniLoad

              John
            • hsavage
              ... John, You may be correct but I would like Eric or Jody to verify the above. It seems the sequence is a little off. Shouldn t the ^!ProgIniSave command be
              Message 6 of 7 , May 9, 2005
                John Zeman wrote:

                > In addition to what the others have said, here is another way you can
                > think about NoteTab ini files.
                >
                > In a clip at the point where you are ready to do something with the
                > ini file, the first step is to save the actual dynamic settings of
                > the ini file (which is contained in Windows memory) to disk by file
                > using
                >
                > ^!ProgIniSave
                >
                > Then write whatever changes you want to the ini file immediately
                > after that. Finally, you'll want to reload the ini file back into
                > Windows memory again by using
                >
                > ^!ProgIniLoad
                >
                > For example the following simple clip adjusts the NoteTab ini file
                > (regardless of what it is at the moment in Windows memory) to set the
                > widths of the Clipbook, Quicklist, and outline columns to 150 pixels.
                >
                >
                > ^!ProgIniSave
                > ^!SaveValue Clipbook:PanelWidth=150
                > ^!SaveValue Quicklist:PanelWidth=150
                > ^!SaveValue OutlineList:PanelWidth=150
                > ^!ProgIniLoad
                >
                > John

                John,

                You may be correct but I would like Eric or Jody to verify the above.
                It seems the sequence is a little off.

                Shouldn't the ^!ProgIniSave command be immediately after the ^!SaveValue
                commands to allow all the most current information entered or saved to
                be written to disk then followed by ^!ProgIniLoad to load the newly
                saved disk file back into memory with all its up to date changes intact?

                This is the command order I would use but I could be wrong, thus the
                call for clarification from 'above'.

                ^!SaveValue Clipbook:PanelWidth=150
                ^!SaveValue Quicklist:PanelWidth=150
                ^!SaveValue OutlineList:PanelWidth=150
                ^!ProgIniSave
                ^!ProgIniLoad

                One, also, may have some success using the ^!Setinifile command to close
                an ini file in use then re-use it to re-access the same ini file.

                ºvº
                05.05.09
                hrs > hsavage@...
              • John Zeman
                ... I don t think so Harvey as the ^!SaveValue command writes directly to the ini file as it exists on the disk at the time you invoke it. Normally the ini
                Message 7 of 7 , May 9, 2005
                  --- In ntb-clips@yahoogroups.com, hsavage <hsavage@p...> wrote:
                  > John Zeman wrote:
                  >
                  > Shouldn't the ^!ProgIniSave command be immediately after the ^!SaveValue
                  > commands to allow all the most current information entered or saved to
                  > be written to disk then followed by ^!ProgIniLoad to load the newly
                  > saved disk file back into memory with all its up to date changes intact?



                  I don't think so Harvey as the ^!SaveValue command writes directly to the ini file as it exists on the disk at the time you invoke it.

                  Normally the ini file on disk is not updated by NoteTab until you actually close NoteTab or exit Windows.

                  So if you write to the ini file using the ^!SaveValue command then later use the ^!ProgIniSave command (or just close NoteTab) you will overwrite the ini file changes you just made with whatever is current in the Windows memory for the ini file.

                  John
                Your message has been successfully submitted and would be delivered to recipients shortly.