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

Bulleted Paragraphs

Expand Messages
  • Sheri
    Hi folks, I upgraded this clip to prompt for margin info. It uses the previous entries as default on the next use. I also enhanced it to support
    Message 1 of 2 , Aug 6 1:16 PM
    • 0 Attachment
      Hi folks,

      I upgraded this clip to prompt for margin info. It uses the previous entries as default
      on the next use. I also enhanced it to support justification or not. It will format
      or reformat paragraphs. Sorry I left on the H= on the previously posted header for this
      clip, hope it didn't confuse anyone.

      Enjoy,
      Sheri

      This clip can be viewed and copied without broken lines on or about

      http://groups.yahoo.com/group/ntb-clips/messages/8868?expand=1


      H="Bulleted Paragraphs"
      ;8-5-2002 by Sheri Pierce
      ;8-6-2002 enhanced for flexible margins
      ^!SetArray %FV%=^?{(M="09;0;_")Left Bullet Margin=^%FV1%};^?{(M="09;0;_")Enter Width=^%FV2%};^?{(T=C)Justify==^$SetDefaultValue(On^=True|_Off^=False;^%FV3%)$}
      ^!SetHintInfo Reformat in Progress
      ^!SetScreenUpdate Off
      ^!Replace "^[\s\*]*" >> "" ISRHA
      ^!Set %bs%=^$StrFill("^%SPACE%";^%FV1%)$
      ^!Set %ts%=^$StrFill("^%SPACE%";^$Calc(^%FV1%+2)$)$
      ^!SetPasteIndent Off
      ^!InsertSelect ^P^$GetSelection$
      ^!Menu Modify/Lines/Join Lines
      ^!Menu Modify/Spaces/Single Space
      ^!InsertSelect ^$StrFormat("^$GetSelection$";^$Calc(^%FV1%+2)$;^%FV2%;^%FV3%)$
      ^!InsertSelect ^P^P^$GetSelection$
      ^!Replace "^P^P^%ts%" >> "^P^P^%bs%*^%SPACE%" ISHA
      ^!InsertSelect ^$StrDeleteLeft("^$GetSelection$";4)$
      ^!ClearVariable %bs%
      ^!ClearVariable %ts%
      ;end of clip
    • Sheri
      Hi all, Did some more tinkering on this one. Now if there are no paragraph endings in the initial selection, the clip now selects the current paragraph based
      Message 2 of 2 , Aug 7 10:19 AM
      • 0 Attachment
        Hi all,

        Did some more tinkering on this one.

        Now if there are no paragraph endings in the initial selection,
        the clip now selects the current paragraph based on ^P (you can
        cancel if you don't like what's selected).

        Also, it now forbids zeros for bullet position and text width.
        The bullet character itself is now dependent on the character set
        in Options.

        Found something odd clip-wise. If you want to get a valid
        ^$StrPos$ for ^P in ^$GetSelection$ you have to ^$RemoveTokens$
        on the ^P. Applying ^$UseTokens$ to the ^$GetSelection$ didn't
        do the job. I don't know why, but since I found a workaround I'm
        not sure this is a bug. Opinions?

        Sheri

        This clip can be viewed and copied without broken lines on or about:

        http://groups.yahoo.com/group/ntb-clips/messages/8876?expand=1

        H="Bulleted Paragraphs"
        ;8-5-2002 by Sheri Pierce
        ;8-6-2002 enhanced for flexible margins
        ;8-7-2002 added error trapping and bullet character from ini processing
        ;Change bullet character if desired in View|Options|General
        ^!ProginiSave
        :Start
        ^!If ^$StrPos(^$RemoveTokens("^P")$;"^$GetSelection$";False)$<1 Next Else Skip_1
        ^!Select Paragraph
        ^!If ^%FV%=^%Empty% Next Else Skip_1
        ^!SetArray %FV%=2;68;False
        ^!If ^%PrevFV%=^%Empty% Next Else Skip_1
        ^!SetArray %PrevFV%=2;68;False
        ^!If ^%FV1%=0 Next Else Skip_1
        ^!Set %FV1%=^%PrevFV1%
        ^!If ^%FV2%=0 Next Else Skip_1
        ^!Set %FV2%=^%PrevFV2%
        ^!SetArray %FV%=^?{(M="09;0;_")Left Bullet Position =^%FV1%};^?{(M="09;0;_")Text Width=^%FV2%};^?{(T=C)Justify==^$SetDefaultValue(On^=True|_Off^=False;^%FV3%)$}
        ^!IfCancel End
        ^!If ^%FV1%<1 Error
        ^!If ^%FV2%<1 Error
        ^!SetHintInfo Reformat in Progress
        ^!SetScreenUpdate Off
        ^!Replace "^[\s\*]*" >> "" ISRHA
        ^!Set %bs%=^$StrFill("^%SPACE%";^$Calc(^%FV1%-1)$)$
        ^!Set %ts%=^$StrFill("^%SPACE%";^$Calc(^%FV1%+1)$)$
        ^!SetPasteIndent Off
        ^!InsertSelect ^P^$GetSelection$
        ^!Menu Modify/Lines/Join Lines
        ^!Menu Modify/Spaces/Single Space
        ^!InsertSelect ^$StrFormat("^$GetSelection$";^$Calc(^%FV1%+1)$;^%FV2%;^%FV3%)$
        ^!InsertSelect ^P^P^$GetSelection$
        ^!Replace "^P^P^%ts%" >> "^P^P^%bs%^$GetValue("Options:BulletChar")$^%SPACE%" ISHA
        ^!InsertSelect ^$StrDeleteLeft("^$GetSelection$";4)$
        ^!SetArray %PrevFV%=^%FV%
        ^!Goto End
        :Error
        ^!Prompt Zeros are invalid, please reenter.
        ^!Goto Start
        :End
        ^!ClearVariable %bs%
        ^!ClearVariable %ts%
        ;end of clip
      Your message has been successfully submitted and would be delivered to recipients shortly.