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

Re: [Clip] Named Buffers Using Autocorrection, Some Wishes

Expand Messages
  • hsavage
    hsavage wrote: Here s one more offering to try mimicking the original query. This clip works well and best, is not memory intensive, no resources used for
    Message 1 of 3 , Jan 24, 2006
      hsavage wrote:
      Here's one more offering to try mimicking the original query. This clip
      works well and best, is not memory intensive, no resources used for
      storing tidbits in ram while other programs are running.


      This clip copies selected excerpts from varied files and docs, with a
      user chosen descriptive name, and stores them in a subfolder, named
      Buffers, of NoteTab's Documents folder.

      These excerpt files are saved until you access and use them, they are
      then auto-deleted. Although, if you read the comments at end of clip,
      you can retain them even after use.


      Select between Markers, Add to ClipBook.

      <>----------Separator----------<>
      H="MAKE_GET BufferS"
      ;_ Modified-Updated~Created_20060124
      ;_ hrs ø hsavage·pobox·com_01:08:40p
      ; - Buffer names are restricted to characters
      ; - available for use in filenames
      ^!ClearVariables
      ^!SetScreenUpdate 0
      ^!Set %ww%=^$IsWordWrap$
      ;^!SetWordWrap 0
      ^!Set %bfr_idx%="^$GetExpandedName(^##)$"
      ^!Set %bfr_dir%="^$GetDocumentPath$Buffers\"
      ; - adjustable, unless selection is => 55 characters
      ; - clip diverts to retrieval section
      ^!If ^$GetSelSize$ < 55 GET_BFR
      ^!IfFileExist "^%bfr_dir%" SKIP_1 ELSE NEXT
      ^!MkDir "^%bfr_dir%"
      ;
      :MAKE_BFR
      ^!Set %bfr_name%=^?{ENTER MAKE_BUFFER NAME=^$GetWord$}
      ^!SetCode %tidbit%=^$GetSelection$
      ^!TextToFile "^%bfr_dir%^$StrUpper(^%bfr_name%)$.bfr" ^%tidbit%
      ^!Goto END
      ;
      :GET_BFR
      ^!SetListDelimiter |
      ^!Set %files%=^$GetFiles("^%bfr_dir%";"*.bfr";name)$
      ^!If ^%files%=^%EMPTY% END
      ^!Set %files%=^$StrReplace("^%bfr_dir%";^%empty%;^%files%;0;0)$
      ^!Set %files%=^$StrReplace(".bfr";^%empty%;^%files%;0;0)$
      ^!SetArray %files%=^?{(H=26;T=A)BUFFER FILE TO CHOOSE!==^%files%}
      ^!Set %loop%=0; %count%=^%files0%
      ;
      ^!IfTrue ^$IsEmpty(^%files%)$ NEXT ELSE SKIP_3
      ^!StatusShow NO FILE SELECTED
      ^!Delay 25
      ^!Goto END
      ;
      :LOOP
      ^!Inc %loop%
      ^!Set %name%=^$GetName(^%files^%loop%%)$.bfr
      ^!SetCode %bfr_txt%=^$GetFileText("^%bfr_dir%^%name%")$
      ;
      :RETRIEVED_DATA_HANDLER
      ; - example method of using retrieved tidbit.
      ^!Menu File/New
      ^!InsertCode ^%bfr_txt%
      ^!Save AS "^$GetSpecialPath(DeskTop)$^%name%"
      ; - above is saved to Desktop
      :END_DATA_HANDLER
      ;
      ; - send to recycle bin or delete from disk
      ;^!RecycleFile "^%bfr_dir%^%name%"
      ; - comment out recycle and delete to retain the buffer file
      ^!DeleteFile "^%bfr_dir%^%name%"
      ^!If ^%loop% < ^%count% LOOP
      ;
      :END
      ^!StatusClose
      ^!SetWordWrap 1
      ;^!SetWordWrap ^%ww%
      <>----------Separator----------<>

      To All,

      If you want to try this clip and are having trouble copying it from
      email go here to copy and download.

      The clip alone with wordwrap off is 60 lines.

      http://htmlfixit.com/blog/?p=350

      ºvº
      06.01.24
      -Newspaper HeadLine-
      "Iraqi Head Seeks Arms"
      hrs ø hsavage@...
    Your message has been successfully submitted and would be delivered to recipients shortly.