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

Determining Active INI Filename?

Expand Messages
  • John Mitchell
    Per the NTB documentation... If you are very familiar with INI files, you can edit NoteTab s own INI file like any other document. To have your changes taken
    Message 1 of 10 , Aug 30, 2005
    • 0 Attachment
      Per the NTB documentation...

      "If you are very familiar with INI files, you can edit NoteTab's own INI
      file like any other document. To
      have your changes taken into account when you reopen NoteTab, you must
      rename the file by adding
      an exclamation mark in front of the name (e.g. !NoteTab.INI). Next time
      you run NoteTab, the content
      of the renamed INI file will be used."

      I have been experimenting with alternative INI files (e.g. test.ini) and
      can confirm that the same holds true for !test.ini. This led me to
      consider various possibilities. Specifically, I'd like to write a clip
      to open the current INI file, whatever it happens to be, and rename with
      an exclamation mark prefix ready to save. I have had a look at the Clip
      help file but can't find any way to programmatically establish what INI
      file is in use. Have I missed something or is this simply not possible?

      Regards, John M


      [Non-text portions of this message have been removed]
    • hsavage
      ... exclamation ... John M, I haven t tried using the ! to prefix other inifiles so I ll assume you re correct. But, it s unnecessary, inifiles other than
      Message 2 of 10 , Aug 30, 2005
      • 0 Attachment
        John Mitchell wrote:
        > Per the NTB documentation...
        >
        > "If you are very familiar with INI files, you can edit NoteTab's own INI
        > file like any other document. To have your changes taken into account
        > when you reopen NoteTab, you must rename the file by adding an
        exclamation
        > mark in front of the name (e.g. !NoteTab.INI). Next time you run NoteTab,
        > the content of the renamed INI file will be used."
        >
        > I have been experimenting with alternative INI files (e.g. test.ini) and
        > can confirm that the same holds true for !test.ini. This led me to
        > consider various possibilities. Specifically, I'd like to write a clip
        > to open the current INI file, whatever it happens to be, and rename with
        > an exclamation mark prefix ready to save. I have had a look at the Clip
        > help file but can't find any way to programmatically establish what INI
        > file is in use. Have I missed something or is this simply not possible?
        >
        > Regards, John M

        John M,

        I haven't tried using the '!' to prefix other inifiles so I'll assume
        you're correct. But, it's unnecessary, inifiles other than NotePro.ini
        and NoteTab.ini are merely text files and if you edit them, close and
        reload them, the changes will be reflected upon reloading that
        particular inifile.

        Below is a short 3 line clip to prove the point. The constant is that
        NoteTab seems to be configured to favor the 'libraries' folder as the
        storage location for alternative inifiles.

        These extra inifiles can be stored, and accessed, in other folders but
        without very special considerations why not use the 'libraries' folder
        as NoteTab is configured?

        If you store your extracurricular inifiles in the libraries folder you
        won't have to specify a path when you access them with ^!SetIniFile
        xxx.ini command.

        NotePro.ini and NoteTab.ini are the difficult inifiles to edit, which I
        guess is why we have the option to preface the name with '!', but they
        can be manipulated to save edited changes without shutting down NoteTab.

        The exclamation mark, I think, is more of a trouble-shooting tool than a
        way to save changes.

        H="test inis"
        ^!SetIniFile test.ini
        ^!Open ^$GetIniFile$
        ; do editing - close, reopen inifile

        from NoteTab help;
        ^$GetIniFile$
        Returns the name of the INI file defined by the SetIniFile command.
        Returns a blank string if NoteTab's INI file is used.

        ºvº
        05.08.30
        hrs > hsavage@...
      • John Mitchell
        ^$GetIniFile$ was the missing link. If executed in a clip it tells me what the current INI file path/name is. Regards, John M
        Message 3 of 10 , Aug 31, 2005
        • 0 Attachment
          ^$GetIniFile$ was the missing link. If executed in a clip it tells me what the current INI file path/name is.

          Regards, John M

          hsavage wrote:

          >John Mitchell wrote:
          > > Per the NTB documentation...
          > >
          > > "If you are very familiar with INI files, you can edit NoteTab's own INI
          > > file like any other document. To have your changes taken into account
          > > when you reopen NoteTab, you must rename the file by adding an
          >exclamation
          > > mark in front of the name (e.g. !NoteTab.INI). Next time you run NoteTab,
          > > the content of the renamed INI file will be used."
          > >
          > > I have been experimenting with alternative INI files (e.g. test.ini) and
          > > can confirm that the same holds true for !test.ini. This led me to
          > > consider various possibilities. Specifically, I'd like to write a clip
          > > to open the current INI file, whatever it happens to be, and rename with
          > > an exclamation mark prefix ready to save. I have had a look at the Clip
          > > help file but can't find any way to programmatically establish what INI
          > > file is in use. Have I missed something or is this simply not possible?
          > >
          > > Regards, John M
          >
          >John M,
          >
          >I haven't tried using the '!' to prefix other inifiles so I'll assume
          >you're correct. But, it's unnecessary, inifiles other than NotePro.ini
          >and NoteTab.ini are merely text files and if you edit them, close and
          >reload them, the changes will be reflected upon reloading that
          >particular inifile.
          >
          >Below is a short 3 line clip to prove the point. The constant is that
          >NoteTab seems to be configured to favor the 'libraries' folder as the
          >storage location for alternative inifiles.
          >
          >These extra inifiles can be stored, and accessed, in other folders but
          >without very special considerations why not use the 'libraries' folder
          >as NoteTab is configured?
          >
          >If you store your extracurricular inifiles in the libraries folder you
          >won't have to specify a path when you access them with ^!SetIniFile
          >xxx.ini command.
          >
          >NotePro.ini and NoteTab.ini are the difficult inifiles to edit, which I
          >guess is why we have the option to preface the name with '!', but they
          >can be manipulated to save edited changes without shutting down NoteTab.
          >
          >The exclamation mark, I think, is more of a trouble-shooting tool than a
          >way to save changes.
          >
          >H="test inis"
          >^!SetIniFile test.ini
          >^!Open ^$GetIniFile$
          >; do editing - close, reopen inifile
          >
          >from NoteTab help;
          >^$GetIniFile$
          >Returns the name of the INI file defined by the SetIniFile command.
          >Returns a blank string if NoteTab's INI file is used.
          >
          >ºvº
          >05.08.30
          >hrs > hsavage@...
          >
          >
        • Jamal Mazrui
          Let me caution people against editing NotePro.ini. It does not work as documented on Windows XP and above. Mysterious problems sometimes arise where NoteTab
          Message 4 of 10 , Aug 31, 2005
          • 0 Attachment
            Let me caution people against editing NotePro.ini. It does not work as
            documented on Windows XP and above. Mysterious problems sometimes arise
            where NoteTab cannot save the .ini file. I have not found an
            authoritative answer despite extensive web searching, but the most
            plausible explanation, suggested on this and another list, is related to
            security settings that cause eitehr Windows XP or antivirus software to
            suspect changes to a .ini file and block the attempt.

            I have found that one is better off saving and restoring values to a
            .ini file other than the default one used by NoteTab. Alternatively, ,
            set NoteTab to use the Windows registry rather than a .ini file, and the
            problem seems to be avoided.

            Again, this problem is not pervasive. It may not happen on your
            computer, so if you are the only one using the clips, you may not need
            to worry about it. If you are writing clips for others to use as well,
            however, I suggest the above work-arounds for what has been a
            frustrating and time-consuming problem for me.

            Jamal
          • hsavage
            ... Jamal, I would be interested to know under what circumstances you have trouble editing and saving the NoteTab ini file. I would like to try duplicating
            Message 5 of 10 , Aug 31, 2005
            • 0 Attachment
              Jamal Mazrui wrote:
              > Let me caution people against editing NotePro.ini. It does not work as
              > documented on Windows XP and above. Mysterious problems sometimes arise
              > where NoteTab cannot save the .ini file. I have not found an
              > authoritative answer despite extensive web searching, but the most
              > plausible explanation, suggested on this and another list, is related to
              > security settings that cause eitehr Windows XP or antivirus software to
              > suspect changes to a .ini file and block the attempt.
              >
              > I have found that one is better off saving and restoring values to a
              > .ini file other than the default one used by NoteTab. Alternatively, ,
              > set NoteTab to use the Windows registry rather than a .ini file, and the
              > problem seems to be avoided.
              >
              > Again, this problem is not pervasive. It may not happen on your
              > computer, so if you are the only one using the clips, you may not need
              > to worry about it. If you are writing clips for others to use as well,
              > however, I suggest the above work-arounds for what has been a
              > frustrating and time-consuming problem for me.
              >
              > Jamal

              Jamal,

              I would be interested to know under what circumstances you have trouble
              editing and saving the NoteTab ini file. I would like to try
              duplicating the problem.

              I've used NoteTab on Windows version 3.11 thru XP Pro. The last 2 OSes
              I've used are XP Home, now XP Pro Media Center. I'm using inifiles with
              increasing frequency from Win98 till now.

              I always use the NoteTab inifile to store settings, not the registry,
              and have never had an occasion, that I recall, when NoteTab
              couldn't/wouldn't save/write to the inifile. I edit NotePro.ini fairly
              often and never use an intermediate file. I do, however, save a backup
              copy of NoteTab's ini file now and then, just in case.

              At present I have 54 current inifiles that store data for use on a web
              site that I maintain and it is entirely done using template files and
              ini files and they work wonderfully. I, also, use inifiles with several
              other of my clips and have no problems.

              I use Panda AV w/firewall, some Windows security options enabled and no
              problems yet, but, I can see a problem with profile permissions on a
              multi-user computer but I have very limited experience with that scenario.

              ºvº
              05.08.31
              hrs > hsavage@...
            • Jamal Mazrui
              Unfortunately, I can t give you a set of replicable circumstances. When the problem happens, it is either with the ProgIniSave command or upon closing
              Message 6 of 10 , Sep 1, 2005
              • 0 Attachment
                Unfortunately, I can't give you a set of replicable circumstances. When the problem happens, it is either with the ProgIniSave command or upon closing NoteTab, when it tries to save its current settings. The problem happens randomly on my Windows XP Home computer, and consistently on a Windows XP Pro Media Center computer of a friend.

                I did report the problem previously on this list in search of a solution, but apparently none was available.

                Jamal



                -----Original Message-----
                From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of hsavage
                Sent: Thursday, September 01, 2005 1:00 AM
                To: ntb-clips@yahoogroups.com
                Subject: Re: [Clip] Determining Active INI Filename?


                Jamal Mazrui wrote:
                > Let me caution people against editing NotePro.ini. It does not work as
                > documented on Windows XP and above. Mysterious problems sometimes arise
                > where NoteTab cannot save the .ini file. I have not found an
                > authoritative answer despite extensive web searching, but the most
                > plausible explanation, suggested on this and another list, is related to
                > security settings that cause eitehr Windows XP or antivirus software to
                > suspect changes to a .ini file and block the attempt.
                >
                > I have found that one is better off saving and restoring values to a
                > .ini file other than the default one used by NoteTab. Alternatively, ,
                > set NoteTab to use the Windows registry rather than a .ini file, and the
                > problem seems to be avoided.
                >
                > Again, this problem is not pervasive. It may not happen on your
                > computer, so if you are the only one using the clips, you may not need
                > to worry about it. If you are writing clips for others to use as well,
                > however, I suggest the above work-arounds for what has been a
                > frustrating and time-consuming problem for me.
                >
                > Jamal

                Jamal,

                I would be interested to know under what circumstances you have trouble
                editing and saving the NoteTab ini file. I would like to try
                duplicating the problem.

                I've used NoteTab on Windows version 3.11 thru XP Pro. The last 2 OSes
                I've used are XP Home, now XP Pro Media Center. I'm using inifiles with
                increasing frequency from Win98 till now.

                I always use the NoteTab inifile to store settings, not the registry,
                and have never had an occasion, that I recall, when NoteTab
                couldn't/wouldn't save/write to the inifile. I edit NotePro.ini fairly
                often and never use an intermediate file. I do, however, save a backup
                copy of NoteTab's ini file now and then, just in case.

                At present I have 54 current inifiles that store data for use on a web
                site that I maintain and it is entirely done using template files and
                ini files and they work wonderfully. I, also, use inifiles with several
                other of my clips and have no problems.

                I use Panda AV w/firewall, some Windows security options enabled and no
                problems yet, but, I can see a problem with profile permissions on a
                multi-user computer but I have very limited experience with that scenario.

                ºvº
                05.08.31
                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
              • acummingsus
                ... [ . . ] ... INI ... I think this has been answered. But I ve only been partially following threads here lately (messing too much with Linux and Perl
                Message 7 of 10 , Sep 2, 2005
                • 0 Attachment
                  --- In ntb-clips@yahoogroups.com, John Mitchell <notetab@l...> wrote:
                  [ . . ]
                  > [ . . ] (of 2 ini's) I have had a look at the Clip
                  > help file but can't find any way to programmatically establish what
                  INI
                  > file is in use.

                  I think this has been answered. But I've only been partially
                  following threads here lately (messing too much with Linux and Perl
                  lately) if'n ya got the Geek time for it, those two do pack some
                  power/punch/gusto (Linus wasn't kidding when he picked the image of a
                  racing/storming (very energetic) penguin to associate with Linux).

                  H="testing_3_2_1"
                  ; creates junk.ini
                  ; swaps and shows ini three times then returns to
                  ; default ini and offers choice to delete junk.ini
                  ^!Set %altini%=JUNK; %ext%=.ini
                  ^!TextToFile "^$GetAppPath$^%altini%^%ext%" ^$GetFileText
                  (^$GetIniFile$)$
                  ^!Info curr ini^%NL%^%NL%^$GetIniFile$
                  ^!SetIniFile ^$GetAppPath$JUNK
                  ^!Info curr ini^%NL%^%NL%^$GetIniFile$
                  ^!SetIniFile
                  ^!Info curr ini^%NL%^%NL%^$GetIniFile$
                  ^!Skip Delete ^$GetAppPath$^%altini%^%ext% ?
                  ^!Goto end
                  ^!DeleteFile "^$GetAppPath$^%altini%^%ext%"
                  ; ----end_of_clip-----

                  --
                  Alan.
                • abairheart
                  ... trouble ... PMFBI, I ve encountered this problem often. It is related to file ownership. If you create an INI file in one user account, then try to edit it
                  Message 8 of 10 , Sep 2, 2005
                  • 0 Attachment
                    --- In ntb-clips@yahoogroups.com, hsavage <hsavage@p...> wrote:
                    > Jamal,
                    >
                    > I would be interested to know under what circumstances you have
                    trouble
                    > editing and saving the NoteTab ini file. I would like to try
                    > duplicating the problem.

                    PMFBI,

                    I've encountered this problem often. It is related to file ownership.
                    If you create an INI file in one user account, then try to edit it as a
                    different user, you MAY have trouble writing to the file (Windows XP).

                    In particular, if you create a file as admiistrator, and then switch
                    over to a regular user account, the regular user will not have the same
                    permissions, as the administrator.

                    Abair
                  • Jamal Mazrui
                    Thanks--that helps me understand the cause of the problem! I have not logged in as a different user, but I have run clips from the command line with another
                    Message 9 of 10 , Sep 2, 2005
                    • 0 Attachment
                      Thanks--that helps me understand the cause of the problem!

                      I have not logged in as a different user, but I have run clips from the
                      command line with another program while NoteTab is open. I did notice
                      that NoteTab retrieved a different AppData shell folder value within a
                      clip in that case, so apparently Windows treats the other program
                      running the clip as a different user name. In fact, I recall the user
                      name being something like "Local Service" on one computer exhibiting
                      this problem.

                      Can you think of a way around the problem? I still want to be able to
                      run clips via the command line while NoteTab is open.

                      Jamal


                      -----Original Message-----
                      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On
                      Behalf Of abairheart
                      Sent: Friday, September 02, 2005 4:31 PM
                      To: ntb-clips@yahoogroups.com
                      Subject: Re: [Clip] Determining Active INI Filename?




                      I've encountered this problem often. It is related to file ownership.
                      If you create an INI file in one user account, then try to edit it as a
                      different user, you MAY have trouble writing to the file (Windows XP).

                      In particular, if you create a file as admiistrator, and then switch
                      over to a regular user account, the regular user will not have the same
                      permissions, as the administrator.

                      Abair





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

                      Yahoo! Groups Links
                    • abairheart
                      ... I ve sorta learned to live with it -- it s never been much of an issue with me, but if you know how to change ownership of a file, then that may be the
                      Message 10 of 10 , Sep 3, 2005
                      • 0 Attachment
                        --- In ntb-clips@yahoogroups.com, "Jamal Mazrui" <Jamal.Mazrui@f...>
                        wrote:
                        >
                        > Can you think of a way around the problem? I still want to be able to
                        > run clips via the command line while NoteTab is open.
                        >

                        I've sorta learned to live with it -- it's never been much of an issue
                        with me, but if you know how to change ownership of a file, then that
                        may be the solution. "Take ownership" in the personality, that you want
                        access in.

                        Another way might be to recreate the file deliberately, using the logon
                        personality, that you want to give control to.

                        I'm fairly sure, that the problem is a Windows problem, rather than a
                        NoteTab problem.

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