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

Re: Clip that creates a "calendar" outline

Expand Messages
  • Sheri
    hmmn, sorry, I shouldn t have the filename getting set inside that loop, you could move it to just before the save, and base it not on ^%this% but either
    Message 1 of 6 , Sep 15, 2010
    • 0 Attachment
      hmmn, sorry, I shouldn't have the filename getting set inside that loop, you could move it to just before the save, and base it not on ^%this% but either ^%first% or ^%last%

      >
      > H="monthoutline"
      > ^!Toolbar New Document
      > ^!Set %first%=^$GetDateToInt(10/01/2010;mm/dd/yyyy)$
      > ^!Set %last%=^$GetDateToInt(10/31/2010;mm/dd/yyyy)$
      > ^!Set %this%=^$Calc(^%first%-1)$
      > :loop
      > ^!inc %this%
      > ^!If ^%this%>^%last% done
      > ^!Set %filename%="^$GetDateFromInt(^%this%;"yyyymm mmmm")$.otl"
      > ^!Set %formatted%=^$GetDateFromInt(^%this%;"mm/dd/yyyy")$
      > ^!InsertText H="^%formatted%"^P^P
      > ^!Goto loop
      > :done
      > ^!Jump Doc_Start
      > ^!InsertText = V4 Outline MultiLine TabWidth=30^P^P
      > ^!Save As "^$GetShellFolder(Personal)$^%filename%"
      > ^!Close
      > ^!Open "^$GetShellFolder(Personal)$^%filename%"
      > :Cleanup
      > ^!ClearVariable %filename%
      > ^!ClearVariable %first%
      > ^!ClearVariable %formatted%
      > ^!ClearVariable %last%
      > ^!ClearVariable %this%
      > ;end of clip
      >
    • Piotr Bienkowski
      ... Thanks Sheri, I needed something simpler than what Dave found (although his effort is also appreciated). I ll give your clip a spin. Regards, Piotr
      Message 2 of 6 , Sep 15, 2010
      • 0 Attachment
        Sheri wrote:
        > --- In ntb-clips@yahoogroups.com, Piotr Bienkowski <syntax@...> wrote:
        >
        >> Now I have a need for a clip that generates an outline where the
        >> outline headings are dates from the beginning to the end of the
        >> month.
        >>
        >
        > Try the following. You would need to update the first and last date as well as the file name and location. You could also tweak the date formats if they don't meet your needs. As is, the dates in the outline headers are in the format mm/dd/yyyy and the outline is saved in the My Documents folder named yyyymm mmmm (where the mmmm spells out the month name.
        >
        > Regards,
        > Sheri
        >
        >
        Thanks Sheri, I needed something simpler than what Dave found (although
        his effort is also appreciated). I'll give your clip a spin.

        Regards,

        Piotr


        [Non-text portions of this message have been removed]
      • syntax@neo.pl
        Thanks Sheri, this clip does exactly what I need. I m writing back only now, but I could not get back to this topic earlier. Regards, Piotr On Wed, 15 Sep 2010
        Message 3 of 6 , Oct 4, 2010
        • 0 Attachment
          Thanks Sheri, this clip does exactly what I need. I'm writing back only
          now, but I could not get back to this topic earlier.

          Regards,

          Piotr

          On Wed, 15 Sep 2010 13:06:58 -0000, "Sheri" <silvermoonwoman@...>
          wrote:
          > --- In ntb-clips@yahoogroups.com, Piotr Bienkowski <syntax@...> wrote:
          >>
          >>
          >> Now I have a need for a clip that generates an outline where the
          >> outline headings are dates from the beginning to the end of the
          >> month.
          >
          > Try the following. You would need to update the first and last date as
          > well as the file name and location. You could also tweak the date
          formats
          > if they don't meet your needs. As is, the dates in the outline headers
          are
          > in the format mm/dd/yyyy and the outline is saved in the My Documents
          > folder named yyyymm mmmm (where the mmmm spells out the month name.
          >
          > Regards,
          > Sheri
          >
          > H="monthoutline"
          > ^!Toolbar New Document
          > ^!Set %first%=^$GetDateToInt(10/01/2010;mm/dd/yyyy)$
          > ^!Set %last%=^$GetDateToInt(10/31/2010;mm/dd/yyyy)$
          > ^!Set %this%=^$Calc(^%first%-1)$
          > :loop
          > ^!inc %this%
          > ^!If ^%this%>^%last% done
          > ^!Set %filename%="^$GetDateFromInt(^%this%;"yyyymm mmmm")$.otl"
          > ^!Set %formatted%=^$GetDateFromInt(^%this%;"mm/dd/yyyy")$
          > ^!InsertText H="^%formatted%"^P^P
          > ^!Goto loop
          > :done
          > ^!Jump Doc_Start
          > ^!InsertText = V4 Outline MultiLine TabWidth=30^P^P
          > ^!Save As "^$GetShellFolder(Personal)$^%filename%"
          > ^!Close
          > ^!Open "^$GetShellFolder(Personal)$^%filename%"
          > :Cleanup
          > ^!ClearVariable %filename%
          > ^!ClearVariable %first%
          > ^!ClearVariable %formatted%
          > ^!ClearVariable %last%
          > ^!ClearVariable %this%
          > ;end of clip
          >
          >
          >
          >
          > ------------------------------------
          >
          > Fookes Software: http://www.fookes.com/
          > NoteTab website: http://www.notetab.com/
          > NoteTab Discussion Lists: http://www.notetab.com/groups.php
          >
          > ***
          > Yahoo! Groups Links
          >
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.