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

Re: Very simple database problem

Expand Messages
  • Sheri
    ... It also doesn t like that %OpenFile% doesn t have a caret in front of it: ^%OpenFile% What you probably want is ^!OpenReadOnly ^%File% Regards, Sheri
    Message 1 of 11 , Jun 3, 2007
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "duke_nukem_time"
      <duke_nukem_time@...> wrote:
      >
      > Hey,
      >
      > I'm trying to create a very simple database clip that will take lines
      > from a text file and convert them into html syntax for the web. The
      > logic of my clip goes like this:
      >
      > Execute
      > Open text file specified from the menu
      >
      > Label 1
      > Read and output line 1 in html
      > Read and output line 2 in html
      > Read and output line 3 in html
      > Read and output line 4 in html
      > If line 5 is blank, end. Else, goto label 1
      > End
      >
      > Using my knowledge of TI-83+ Basic coding, and some C++ intro stuff, I
      > can do the loop and the outputting to html format, but I keep running
      > into syntax problems with the OpenFile command in Notetab. I am also
      > not sure how to read a line and save it as a string preferably since I
      > never got to that part in C++.
      > The syntax problem lies here:
      >
      > ;Menu
      > ^!Set %File%="^?{(T=O)Select the filelist to use}";
      >
      > ;Setting output file as a variable <--This may not be needed at all.
      > ^!Set %OpenFile%=^$GetName("^%File%")$;
      >
      > ;Open the file
      > ;^!OpenReadOnly %OpenFile%; <--Prgm doesn't like this syntax. I
      > thought it was because I need to specify path.
      >
      It also doesn't like that %OpenFile% doesn't have a caret in front of
      it: ^%OpenFile%

      What you probably want is

      ^!OpenReadOnly "^%File%"

      Regards,
      Sheri
    • duke_nukem_time
      It did work, but I keep getting this error when I try to open a file: http://img362.imageshack.us/img362/97/errorry4.jpg The original code is here:
      Message 2 of 11 , Jun 3, 2007
      • 0 Attachment
        It did work, but I keep getting this error when I try to open a file:

        http://img362.imageshack.us/img362/97/errorry4.jpg

        The original code is here:
        http://img394.imageshack.us/img394/7959/error1lf0.jpg
      • Sheri
        ... I don t see where you ever saved a file by the name you re trying to open as read only. I would suggest to put ^!Setdebug on at the top of you clip and run
        Message 3 of 11 , Jun 3, 2007
        • 0 Attachment
          --- In ntb-clips@yahoogroups.com, "duke_nukem_time"
          <duke_nukem_time@...> wrote:
          >
          > It did work, but I keep getting this error when I try to open a file:
          >
          > http://img362.imageshack.us/img362/97/errorry4.jpg
          >
          > The original code is here:
          > http://img394.imageshack.us/img394/7959/error1lf0.jpg
          >

          I don't see where you ever saved a file by the name you're trying to
          open as read only. I would suggest to put

          ^!Setdebug on

          at the top of you clip and run it so you can see what is happening and
          where it is going wrong.

          Regards,
          Sheri
        • duke_nukem_time
          Ok. The problem is in here. I keep getting an error that notetab can t find the file in quotes. I dunno why. ;Menu ^!Set %File%=^?{(T=O)Select the filelist to
          Message 4 of 11 , Jun 4, 2007
          • 0 Attachment
            Ok. The problem is in here. I keep getting an error that notetab can't
            find the file in quotes. I dunno why.

            ;Menu
            ^!Set %File%=^?{(T=O)Select the filelist to use}; %SaveFileAs%=^?{Web
            page file name (no path or extension)=index};
            ;End procedure if the user canceled the Clip wizard
            ^!IfCancel Exit

            ;Open the file
            ^!OpenReadOnly ^%File%;
          • Sheri
            ... Put double quotes around ^%File% and remove the trailing semicolon. Regards, Sheri
            Message 5 of 11 , Jun 4, 2007
            • 0 Attachment
              --- In ntb-clips@yahoogroups.com, "duke_nukem_time"
              <duke_nukem_time@...> wrote:
              >
              > Ok. The problem is in here. I keep getting an error that notetab can't
              > find the file in quotes. I dunno why.
              >
              > ;Menu
              > ^!Set %File%=^?{(T=O)Select the filelist to use}; %SaveFileAs%=^?{Web
              > page file name (no path or extension)=index};
              > ;End procedure if the user canceled the Clip wizard
              > ^!IfCancel Exit
              >
              > ;Open the file
              > ^!OpenReadOnly ^%File%;
              >

              Put double quotes around ^%File% and remove the trailing semicolon.

              Regards,
              Sheri
            • duke_nukem_time
              Ok. I did that. ;Open the file ^!OpenReadOnly ^%File% When in debug, the ^!Set %File%=.... in the menu displays =C: default.txt However, the next two popups
              Message 6 of 11 , Jun 4, 2007
              • 0 Attachment
                Ok. I did that.

                ;Open the file
                ^!OpenReadOnly "^%File%"

                When in debug, the ^!Set %File%=.... in the menu displays =C:\default.txt

                However, the next two popups displays
                ^!OpenReadOnly "C:\default.txt"

                However after that, I get an error that says, File "C:\"C\default.txt"
                cannot be found. Without adding the quotes, it still gives me the
                error but it reads: File C:\default.txt cannot be found. I am running
                Windows Vista and the free version of notetab. Could this be a
                permissions problem? I run the prgm as administrator settings.
              • Alan
                ... above line needs to end with } (delete the semi colon) ... ^!Set %File%=C: default.txt ^!OpenReadOnly ^%File% Just for troubleshooting, those 2 lines as a
                Message 7 of 11 , Jun 4, 2007
                • 0 Attachment
                  On Monday 04 June 2007 16:23, duke_nukem_time wrote:
                  > Ok. The problem is in here. I keep getting an error that notetab can't
                  > find the file in quotes. I dunno why.
                  >
                  > ;Menu
                  > ^!Set %File%=^?{(T=O)Select the filelist to use}; %SaveFileAs%=^?{Web
                  > page file name (no path or extension)=index};

                  above line needs to end with } (delete the semi colon)

                  > ;End procedure if the user canceled the Clip wizard
                  > ^!IfCancel Exit
                  >
                  > ;Open the file
                  > ^!OpenReadOnly ^%File%;


                  ^!Set %File%=C:\default.txt
                  ^!OpenReadOnly ^%File%

                  Just for troubleshooting, those 2 lines as a clip should work. If not, then
                  it is not a syntax related with the clip code problem.

                  Does Vista allow reading of file on the root of the C drive?

                  You might then also try using the data area (my documents, etc.). Quotes will
                  then be needed on clip syntax due to space in the file path.

                  --
                  Alan.
                • duke_nukem_time
                  Alan, I was able to get it working. As you suggested, I put the file in the Admin Documents folder and it will load the txt file. However, it still would give
                  Message 8 of 11 , Jun 4, 2007
                  • 0 Attachment
                    Alan, I was able to get it working. As you suggested, I put the file
                    in the Admin Documents folder and it will load the txt file. However,
                    it still would give me an error about the path with the quotes on (eg
                    "^%File%"), so I left them off. I'm considering upgrading to Standard
                    Edition sometime soon to avoid future incompatibilities such as this
                    with Vista and the Lite version. Thank you and Sheri for responding to
                    my post.
                  • hsavage
                    ... duke, Most of us would, probably, recommend NoteTab Pro over Standard. The advanced multiple UNDO feature alone is worth the price difference. This is a
                    Message 9 of 11 , Jun 5, 2007
                    • 0 Attachment
                      duke_nukem_time wrote:
                      > Alan, I was able to get it working. As you suggested, I
                      > put the file in the Admin Documents folder and it will
                      > load the txt file. However, it still would give me an
                      > error about the path with the quotes on (eg "^%File%"),
                      > so I left them off. I'm considering upgrading to Standard
                      > Edition sometime soon to avoid future incompatibilities
                      > such as this with Vista and the Lite version.

                      duke,

                      Most of us would, probably, recommend NoteTab Pro over Standard. The
                      advanced multiple 'UNDO' feature alone is worth the price difference.

                      This is a link to Fookes delineating the features of NoteTab Pro,
                      NoteTab Standard and NoteTab Light.

                      http://www.notetab.com/chart.php

                      As to the database problem at hand this work fine on my computer, XP
                      Pro, with no errors.
                      ----------------------
                      H="Open Read Only"
                      ; Menu
                      ; change folder in next line to your preference.
                      ;
                      ; you may, or may not, want to add a folder to 'save to'.
                      ; long line below, check for wrapping.
                      ;
                      ^!Set %File%=^?{(T=O)Select the filelist to
                      use=^$GetShellFolder(Personal)$}; %SFA%=^?{Webpage file name (no path or
                      extension)=^$GetShellFolder(Desktop)$index}
                      ;
                      ; End procedure if the user canceled the Clip wizard
                      ^!IfCancel Exit
                      ; Open the file
                      ^!OpenReadOnly ^%File%
                      ;^!Save AS ^%sfa%
                      ------------------
                      The difference may well be the difference between 'Lite' and 'Pro'.

                      ºvº SL-6-35 -created- 2007.06.05 - 06.47.02

                      In Only 30 Years...
                      • 1977: Disco
                      • 2007: Costco
                      ¤ ø ¤ hrs ø hsavage@...
                    • Sheri
                      ... Hi, I agree with Harvey on the benefits of the Pro vs the Standard version. But on the compatibility issue between Vista and Light -- While I don t know
                      Message 10 of 11 , Jun 5, 2007
                      • 0 Attachment
                        --- In ntb-clips@yahoogroups.com, "duke_nukem_time"
                        <duke_nukem_time@...> wrote:
                        >
                        > Alan, I was able to get it working. As you suggested, I put the
                        > file in the Admin Documents folder and it will load the txt file.
                        > However, it still would give me an error about the path with the
                        > quotes on (eg "^%File%"), so I left them off. I'm considering
                        > upgrading to Standard Edition sometime soon to avoid future
                        > incompatibilities such as this with Vista and the Lite version.
                        > Thank you and Sheri for responding to my post.


                        Hi,

                        I agree with Harvey on the benefits of the Pro vs the Standard
                        version. But on the compatibility issue between Vista and Light --

                        While I don't know much about Vista security, I do know that with the
                        Light version you need to have write privileges not only in the
                        document's folder, but also in the installation folder where NoteTab
                        keeps its ini file. I would try that clip again after moving the
                        entire installation folder out of Program Files and into your "My
                        Documents" area.

                        In Standard and Pro versions 5+, the install procedure defaults to a
                        new "multi-user" configuration where user files are not stored in the
                        Program Files installation folder.

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