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

Re: [NTB] Can't the tabs be sorted alphabetically?

Expand Messages
  • hsavage
    ... Joe Finocchiaro, Don Passenger, any other interested parties, Latest edition of 2 clips to sort tabs of open files. Title of clips denotes function of
    Message 1 of 3 , Jan 26, 2002
    • 0 Attachment
      On 1/25/02 12:11 PM, hsavage wrote:

      >On 1/25/02 11:23 AM, Don Passenger wrote:
      >
      >>The first of these clips gives me an error because it cannot find
      >>pasties.txt.
      >>
      >>I assume this line is where the problem arises:
      >>^!Open ^$GetDocumentPath$pasties.txt
      >>
      >>
      >>The second of the two clips worked splendid.
      >>
      >Don,
      >
      >Sorry, my oversight, pasties.txt is my pasteboard file which I always
      >have open. That's one of the slight mods I made to the clips.
      >
      >If you use the clips from Jody's Dirstuff.clb I'm sure both clips will
      >work as advertised, or, if you also keep a pasteboard file open, edit
      >the clip in question by replacing my filename with your filename.
      >
      >hrs
      >
      Joe Finocchiaro, Don Passenger, any other interested parties,

      Latest edition of 2 clips to sort tabs of open files. Title of clips denotes function of clips. Old clip titles were;

      H="ReOpen Alphabetically I"
      H="ReOpen Alphabetically II"

      First clip sorts tabs via full '\pathname\filename'
      Second clip sorts tabs via '\filename' only
      If a pasteboard file is open it is always placed in Tab 1 regardless of sort type.

      Take care that long lines wrapped by email client are restored before trying to use the clips.

      If the lines commented by Semi-colon at the beginning of each clip are deleted that will probably leave only 1 long line to worry about. That would be the '^!Set %returnto%' line.

      hrs


      H="ReOpen files @ Alpha-pathname"
      ;_hrs_Updated~Created_1/26/02_8:32:39a_hsavage@...
      ; returns to cursor position in focused doc
      ; Sorts by pathname\filename. always puts pasteboard(if open) in tab 1
      ; Last update on 03-08-2000, Sojourner@..., jody
      ; Requires NoteTab version 4.6a
      ; http://www.sureword.com/notetab
      ^!SetHintInfo Reopening files...
      ^!SetScreenUpdate 0
      ;
      ^!Set %returnto%=^$GetPath(^##)$^$GetFileName(^##)$; %row%=^$GetRow$; %col%=^$GetCol$
      ;
      ^!Save All
      ^!ClearVariable %Files%
      ^!ClearVariable %Reload%
      ^!Set %n%=0

      :Loop
      ^!IfTrue ^$IsPasteBoard$ NEXT ELSE SKIP_2
      ^!Set %pasteboard%=^$GetPath(^##)$^$GetFileName(^##)$
      ^!Close
      ;
      ^!Inc %n%
      ^!If ^%n% > ^$GetDocCount$ CloseAll
      ^!Set %FileName%=^$GetDocName(^%n%)$
      ^!Append %Files%=^%FileName%^%nl%
      ^!Goto Loop

      :CloseAll
      ^!Close All
      ^!SetListDelimiter ^p
      ^!Set %Files%=^$StrSort(^%Files%;0;1;0)$
      ^!SetArray %ReOpen%=^%Files%
      ^!Set %Count%=^%ReOpen0%
      ^!Set %Index%=0
      ^!If "^%pasteboard%" = "" SKIP_2
      ^!Open ^%pasteboard%
      ^!Toolbar Paste Board

      :ReOpen
      ^!Inc %Index%
      ^!If ^%Index% = ^%Count% End
      ^!Open ^%ReOpen^%Index%%
      ^!Goto ReOpen

      :end
      ^!Open ^%returnto%
      ^!SetCursor ^%Row%:^%Col%
      ^!SetView ^%Row%:


      H="ReOpen files @ Alpha-filename"
      ;_hrs_Updated~Created_1/26/02_8:32:18a_hsavage@...
      ; returns to cursor position in focused doc
      ; Sorts by \filename. always puts pasteboard(if open) in tab 1
      ; Last updated on 07-01-2000, Sojourner@..., jody
      ; Requires NoteTab version 4.6a
      ; http://www.sureword.com/notetab
      ^!SetHintInfo Reopening files...
      ^!SetScreenUpdate 0
      ;
      ^!Set %returnto%=^$GetPath(^##)$^$GetFileName(^##)$; %row%=^$GetRow$; %col%=^$GetCol$
      ;
      ^!Save All
      ^!ClearVariable %Files%
      ^!ClearVariable %Reload%
      ^!Set %n%=0
      ^!Document Last
      :Loop
      ^!IfTrue ^$IsPasteBoard$ NEXT ELSE SKIP_2
      ^!Set %pasteboard%=^$GetPath(^##)$^$GetFileName(^##)$
      ^!Close
      ;
      ^!Inc %n%
      ^!If ^%n% > ^$GetDocCount$ CloseAll
      ^!Set %FileName%=^$GetFileName(^##)$|^$GetDocName$
      ^!Append %Files%=^%FileName%^%nl%
      ^!Document Prev
      ^!Goto LOOP
      :CloseAll
      ^!Close All
      ^!SetListDelimiter ^p
      ^!Set %Files%=^$StrSort(^%Files%;0;1;0)$
      ; ^!Info ^%Files%
      ^!SetArray %ReOpen%=^%Files%
      ^!Set %Count%=^%ReOpen0%
      ^!Set %Index%=0
      ^!If "^%pasteboard%" = "" SKIP_2
      ^!Open ^%pasteboard%
      ^!Toolbar Paste Board
      :ReOpen
      ^!Inc %Index%
      ^!If ^%Index% = ^%Count% End
      ^!Set %Delete%=^$StrPos(|;^%ReOpen^%Index%%;0)$
      ^!Set %Open%=^$StrDelete(^%ReOpen^%Index%%;1;^%Delete%)$
      ^!Open ^%Open%
      ^!Goto ReOpen
      :end
      ^!Open ^%returnto%
      ^!SetCursor ^%Row%:^%Col%
      ^!SetView ^%Row%:
    • hsavage
      On 1/26/02 9:20 AM, hsavage wrote: To All, I began to have trouble with my last, latest edition, clips. Under some conditions with a pasteboard file involved
      Message 2 of 3 , Jan 27, 2002
      • 0 Attachment
        On 1/26/02 9:20 AM, hsavage wrote:

        To All,

        I began to have trouble with my last, latest edition, clips. Under some conditions with a pasteboard file involved the clips would malfunction. Hopefully I have that straightened out now.

        These are the original clipnames.

        H="ReOpen Alphabetically I"
        H="ReOpen Alphabetically II"

        names were changed to this,

        H="ReOpen files @ Alpha-pathname"
        H="ReOpen files @ Alpha-filename"

        Clips now have new names to reflect function.


        First clip sorts tabs via full '\pathname\filename'
        Second clip sorts tabs via '\filename' only
        If a pasteboard file is open it is always placed in Tab 1 regardless of sort type.

        Take care that long lines wrapped by email client are restored before trying to use the clips.

        If the lines commented by Semi-colon at the beginning of each clip are deleted that will probably leave only 1 long line to worry about. That would be the '^!Set %returnto%' line.

        hrs


        H="Sort OpenDocs @ \pathname\filename"
        ;_hrs_Updated~Created_1/27/02_9:33:25a_hsavage@...
        ; returns to cursor position in focused doc
        ; Sorts by pathname\filename. always puts pasteboard(if open) in tab 1
        ; Last update on 03-08-2000, Sojourner@..., jody
        ; Requires NoteTab version 4.6a
        ; http://www.sureword.com/notetab
        ^!SetHintInfo Reopening files...
        ^!ClearVariables
        ^!SetScreenUpdate 0
        ^!Set %returnto%=^$GetDocName$; %row%=^$GetRow$; %col%=^$GetCol$
        ^!Save All
        ^!Set %index%=0
        ^!Document FIRST
        :LOOP
        ^!Inc %index%
        ^!If ^%index% > ^$GetDocCount$ CLOSEALL
        ^!IfFalse ^$IsPasteBoard$ SKIP_1
        ^!Set %pasteboard%=^$GetDocName$
        ^!Set %FileName%=^$GetDocName$
        ^!Append %Files%=^%FileName%^%nl%
        ^!Document NEXT
        ^!Goto LOOP
        :CLOSEALL
        ^!Close All
        ^!SetListDelimiter ^p
        ^!Set %Files%=^$StrSort(^%Files%;0;1;0)$
        ^!SetArray %ReOpen%=^%Files%
        ^!Set %Count%=^%ReOpen0%
        ^!Set %Index%=0
        ^!If "^%pasteboard%" = "" SKIP_3
        ^!Open ^%pasteboard%
        ^!Toolbar Paste Board
        :REOPEN
        ^!Inc %Index%
        ^!If ^%Index% = ^%Count% End
        ^!Open ^%ReOpen^%Index%%
        ^!Goto ReOpen
        :END
        ^!Open ^%returnto%
        ^!SetView ^$Calc(^%Row%-15)$:1
        ^!SetCursor ^%Row%:^%Col%


        H="Sort OpenDocs @ \filename"
        ;_hrs_Updated~Created_1/27/02_9:33:34a_hsavage@...
        ; returns to cursor position in focused doc
        ; Sorts by \filename. always puts pasteboard(if open) in tab 1
        ; Last update on 03-08-2000, Sojourner@..., jody
        ; Requires NoteTab version 4.6a
        ; http://www.sureword.com/notetab
        ^!SetHintInfo Reopening files...
        ^!ClearVariables
        ^!SetScreenUpdate 0
        ^!Set %returnto%=^$GetDocName$; %row%=^$GetRow$; %col%=^$GetCol$
        ^!Save All
        ^!Set %index%=0
        ^!Document FIRST
        :LOOP
        ^!Inc %index%
        ^!If ^%index% > ^$GetDocCount$ CloseAll
        ^!IfFalse ^$IsPasteBoard$ SKIP_1
        ^!Set %pasteboard%=^$GetDocName$
        ^!Set %FileName%=^$GetFileName(^##)$|^$GetDocName$
        ^!Append %Files%=^%FileName%^%nl%
        ^!Document NEXT
        ^!Goto LOOP
        :CLOSEALL
        ^!Close All
        ^!SetListDelimiter ^p
        ^!Set %Files%=^$StrSort(^%Files%;0;1;0)$
        ^!SetArray %ReOpen%=^%Files%
        ^!Set %Count%=^%ReOpen0%
        ^!Set %Index%=0
        ^!If "^%pasteboard%" = "" SKIP_2
        ^!Open ^%pasteboard%
        ^!Toolbar Paste Board
        :REOPEN
        ^!Inc %Index%
        ^!If ^%Index% = ^%Count% End
        ^!Set %Delete%=^$StrPos(|;^%ReOpen^%Index%%;0)$
        ^!Set %Open%=^$StrDelete(^%ReOpen^%Index%%;1;^%Delete%)$
        ^!Open ^%Open%
        ^!Goto ReOpen
        :END
        ^!Open ^%returnto%
        ^!SetView ^$Calc(^%Row%-15)$:1
        ^!SetCursor ^%Row%:^%Col%
      Your message has been successfully submitted and would be delivered to recipients shortly.