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

A clip that does ordered links

Expand Messages
  • Joe Cisneros
    ie. 55 56 ... Hi I was wondering if something like this had been done or if I should
    Message 1 of 7 , Jan 25 6:25 PM
      ie.
      <A HREF="stuff55.htm">55</A><Whatever in between><A
      HREF="stuff56.htm">56</A> ...

      Hi I was wondering if something like this had been done or if I
      should just go ahead and do one. I'd probably need a loop

      This would be very useful for repetitive tasks.

      Thanks :)
      Joe
    • Alan
      Hi Joe, ... Perhaps rudimentary, still cutting teeth just a bit. For instance, I first tryed to use index and count but at first I did so without utilizing an
      Message 2 of 7 , Jan 26 12:28 AM
        Hi Joe,

        >ie.
        ><A HREF="stuff55.htm">55</A><Whatever in between><A
        >HREF="stuff56.htm">56</A> ...
        >
        >Hi I was wondering if something like this had been done or if I
        >should just go ahead and do one. I'd probably need a loop

        Perhaps rudimentary, still cutting teeth just a bit. For instance, I first
        tryed to use index and count but at first I did so without utilizing an
        array ((hehe did I hear some experts laughing?

        Then, I kept playing with it upon realization that I'd probably somehow
        need to come up with an array which I did do.

        Comments/suggestions?

        A happy achievment, the clip worked pretty good for me. does leave a pipe
        at the end however. if need alter, that one should be easy. well, I'll
        leave it be as it is for now

        BTW the clip has two loops with an array sandwiched in between the loops.

        Question: is any benefit to clear variables at end like I did? I did so
        thinking that it might release resources (free the memory for something else).

        Note: 2 long lines. The Continue line at top is a long line. And in the
        :pre1st label section, the Append line is a long line.

        H="My Consec Links"
        ;Alan Cummings 1-25-2001
        ^!Continue This clip opens a new doc to receive the clip's output
        text. You can put a semi colon in front of this clip's ^!Toolbar New
        Document line but then you will need to be sure you have the cursor at
        proper place in your htm document BEFORE running this clip!! Continue?
        ;---end of long line----
        ^!ToolBar New Document
        ^!ClearVariables
        ^!Set %Count%=^?[How many?=]
        ^!Set %Link%=^?[Name=]
        ^!Set %ext%=^?[Ext==.htm]
        ^!Set %Index%=0
        :pre1st
        ^!Inc %Index%
        ^!If ^%Index% > ^%Count% arrayit
        ^!Append %AllLinks%=<a href="^%Link%^%Index%^%ext%">^%Index%</a> | ;
        ^!Goto pre1st
        :arrayit
        ^!Set %Index%=0
        ^!SetArray %PrintLinks%=^%AllLinks%
        ^!Set %Count%=^%PrintLinks0%
        :prntLoop
        ^!Inc %Index%
        ^!If ^%Index% > ^%Count% clear
        ^!InsertText "^%PrintLinks^%Index%%"
        ^!Goto prntLoop
        :clear
        ^!ClearVariables
        ;---<end of clip<<

        Regards. Alan.
      • Jody
        Hi Alan, ... ^$StrDelete(...)$ StrSize and delete 1, Alan. Hope I can keep my eyes open for a few more posts... :) Happy Clip n! Jody http://www.notetab.net
        Message 3 of 7 , Jan 26 3:17 AM
          Hi Alan,

          >A happy achievment, the clip worked pretty good for me. does leave a pipe
          >at the end however. if need alter, that one should be easy. well, I'll
          >leave it be as it is for now

          ^$StrDelete(...)$ StrSize and delete 1, Alan.

          Hope I can keep my eyes open for a few more posts... :)

          Happy Clip'n!
          Jody

          http://www.notetab.net

          Subscribe, UnSubscribe, Options
          mailto:Ntb-Clips-Subscribe@...
          mailto:Ntb-Clips-UnSubscribe@...
          http://www.egroups.com/group/ntb-clips
        • Hans Witschi
          Hi Joe, this could be what you are looking for. You have to run it first to understand it and then modify it to your needs. I agree it is a akward clip (one
          Message 4 of 7 , Jan 26 11:24 AM
            Hi Joe,


            this could be what you are looking for. You have to run it first to
            understand it and then modify it to your needs.
            I agree it is a akward clip (one reason : creating leading zeros ), but
            it works

            Regards

            Hans



            ^!Jump Line_Start
            ;==============LONG LINE STARTS HERE
            ^!Set %nnn%=^?{Start numbering at one more than what=^$GetBlock$|_1000};
            %Endnnn%=^?{Stop numbering at=^$GetLineCount$|_1010|1040|1100};
            %EASYREPLTAKEAWAYTHE1%=^?{<--EASYREPL_TAKEAWAYTHE_1--> ^%nl%START
            NUMBERING with 1000 to get leading
            ZEROS=_<--EASYREPL_TAKEAWAYTHE_1-->|<--EASYREPL_TAKEAWAYTHE_A-->A};
            %Before%=^?{Add what Before number=_<a href="|No:|No.|Nr:|Nr.};
            %Danach1%=^?{Add what Danach number=_.htm"
            onClick="window.open('','|something else}; %DanachWindow%=^?{Add what
            DanachWindow=_','scrollbars=no,menubar=no,status=no,width=600,height=500,resizable')"target="|something
            else}; %DanachTarget%=^?{Add what DanachTarget=_"><IMG
            SRC="Images/|something else}
            ;==============LONG LINE ENDS HERE
            ;==============LONG LINE STARTS HERE
            ^!Set %AfterURL%=^?{Add what AfterURL number=_.jpg" BORDER=0 WIDTH=94
            HEIGHT=90 ALT="|something else}; %AfterENDTAG%=^?{Add what AfterALT +
            BEFORE </A></font> (number gets in here
            automatically)=_</A></font>|.|,|:|,|-|...|=|_|.}
            ;==============LONG LINE ENDS HERE
            ^!Set %Stop%=^$Calc(^%Endnnn%-^%nnn%)$; %Count%=0
            :Loop
            ^!Inc %nnn%
            ^!Inc %Count%
            ^!Jump Line_End
            ;==============LONG LINE STARTS HERE
            ^!InsertText
            ^p^%Before%^%EASYREPLTAKEAWAYTHE1%^%nnn%^%Danach1%^%EASYREPLTAKEAWAYTHE1%^%nnn%^%DanachWindow%^%EASYREPLTAKEAWAYTHE1%^%nnn%^%DanachTarget%^%EASYREPLTAKEAWAYTHE1%^%nnn%^%AfterURL%^%EASYREPLTAKEAWAYTHE1%^%nnn%">^%EASYREPLTAKEAWAYTHE1%^%nnn%^%AfterENDTAG%

            ;==============LONG LINE ENDS HERE
            ^!Jump +1
            ^!If ^%Count%=^%Stop% Skip
            ^!Goto Loop

            ^!Jump Text_Start
            ^!Replace "<--EASYREPL_TAKEAWAYTHE_1-->1" >> "" A
            ;^!Replace "<--EASYREPL_TAKEAWAYTHE_A-->A" >> "" A












            Result:

            <a href="001.htm"
            onClick="window.open('','001','scrollbars=no,menubar=no,status=no,width=600,height=500,resizable')"target="001"><IMG
            SRC="Images/001.jpg" BORDER=0 WIDTH=94 HEIGHT=90 ALT=" text alt
            001">001text link </A></font>
            <a href="002.htm"
            onClick="window.open('','002','scrollbars=no,menubar=no,status=no,width=600,height=500,resizable')"target="002"><IMG
            SRC="Images/002.jpg" BORDER=0 WIDTH=94 HEIGHT=90 ALT=" text alt
            002">002text link </A></font>
            <a href="003.htm"
            onClick="window.open('','003','scrollbars=no,menubar=no,status=no,width=600,height=500,resizable')"target="003"><IMG
            SRC="Images/003.jpg" BORDER=0 WIDTH=94 HEIGHT=90 ALT=" text alt
            003">003text link </A></font>
            <a href="004.htm"
            onClick="window.open('','004','scrollbars=no,menubar=no,status=no,width=600,height=500,resizable')"target="004"><IMG
            SRC="Images/004.jpg" BORDER=0 WIDTH=94 HEIGHT=90 ALT=" text alt
            004">004text link </A></font>
            <a href="005.htm"
            onClick="window.open('','005','scrollbars=no,menubar=no,status=no,width=600,height=500,resizable')"target="005"><IMG
            SRC="Images/005.jpg" BORDER=0 WIDTH=94 HEIGHT=90 ALT=" text alt
            005">005text link </A></font>
            <a href="006.htm"
            onClick="window.open('','006','scrollbars=no,menubar=no,status=no,width=600,height=500,resizable')"target="006"><IMG
            SRC="Images/006.jpg" BORDER=0 WIDTH=94 HEIGHT=90 ALT=" text alt
            006">006text link </A></font>
            <a href="007.htm"
            onClick="window.open('','007','scrollbars=no,menubar=no,status=no,width=600,height=500,resizable')"target="007"><IMG
            SRC="Images/007.jpg" BORDER=0 WIDTH=94 HEIGHT=90 ALT=" text alt
            007">007text link </A></font>
            <a href="008.htm"
            onClick="window.open('','008','scrollbars=no,menubar=no,status=no,width=600,height=500,resizable')"target="008"><IMG
            SRC="Images/008.jpg" BORDER=0 WIDTH=94 HEIGHT=90 ALT=" text alt
            008">008text link </A></font>
            <a href="009.htm"
            onClick="window.open('','009','scrollbars=no,menubar=no,status=no,width=600,height=500,resizable')"target="009"><IMG
            SRC="Images/009.jpg" BORDER=0 WIDTH=94 HEIGHT=90 ALT=" text alt
            009">009text link </A></font>
            <a href="010.htm"
            onClick="window.open('','010','scrollbars=no,menubar=no,status=no,width=600,height=500,resizable')"target="010"><IMG
            SRC="Images/010.jpg" BORDER=0 WIDTH=94 HEIGHT=90 ALT=" text alt
            010">010text link </A></font>


            Joe Cisneros wrote:

            >
            > ie.
            > <A HREF="stuff55.htm">55</A><Whatever in between><A
            > HREF="stuff56.htm">56</A> ...
            >
            > Hi I was wondering if something like this had been done or if I
            > should just go ahead and do one. I'd probably need a loop
            >
            > This would be very useful for repetitive tasks.
            >
            > Thanks :)
            > Joe
          • funkay@email.com
            Actually since I posted my message last, I created one which I m pretty happy with. Only one problem. I m sure it will do an infinite loop if the the
            Message 5 of 7 , Jan 26 4:05 PM
              Actually since I posted my message last, I created one which I'm
              pretty happy with. Only one problem. I'm sure it will do an
              infinite loop if the the starting number is greater than the ending
              number. This is my first time using variables in a Notetab Clip!
              woohoo! :] I love Notetab!

              If you modify this, please post (although I'll probably fix it
              eventually).

              Thanks, Joe :]
              ___________________________________________________________________
              ^!Set %Prepended%=^?{Prepended text}; %StartNum%=^?{Starting
              Number=1}; %EndNum%=^?{Ending Number}; %Appended%=^?{Appended text}; %
              Extension%=^?{Filename extension=jpg}; %Delim1%=^?{Delimeter (how
              each link will be divided)=<BR>}

              ^!set %CountNum%=^%StartNum%

              :ForLoop
              ^!InsertHtml <A HREF="^%Prepended%^%CountNum%^%Appended%.^%
              Extension%">^%CountNum%</A>
              ^!If ^%CountNum% >= ^%EndNum% exitForLoop
              ^!InsertHtml ^%Delim1%
              ^!Inc %CountNum%
              ^!Goto forloop

              :exitForLoop
              ___________________________________________________________________


              --- In ntb-clips@y..., Alan <acummings@s...> wrote:
              > Hi Joe,
              >
              > >ie.
              > ><A HREF="stuff55.htm">55</A><Whatever in between><A
              > >HREF="stuff56.htm">56</A> ...
              > >
              > >Hi I was wondering if something like this had been done or if I
              > >should just go ahead and do one. I'd probably need a loop
              >
              > Perhaps rudimentary, still cutting teeth just a bit. For instance,
              I first
              > tryed to use index and count but at first I did so without
              utilizing an
              > array ((hehe did I hear some experts laughing?
              >
              > Then, I kept playing with it upon realization that I'd probably
              somehow
              > need to come up with an array which I did do.
              >
              > Comments/suggestions?
              >
              > A happy achievment, the clip worked pretty good for me. does leave
              a pipe
              > at the end however. if need alter, that one should be easy. well,
              I'll
              > leave it be as it is for now
              >
              > BTW the clip has two loops with an array sandwiched in between the
              loops.
              >
              > Question: is any benefit to clear variables at end like I did? I
              did so
              > thinking that it might release resources (free the memory for
              something else).
              >
              > Note: 2 long lines. The Continue line at top is a long line. And
              in the
              > :pre1st label section, the Append line is a long line.
              >
              > H="My Consec Links"
              > ;Alan Cummings 1-25-2001
              > ^!Continue This clip opens a new doc to receive the clip's output
              > text. You can put a semi colon in front of this clip's ^!Toolbar
              New
              > Document line but then you will need to be sure you have the cursor
              at
              > proper place in your htm document BEFORE running this clip!!
              Continue?
              > ;---end of long line----
              > ^!ToolBar New Document
              > ^!ClearVariables
              > ^!Set %Count%=^?[How many?=]
              > ^!Set %Link%=^?[Name=]
              > ^!Set %ext%=^?[Ext==.htm]
              > ^!Set %Index%=0
              > :pre1st
              > ^!Inc %Index%
              > ^!If ^%Index% > ^%Count% arrayit
              > ^!Append %AllLinks%=<a href="^%Link%^%Index%^%ext%">^%Index%</a> | ;
              > ^!Goto pre1st
              > :arrayit
              > ^!Set %Index%=0
              > ^!SetArray %PrintLinks%=^%AllLinks%
              > ^!Set %Count%=^%PrintLinks0%
              > :prntLoop
              > ^!Inc %Index%
              > ^!If ^%Index% > ^%Count% clear
              > ^!InsertText "^%PrintLinks^%Index%%"
              > ^!Goto prntLoop
              > :clear
              > ^!ClearVariables
              > ;---<end of clip<<
              >
              > Regards. Alan.
            • Alan
              Hi, ... Actually, given the above condition, your clip would print one incidence only (1 link) then end. And, super job on the variables! ;offshoot from yours
              Message 6 of 7 , Jan 26 11:34 PM
                Hi,

                At 12:05 AM 1/27/01 +0000, you wrote:
                >pretty happy with. Only one problem. I'm sure it will do an
                >infinite loop if the the starting number is greater than the ending
                >number. This is my first time using variables in a Notetab Clip!

                Actually, given the above condition, your clip would print one incidence
                only (1 link) then end. And, super job on the variables!

                ;offshoot from yours follows, begin code
                ^!ClearVariable %wiz%
                ^!Append %wiz%="%num%="^?{Starting Number=}"; "
                ^!Append %wiz%="%endnum%="^?{Ending Number=}"; "
                ^!Append %wiz%="%nam%="^?{Name=}"; "
                ^!Append %wiz%="%ext%="^?{Ext==.htm|.jpg}"; "
                ^!Append %wiz%="%div%="^?{Divider==<br>|pipe}""
                ^!SetWizardLabel Complete
                ; Show wiz
                ^!Set ^%wiz%
                ^!IfDiff "^%div%" "pipe" Skip
                ^!Set %div%=" | "
                ^!If ^%num% > ^%endnum% end
                :loop
                ^!InsertText <a href="^%nam%^%num%^%ext%">^%num</a>
                ^!If ^%num% >= ^%endnum% end
                ^!Inc %num%
                ^!InsertText ^%div%
                ^!Goto loop
                ;end of code

                Regards. Alan. "Sometimes my brain feels like it accompanys a lost
                underground miner. For an undetermined amount of time, perhaps for minutes
                or hours or maybe for days it wanders up the remote narrow tunnel, all the
                while knowing of its locale and that there's a main chamber somewhere, but
                currently unable to access the main chamber. Then, suddenly, it happens
                upon the main chamber and briefly has access to all of the tunnels."
              • Piotr Bienkowski
                ... Yes, we like all things that can do repetitive chores for us, don t we? Please check my comment after the clip. ... Instead of the exitForLoop you can use
                Message 7 of 7 , Jan 27 2:34 AM
                  On 27 Jan 2001, at 0:05, funkay@... wrote:

                  > Actually since I posted my message last, I created one which I'm
                  > pretty happy with. (...) I love Notetab!

                  Yes, we like all things that can do repetitive chores for us, don't
                  we? Please check my comment after the clip.
                  >
                  > If you modify this, please post (although I'll probably fix it
                  > eventually).
                  >
                  > Thanks, Joe :]
                  > ___________________________________________________________________
                  > ^!Set %Prepended%=^?{Prepended text}; %StartNum%=^?{Starting
                  > Number=1}; %EndNum%=^?{Ending Number}; %Appended%=^?{Appended text}; %
                  > Extension%=^?{Filename extension=jpg}; %Delim1%=^?{Delimeter (how each
                  > link will be divided)=<BR>}
                  >
                  > ^!set %CountNum%=^%StartNum%
                  >
                  > :ForLoop
                  > ^!InsertHtml <A HREF="^%Prepended%^%CountNum%^%Appended%.^%
                  > Extension%">^%CountNum%</A>
                  > ^!If ^%CountNum% >= ^%EndNum% exitForLoop
                  > ^!InsertHtml ^%Delim1%
                  > ^!Inc %CountNum%
                  > ^!Goto forloop
                  >
                  > :exitForLoop
                  > ___________________________________________________________________
                  >

                  Instead of the exitForLoop you can use the End label. It is a label
                  that is there in all clips, but you don't have to type it. :)

                  E.g.

                  ^!If ^%CountNum% >= ^%EndNum% End

                  If you go in descending order, you can make a similar clip with a
                  different condition.

                  HTH

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