= V7 MultiLine NoSorting TabWidth=20

H=";Files"

H="Append to all.txt"
:ReStart
^!ClearVariables

^!Set %Folder%=^?{(T=D)Browse: full path, end in backslash=^$GetValue(DirStuff:Browse)$}; %Type%=^?{(H=10)File &Types, wildcards OK: *.txt or *.*htm*;*.txt=All Files^=*.*|Html Only^=*.*htm*|_Text Only^=*.txt|Html & Text^=*.*htm*;*.txt|Outline^=*.otl|Clipbook Library^=*.clb|Ini^=*.ini}; %All%=^?{Filename for all appended files= all.txt}; %Sort%=^?{Sorting method=Unsorted|_Name|Type|Date|Size}; %Rev%=^?{Reverse sorting=_No^=|Yes^=Rev}; %Divide%=^%nl%^?{Add separator=_^$GetDate(yyyymmddhhnn)$|New Section|>> Section Divider <<}^%nl%

^!SetHintInfo Working...
^!SetScreenUpdate Off

; Gets the first filename in the folder
^!Set %FullPath%=^$GetFileFirst(^%Folder%;"^%Type%";^%Rev%^%Sort%)$
; Checks to see if files are found by search criteria
^!IfTrue ^$IsEmpty("^%FullPath%")$ Error

:Loop2
^!IfTrue ^$IsEmpty(^%FullPath%)$ Info
^!AppendToFile "^%Folder%^%All%" ^$GetFileText(^%FullPath%)$^%Divide%
^!Set %FullPath%=^$GetFileNext$
^!Goto Loop2

:Info
^!CloseFileFind
^!StatusShow Files done!
^!Delay 10
^!StatusClose
^!Open "^%Folder%^%All%"
^!Goto End

:Error
^!Skip There were no files by the file type you search for (^%Type%) in ^%Folder%. Try again?
^!Goto End
^!Goto ReStart

H="Build"
^!Find "artist="">"

H="Checkbox close"

^!ClearVariable %Files%
^!Set %n%=0; %us%=^?{&Check files automatically in file list to close==_Yes^=_|No^=}; %Discard%=^?{Discard any new change w/o prompt to save?==Yes^=Discard|_No^=}

:Loop
^!Inc %n%
^!If ^%n% > ^$GetDocCount$ CheckUs
^!Set %FileName%=^$GetDocName(^%n%)$
^!Append %Files%=^%us%^%FileName%|
^!Goto Loop

:CheckUs
^!SetListDelimiter |
^!SetArray %Close%=^?{(T=A;H=20)Choose document to close==^%Files%}
^!Set %Count%=^%Close0%
^!Set %Index%=0

^!SetHintInfo Closing...
^!SetScreenUpdate Off

:Close
^!Inc %Index%
^!If ^%Index% > ^%Count% End
^!Close ^%Close^%Index%% ^%Discard%
^!Goto Close

H="Checkbox reload"

^!ClearVariable %Files%
^!ClearVariable %Reload%
^!Set %n%=0; %us%=^?{&Check files automatically in file list to reload==_Yes^=_|No^=}; %Show%=^?{Only show modified documents in list==_Yes|No^=}

:Loop
^!Inc %n%
^!If ^%n% > ^$GetDocCount$ CheckUs
^!Set %FileName%=^$GetDocName(^%n%)$
^!Append %Files%=^%us%^%FileName%^=^%n%|
^!Goto Loop

:CheckUs
^!SetListDelimiter |
^!SetArray %Reload%=^?{(T=A;H=20)Choose document to reload==^%Files%}
^!Set %Count%=^%Reload0%
^!Set %Index%=0

:Reload
^!Inc %Index%
^!If ^%Index% > ^%Count% End
^!SetDocIndex ^%Reload^%Index%%
^!Keyboard Alt+E R Enter
^!Goto Reload

H="CRNL to comma space"
; Replace all CRNL with a comma and a space
^!Replace "^P" >> ",^%Space%" WAS
; Insert a CRNL after each sequence of six items
^!Replace "(?:[^,\r\n]+,\x20?){6}\K" >> "\r\n" WARS
; Remove comma and space (hex 20) at end of line ($)
^!Replace ",\x20$" >> "" WARS


H="File this chars counting"
:Begin
^!Jump Doc_Start
:GetPosition
^!Set %position%=^?{In front of character numbered}
^!Set %position%="^$Calc(^%position%-1)$"
^!Set %LF%=^$DecToChar(10)$

:VerifyDocLength
^!Set %characters%="^$Calc(^$GetTextSize$-(^$GetLineCount$)+1)$"
^!If "^%position%" > "^%characters%" Next ELSE MoveCursor
^!Info [C]Number entered is beyond the end. There are only ^%characters% characters.

^!Goto Terminus

:MoveCursor
^!MoveCursor +1
^!Set %position%="^$Calc(^%position%-1)$"
^!If "^%position%" = "0" Terminus
^!If "^$GetChar$" = "^%LF%" MoveWithSkip
^!Goto MoveCursor

:MoveWithSkip
^!MoveCursor +1
^!Goto MoveCursor

:Terminus

H="File this viewed"
^!ClearVariables
^!Set %ThisName%=^$GetDocName$
^!Set %OtherProg%=d:\program files\small utilities\textview\textview.exe

^!Set %GoName%=^$GetShort(^%ThisName%)$
^!Shell ^%OtherProg% ^%GoName%

H="File this more erase"
:START
^!Continue This file erases to the bin
^!RecycleFile ^**
^!RecycleFile ^##
^!Close Discard
^!GoTo START

H="File name DOS"
^!Info [L] Finds a file and gives its DOS name without opening it.

^!ClearVariables

^!Toolbar New Document
^!Save AS C:\Program Files\NoteTab\Libraries\temp.tmp

^!SetWizardLabel Press OK for OTLs here or navigate
^!Set %Folder%=^?{(T=D)&Browse: Confirm OK or press the button=^$GetValue(DirStuff:Browse)$}

^!StatusShow Finding files...
^!SetScreenUpdate Off

^!Set %Type%=*.*
^!Set %Sort%=Name

^!FocusDoc
^!Close DISCARD
^!DestroyDoc C:\Program Files\NoteTab\Libraries\temp.tmp

^!Set %FullPath%=^$GetFileFirst(^%Folder%;"^%Type%";^%Sort%)$
; Checks to see if files are found by search criteria
^!IfTrue ^$IsEmpty("^%FullPath%")$ END

:LOOP1
^!IfTrue ^$IsEmpty(^%FullPath%)$ DOARRAY
^!Append %Files%=^%FullPath%|
^!Set %FullPath%=^$GetFileNext$
^!Goto LOOP1

:DOARRAY

^!CloseFileFind
^!SetArray %EditList%=^?{(T=L)Choose=^%Files%}
^!Set %Count%=^%EditList0%
^!Set %Index%=0

:LOOP2
;When it chooses a file the index position forces it out of the loop
^!Set %FilePathFull%=^%EditList^%Index%%
^!Inc %Index%
^!If ^%Index% > ^%Count% PROCEED
^!Set %Name%=^%EditList^%Index%%
^!GoTo LOOP2

:PROCEED

^!Set %DosName%=^$GetShort(^%Name%)$
^!SetClipboard ^%DosName%
^!Info [C] The name^P^P^$GetClipboard$^P^Pis copied to the clipboard

H="File this name DOS"
^!Set %Name%=^$GetDocName$
^!Set %DosName%=^$GetShort(^%Name%)$
^!SetClipboard ^%DosName%
^!Info [C] The name^P^P^$GetClipboard$^P^Pis copied to the clipboard

H="File name to title"
^!SetClipboard ^$GetDocName()$
^!Jump Doc_Start
^!InsertText ^p^p
^!Jump Doc_Start
^$GetDocName()$
    
^!Select Bol
^!DeleteLine

H="File save as line"
;_20051013_2:07:17p_hsavage@pobox.com
^!ClearVariables
^!Set %sourcefile%="^$GetExpandedName(^##)$"
^!SetListDelimiter ;
;
^!SetArray %frbdn%="\;/;:;*;?;";<;>;|"
^!Set %idx%=0; %cnt%=^%frbdn0%
^!Set %name%="^$GetLine(1)$"
:FRBDN
^!Inc %idx%
; replaces forbidden characters with dashes
^!Set %name%=^$StrReplace("^%frbdn^%idx%%";"-";"^%name%";0;0)$
^!If ^%idx% = ^%cnt% NEXT ELSE FRBDN
^!Set %name%=^$StrTrim("^%name%")$
; edit next line to reflect your starting_folder' preference
;
^!SetWizardLabel "Choose Destination - Edit FileName - Delete SourceFile" ;
^!Set %name%=^?{New FileName to accept or edit=^%name%}; %path%=^?{(T=D)Choose destination path for file=C:\Users\Worsfold\My Writing\}; %delsource%=^?{Delete source file==Yes^=1|_No^=0}
;
^!Save AS "^%path%^%name%"
^!IfTrue ^%delsource% ^!DeleteFile ^%sourcefile%

H="File name date this save"
^!Set %First%=^?[Choose a filename=_Temporary|Fred|Text|File|Note]

^!Set %Date%=^$GetDate(yyyymmdd)$
^!Set %Filename%="^%First% ^%Date%"
^!Save As "^%Filename%.txt"

H="Filename date this rename"
^!Set %First%=^$GetName(^$GetDocName$)$
^!Set %Date%=^$GetDate(yyyymmdd)$
^!Set %Filename%="^%First% ^%Date%"
^!RenameDoc ^%Filename%.txt

H="Files NO save exit"
^!Close ALL,DISCARD
^!Menu File/Exit

H="File this move"
^$GetDocName()$
^!ToolBar Save As
^!RecycleFile "^%ThisFile%"
^!ToolBar Close Document

H="Files change case"

^!Continue Changes directory disk files to a specified case. Continue?

:ReStart
^!ClearVariables

^!SetWizardLabel Browse..., Pull Down, or Type
^!Set %Folder%=^?{(T=D)Browse: full path, end in backslash=^$GetValue(DirStuff:Browse)$}; %Drop%=^?{Drop down: full path, end in backslash=_If used, Browse is ignored, may enter path manually^=1|^$GetValue(DirStuff:Path1)$|^$GetValue(DirStuff:Path2)$|^$GetValue(DirStuff:Path3)$|^$GetValue(DirStuff:Path4)$|^$GetValue(DirStuff:Path5)$|^$GetValue(DirStuff:Path6)$|^$GetValue(DirStuff:Path7)$|^$GetValue(DirStuff:Path8)$|^$GetValue(DirStuff:Path9)$}; %Type%=^?{File Types=_All Files^=*.*|Images, Html, Midi, and Wav^=*.gif;*.jpg;*.jpeg;*.*htm*;*.mid;*.wav|Images and Html Only^=*.gif;*.jpg;*.jpeg;*.*htm*|Images Only^=*.gif;*.jpg;*.jpeg|Html Only^=*.*htm*|Midi Only^=*.mid|Wav Only^=*.wav|Zip Files^=*.zip|Executable^=*.exe}; %Case%=^?{(H=12)Convert to what case==Capitalize|FileWordCase|iNVERTcASE|_lower|lowerext|lowername|lowernameUPPEREXT|SentenceCase|UPPER|UPPEREXT|UPPERNAME|UPPERNAMElowerext}; %Compress%=^?{If renaming to lowercase, remove spaces?=_Yes|No}

^!SetHintInfo Working...
^!SetScreenUpdate Off

; Checks to see if Browse or Drop was used
^!IfTrue ^%Drop% Skip
^!Set %Folder%=^%Drop%

; Gets the first filename in the folder
^!Set %FullPath%=^$GetFileFirst(^%Folder%;"^%Type%")$
; Checks to see if files are found by search criteria
^!IfTrue ^$IsEmpty("^%FullPath%")$ Error

:GetFile
; If no more files are found in folder, goes to ClsFind
^!IfTrue ^$IsEmpty(^%FullPath%)$ ClsFind
; Gets the name and file ext from the full path\name
^!Set %Name%=^$GetName(^%FullPath%)$^$GetExt(^%FullPath%)$
; Checks to see what case to use
^!IfSame "^%Case%" "Capitalize" Capitalize
^!IfSame "^%Case%" "FileWordCase" FileWordCase
^!IfSame "^%Case%" "iNVERTcASE" iNVERTcASE
^!IfSame "^%Case%" "lower" lower
^!IfSame "^%Case%" "lowerext" lowerext
^!IfSame "^%Case%" "lowername" lowername
^!IfSame "^%Case%" "lowernameUPPEREXT" lowernameUPPEREXT
^!IfSame "^%Case%" "SentenceCase" SentenceCase
^!IfSame "^%Case%" "UPPER" UPPER
^!IfSame "^%Case%" "UPPEREXT" UPPEREXT
^!IfSame "^%Case%" "UPPERNAME" UPPERNAME
^!IfSame "^%Case%" "UPPERNAMElowerext" UPPERNAMElowerext
^!Goto Error2

:Capitalize
^!ReNameFile "^%Folder%^%Name%" "^%Folder%^$StrCapitalize("^%Name%")$"
^!Append %Stats%=^%Folder%^$StrCapitalize("^%Name%")$^%nl%
^!Set %FullPath%=^$GetFileNext$
^!Goto GetFile

:FileWordCase
^!ReNameFile "^%Folder%^%Name%" "^%Folder%^$StrFileWordCase$"
^!Set %Stat%=^%Folder%^$StrFileWordCase$^%nl%
^!Append %Stats%=^%Stat%
^!Set %FullPath%=^$GetFileNext$
^!Goto GetFile

:iNVERTcASE
^!ReNameFile "^%Folder%^%Name%" "^%Folder%^$StriNVERTcASE("^%Name%")$"
^!Append %Stats%=^%Folder%^$StriNVERTcASE("^%Name%")$^%nl%
^!Set %FullPath%=^$GetFileNext$
^!Goto GetFile

:lower
^!IfTrue ^%Compress% Next else Skip_3
^!Set %NoSpace%=^$StrReplace(" ";;"^$Strlower("^%Name%")$";0;0)$
^!ReNameFile "^%Folder%^%Name%" "^%Folder%^%NoSpace%"
^!Append %Stats%=^%NoSpace%^%nl%
^!Goto Skip_2
^!ReNameFile "^%Folder%^%Name%" "^%Folder%^$Strlower("^%Name%")$"
^!Append %Stats%=^%Folder%^$Strlower("^%Name%")$^%nl%
^!Set %FullPath%=^$GetFileNext$
^!Goto GetFile

:lowerext
^!ReNameFile "^%Folder%^%Name%" "^%Folder%^$GetName("^%Name%")$^$Strlower("^$GetExt("^%Name%")$")$"
^!Append %Stats%=^%Folder%^$GetName("^%Name%")$^$Strlower("^$GetExt("^%Name%")$")$^%nl%
^!Set %FullPath%=^$GetFileNext$
^!Goto GetFile

:lowername
^!ReNameFile "^%Folder%^%Name%" "^%Folder%^$Strlower("^$GetName("^%Name%")$")$^$GetExt("^%Name%")$"
^!Append %Stats%=^%Folder%^$Strlower("^$GetName("^%Name%")$")$^$GetExt("^%Name%")$^%nl%
^!Set %FullPath%=^$GetFileNext$
^!Goto GetFile

:lowernameUPPEREXT
^!ReNameFile "^%Folder%^%Name%" "^%Folder%^$Strlower("^$GetName("^%Name%")$")$^$StrUPPER("^$GetExt("^%Name%")$")$"
^!Append %Stats%=^%Folder%^$Strlower("^$GetName("^%Name%")$")$^$StrUPPER("^$GetExt("^%Name%")$")$^%nl%
^!Set %FullPath%=^$GetFileNext$
^!Goto GetFile

:SentenceCase
^!ReNameFile "^%Folder%^%Name%" "^%Folder%^$StrSentenceCase("^%Name%")$"
^!Append %Stats%=^%Folder%^$StrSentenceCase("^%Name%")$^%nl%
^!Set %FullPath%=^$GetFileNext$
^!Goto GetFile

:UPPER
^!ReNameFile "^%Folder%^%Name%" "^%Folder%^$StrUPPER("^%Name%")$"
^!Append %Stats%=^%Folder%^$StrUPPER("^%Name%")$^%nl%
^!Set %FullPath%=^$GetFileNext$
^!Goto GetFile

:UPPEREXT
^!ReNameFile "^%Folder%^%Name%" "^%Folder%^$GetName("^%Name%")$^$StrUPPER("^$GetExt("^%Name%")$")$"
^!Append %Stats%=^%Folder%^$GetName("^%Name%")$^$StrUPPER("^$GetExt("^%Name%")$")$^%nl%
^!Set %FullPath%=^$GetFileNext$
^!Goto GetFile

:UPPERNAME
^!ReNameFile "^%Folder%^%Name%" "^%Folder%^$StrUPPER("^$GetName("^%Name%")$")$^$GetExt("^%Name%")$"
^!Append %Stats%=^%Folder%^$StrUPPER("^$GetName("^%Name%")$")$^$GetExt("^%Name%")$^%nl%
^!Set %FullPath%=^$GetFileNext$
^!Goto GetFile

:UPPERNAMElowerext
^!ReNameFile "^%Folder%^%Name%" "^%Folder%^$StrUPPER("^$GetName("^%Name%")$")$^$Strlower("^$GetExt("^%Name%")$")$"
^!Append %Stats%=^%Folder%^$StrUPPER("^$GetName("^%Name%")$")$^$Strlower("^$GetExt("^%Name%")$")$^%nl%
^!Set %FullPath%=^$GetFileNext$
^!Goto GetFile

:ClsFind
^!CloseFileFind
^!SetWizardTitle ~^$StrFill(" ";50)$http://www.sureword.com/notetab^$StrFill(" ";50)$~
^!Info [L]NoteTab made these changes:^p^p^%Stats%
^!Goto End

:Error
^!Skip There were no files by the file type you search for (^%Type%) in ^%Folder%. Try again?
^!Goto End
^!Goto ReStart

:Error2
^!Info Error2: I don't know why that happened! <vbg>

H="Files no spaces"

^!Continue Removes spaces from all the file names of specified types in a directory of disk files. Continue?

:ReStart
^!ClearVariable %Stats%

^!SetWizardLabel Browse..., Pull Down, or Type
^!Set %Folder%=^?{(T=D)Browse: full path, end in backslash=^$GetValue(DirStuff:Browse)$}; %Drop%=^?{Drop down: full path, end in backslash=_If used, Browse is ignored, may enter path manually^=1|^$GetValue(DirStuff:Path1)$|^$GetValue(DirStuff:Path2)$|^$GetValue(DirStuff:Path3)$|^$GetValue(DirStuff:Path4)$|^$GetValue(DirStuff:Path5)$|^$GetValue(DirStuff:Path6)$|^$GetValue(DirStuff:Path7)$|^$GetValue(DirStuff:Path8)$|^$GetValue(DirStuff:Path9)$}; %Type%=^?{File Types=_All Files^=*.*|Images, Html, Midi, and Wav^=*.gif;*.jpg;*.jpeg;*.*htm*;*.mid;*.wav|Images and HTML Only^=*.gif;*.jpg;*.jpeg;*.*htm*|Images Only^=*.gif;*.jpg;*.jpeg|HTML Only^=*.*htm*|Midi Only^=*.mid|Wav Only^=*.wav|Zip Files^=*.zip|Executable^=*.exe}

^!SetHintInfo Working...
^!SetScreenUpdate Off

; Checks to see if Browse or Drop was used
^!IfTrue ^%Drop% Skip
^!Set %Folder%=^%Drop%

; Gets the first filename in the folder
^!Set %FullPath%=^$GetFileFirst(^%Folder%;"^%Type%")$
; Checks to see if files are found by search criteria
^!IfTrue ^$IsEmpty("^%FullPath%")$ Error

:Loop
; If no more files are found in folder, goes to ClsFind
^!IfTrue ^$IsEmpty(^%FullPath%)$ ClsFind
; Gets the name and file ext from the full path\name
^!Set %Name%=^$GetName(^%FullPath%)$^$GetExt(^%FullPath%)$
^!Set %Name%=^$GetName(^%FullPath%)$^$GetExt(^%FullPath%)$
^!Set %NoSpace%=^$StrLower(^$StrReplace(" ";;"^%Name%";0;0)$)$
^!ReNameFile "^%Folder%^%Name%" "^%Folder%^%NoSpace%"
^!Append %Stats%=^%NoSpace%^%nl%
^!Set %FullPath%=^$GetFileNext$
^!Goto Loop

:ClsFind
^!CloseFileFind
^!SetWizardTitle ^$StrFill(" ";30)$http://www.pluralist.co.uk^$StrFill(" ";30)$
^!Info [L]Alterations:^p^p^%Stats%
^!Goto End

:Error
^!Skip No files of (^%Type%) in ^%Folder%. Try again?
^!Goto End
^!Goto ReStart

:Error2
^!Info Error2: Error unknown

H="Files concatenate"
; Joy Sept 4, 2015
 ^!Continue User selects files from one or more folders which are then concatenated into one file.
 

 ^!ClearVariables
 ^!SetWizardTitle "Append selected file contents into a file"
 ^!Set %RTot%=0
 :Select_Folder
 ^!SetWizardLabel " (^%RTot% selected so far)"
 ^!Set %Folder%=^?{(T=D)Select a folder to see all files - Cancel when done}
 ^!IfCancel LoadFileContents
 ; Obtain list of files of several types from selected folder
 ; txt, log, otl, htm, html, bat, ini
 ; Ignore folders, hidden files, system files and reparse points
 ^!Set %AllFiles%=^$GetDosOutput("Dir ""^%Folder%*.txt;^%Folder%*.log;^%Folder%*.otl;^%Folder%*.htm;^%Folder%*.bat;^%Folder%*.ini"" /B /OE /A-D-H-S-L")$
 ^!IfTrue ^$IsEmpty(^%AllFiles%)$ Next ELSE Cont1
 ^!Prompt No selectable files in ^%Folder%
 ^!Goto Select_Folder
 

 :Cont1
 ; Replace CRLF with bars
 ^!Set %AllFiles%=^$StrReplace("^%NL%";"|";^%AllFiles%;IA)$
 ; Let user check the desired files
 ^!Set %CheckedFiles%=^?{(T=A;H=20)Select Files=^%AllFiles%}
 ^!IfCancel Select_Folder
 ; If nothing checked
 ^!IfTrue ^$IsEmpty(^%CheckedFiles%)$ Select_Folder
 ; Remove quotes from around file names
 ^!Set %CheckedFiles%=^$StrReplace("\x22";"";^%CheckedFiles%;RA)$
 ^!SetListDelimiter ;
 ^!SetArray %SelectedFileAry%=^%CheckedFiles%
 ^!Inc %RTot% ^%SelectedFileAry0%
 

 ^!Set %Nr%=1
 :RememberCurrentFiles
 ^!Append %FileSelection%=^%Folder%^%SelectedFileAry^%Nr%%;
 ^!If ^%Nr%=^%SelectedFileAry0% Select_Folder
 ^!Inc %Nr%
 ^!Goto RememberCurrentFiles
 

 ; Append contents of each selected file to one file
 :LoadFileContents
 ^!IfTrue ^$IsEmpty(^%FileSelection%)$ Nothing_Selected
 ; Remove final semicolon
 ^!Set %FileSelection%=^$StrDeleteRight("^%FileSelection%";1)$
 ^!SetArray %Concat%=^%FileSelection%
 ;^!If ^%Concat0%=0 Nothing_Selected
 

 ^!IfFileExist "^$GetDocumentPath$Confile.txt" Next ELSE ConcatFileDNExist
 ^!Skip ^$GetDocumentPath$Confile.txt exists. Append to it? (If no, it will be deleted)
 ^!DeleteFile ^$GetDocumentPath$Confile.txt
 

 :ConcatFileDNExist
 ^!Set %Nr%=1
 :Loop2
 ^!AppendToFile ^$GetDocumentPath$Confile.txt ***Start of ^%Concat^%Nr%% (Selection ^%Nr%)***^%NL%^$GetFileText(^%Concat^%Nr%%)$^%NL%***End of ^%Concat^%Nr%%***^%NL%^%NL%
 ^!If ^%Nr%=^%Concat0% Out
 ^!Inc %Nr%
 ^!Goto Loop2
 

 :Out
 ^!Open ^$GetDocumentPath$Confile.txt
 ^!Goto Finished
 

 :Nothing_Selected
 ^!Prompt No files Selected
 ^!Goto ClearV
 

 :Finished
 ^!Prompt ^%Concat0% files appended
 

 :ClearV
 ^!ClearVariables
 


H="Files link/Image case"

^!Continue Changes all links and images to lower case in the whole folder. Continue?

:ReStart
^!ClearVariables
^!Jump 1

^!SetWizardLabel Browse..., Pull Down, or Type
^!Set %Folder%=^?{(T=D)Browse: full path, end in backslash=^$GetValue(DirStuff:Browse)$}; %Drop%=^?{Drop down: full path, end in backslash=_If used, Browse is ignored, may enter path manually^=1|^$GetValue(DirStuff:Path1)$|^$GetValue(DirStuff:Path2)$|^$GetValue(DirStuff:Path3)$|^$GetValue(DirStuff:Path4)$|^$GetValue(DirStuff:Path5)$|^$GetValue(DirStuff:Path6)$|^$GetValue(DirStuff:Path7)$|^$GetValue(DirStuff:Path8)$|^$GetValue(DirStuff:Path9)$}; %Type%=^?{(H=10)File &Types, wildcards OK: *.txt or *.*htm*;*.txt=All Files^=*.*|Html Only^=*.*htm*|Text Only^=*.txt|_Html & Text^=*.*htm*;*.txt|Outline^=*.otl|Clipbook Library^=*.clb|Ini^=*.ini}

^!SetHintInfo Working...
^!SetScreenUpdate Off

; Checks to see if Browse or Drop was used
^!IfTrue ^%Drop% Skip
^!Set %Folder%=^%Drop%

; Gets the first filename in the folder
^!Set %FullPath%=^$GetFileFirst(^%Folder%;"^%Type%")$
; Checks to see if files are found by search criteria
^!IfTrue ^$IsEmpty("^%FullPath%")$ Error

^!Open ^%FullPath%

:Start
^!SetHintInfo Working...
^!SetScreenUpdate Off

:Loop1
^!Find "<A HREF=" IS
^!IfError Jump1
^!MoveCursor +2
^!Select Url
^$StrLower("^$GetSelection$")$
^!Goto Loop1

:Jump1
^!Jump 1

:Loop2
^!Find "<IMG SRC=" IS
^!IfError Close
^!MoveCursor +2
^!Select Url
^$StrLower("^$GetSelection$")$
^!Goto Loop2

:Close
^!Close Save
^!IfTrue ^$IsEmpty(^%FullPath%)$ CloseFileFind
^!Append %FileList%=^%FullPath%^%nl%
^!Open "^%FullPath%"
^!Set %FullPath%=^$GetFileNext$
^!Goto Start

:CloseFileFind
^!CloseFileFind
^!SetWizardTitle ^$StrFill(" ";30)$http://www.pluralist.co.uk^$StrFill(" ";30)$
^!Info [L]^%FileList%
^!Goto End

:Error
^!Skip No files of (^%Type%) in ^%Folder%. Try again?
^!Goto End
^!Goto ReStart

H="Files URLs extracted"

^!Continue Links from html files in a folder to a new document.
^!Jump 1

:ReStart
^!ClearVariables
^!SetHintInfo Working...
^!SetScreenUpdate Off

^!SetWizardLabel Browse..., Pull Down, or Type
^!Set %Folder%=^?{(T=D)Browse: full path, end in backslash=^$GetValue(DirStuff:Browse)$}; %Drop%=^?{Drop down: full path, end in backslash=_If used, Browse is ignored, may enter path manually^=1|^$GetValue(DirStuff:Path1)$|^$GetValue(DirStuff:Path2)$|^$GetValue(DirStuff:Path3)$|^$GetValue(DirStuff:Path4)$|^$GetValue(DirStuff:Path5)$|^$GetValue(DirStuff:Path6)$|^$GetValue(DirStuff:Path7)$|^$GetValue(DirStuff:Path8)$|^$GetValue(DirStuff:Path9)$}; %Type%=^?{(H=10)File &Types, wildcards OK: *.txt or *.*htm*;*.txt=All Files^=*.*|_Html Only^=*.*htm*|Text Only^=*.txt|Html & Text^=*.*htm*;*.txt|Outline^=*.otl|Clipbook Library^=*.clb|Ini^=*.ini}

^!SetHintInfo Working...
^!SetScreenUpdate Off

; Checks to see if Browse or Drop was used
^!IfTrue ^%Drop% Skip
^!Set %Folder%=^%Drop%

; Gets the first filename in the folder
^!Set %FullPath%=^$GetFileFirst(^%Folder%;"^%Type%")$
; Checks to see if files are found by search criteria
^!IfTrue ^$IsEmpty("^%FullPath%")$ Error

^!Open ^$GetFileFirst(^%Folder%;^%Type%)$

:Start
^!SetHintInfo Working...
^!SetScreenUpdate Off

:Loop
^!Find "<a href="" SI
^!IfError Close
^!MoveCursor 1
^!Select Url
^!Set %url%=^$GetSelection$

^!Find "">" S
^!IfError Close
^!Jump Select_End
^!Set %Start%=^$GetRow$:^$GetCol$
^!Find "</a>" SI
^!Jump Select_Start
^!SelectTo ^%Start%
^!Set %descript%=^$GetSelection$<BR>
^!Append %NewFormat%=^%descript%^%url%<P>
^!Inc %Index%
^!Goto Loop

:Close
^!Close Discard
^!IfTrue ^$IsEmpty(^%FullPath%)$ CloseFileFind
^!Append %FileList%=^%FullPath%^%nl%
^!Open "^%FullPath%"
^!Set %FullPath%=^$GetFileNext$
^!Goto Start

:CloseFileFind
^!CloseFileFind
^!SetClipboard ^%NewFormat%
^!Toolbar Paste New
^!Toolbar Strip Tags
^!Goto End

:Error
^!Skip There were no files by the file type you search for (^%Type%) in ^%Folder%. Try again?
^!Goto End
^!Goto ReStart

H="Files count sizes"
^!ClearVariables
^!SetHintInfo Calculating...
^!SetArray %FileList%=^$GetFiles(^?[(T=D)Directory];"^?[File type(s)=*.*]")$
^!Set %Count%=^%FileList0%
^!Set %Index%=0; %FileCount%=0

:Loop
^!Inc %Index%
^!If ^%Index% > ^%Count% Stats
^!Set %FileSize%=^$GetFileSize("^%FileList^%Index%%")$
^!IfTrue ^%FirstPass% Skip_3
^!Set %TotalSize%=^$Calc((^%FileSize%+0)/1024)$
^!Set %FirstPass%=1
^!Goto Skip
^!Set %TotalSize%=^$Calc((^%FileSize%/1024)+^%TotalSize%)$
^!Inc %FileCount%
^!Goto Loop

:Stats
^!If ^$Calc(^%TotalSize%+0;0)$ > ^$Calc(999+0;0)$ Skip_2
^!Info [L]Total count: ^%FileCount%^pTotal size:    ^%TotalSize%kb
^!Goto End
^!Info [L]Total count: ^%FileCount%^pTotal size:    ^$Calc(^%TotalSize%/1024)$Mb

H="Files to Floppy"
^!SetArray %Files%=^?[(T=O;S=M)Browse to get files to copy]
^!Set %Count%=^%Files0%
^!Set %Index%=0

:Loop
^!Inc %Index%
^!If ^%Index% > ^%Count% End
^!CopyFile "^%Files^%Index%%" "A:\"
^!Goto Loop

H="Files to files blanks"

:ReStart
^!ClearVariables

^!SetWizardTitle Inserts directory of files to new documents...
^!SetWizardLabel Browse..., Pull Down, or Type
^!Set %Folder%=^?{(T=D)Browse: full path, end in backslash=^$GetValue(DirStuff:Browse)$}; %Drop%=^?{Drop down: full path, end in backslash=_If used, Browse is ignored, may enter path manually^=1|^$GetValue(DirStuff:Path1)$|^$GetValue(DirStuff:Path2)$|^$GetValue(DirStuff:Path3)$|^$GetValue(DirStuff:Path4)$|^$GetValue(DirStuff:Path5)$|^$GetValue(DirStuff:Path6)$|^$GetValue(DirStuff:Path7)$|^$GetValue(DirStuff:Path8)$|^$GetValue(DirStuff:Path9)$}; %Type%=^?{(H=10)File &Types, wildcards OK: *.txt or *.*htm*;*.txt=All Files^=*.*|Html Only^=*.*htm*|_Text Only^=*.txt|Html & Text^=*.*htm*;*.txt|Outline^=*.otl|Clipbook Library^=*.clb|Ini^=*.ini}; %Sort%=^?{Sorting method=Unsorted|_Name|Type|Date|Size}; %Rev%=^?{Reverse sorting=_No^=|Yes^=Rev}; %InsName%=^?{Insert File name at top of document?=Yes|No}

^!SetHintInfo Working...
^!SetScreenUpdate Off

; Checks to see if Browse or Drop was used
^!IfTrue ^%Drop% Skip
^!Set %Folder%=^%Drop%

; Gets the first filename in the folder
^!Set %FullPath%=^$GetFileFirst(^%Folder%;"^%Type%";^%Rev%^%Sort%)$
; Checks to see if files are found by search criteria
^!IfTrue ^$IsEmpty("^%FullPath%")$ Error

:Loop
^!IfTrue ^$IsEmpty(^%FullPath%)$ Close
^!Toolbar New Document
^!IfTrue ^%InsName% Next else Skip_4
^!InsertFile "^%FullPath%"
^!Jump 1
^!InsertText ^$GetFileName("^%FullPath%")$^%nl%^%nl%
^!Goto Skip
^!InsertFile "^%FullPath%"
^!Set %FullPath%=^$GetFileNext$
^!Goto Loop

:Close
^!CloseFileFind
^!Goto End

:Error
^!Skip There were no files by the file type you search for (^%Type%) in ^%Folder%. Try again?
^!Goto End
^!Goto ReStart

H="Files open"
; Temporary file to write
^!Set %tmpf%="^$ExpandEnv("%temp%")$\temp.txt"
^!Document LAST
; Creates new file, overwrites existing
^!TextToFile "^%tmpf%" ^$GetDocName$^%NL%
:LOOP
^!If ^$GetDocIndex$ = 1 SHOW
^!Document PREV
^!AppendToFile "^%tmpf%" ^$GetDocName$^%NL%
^!Goto LOOP
:SHOW
^!Open "^%tmpf%"

H="Folder choice list here"
^!SetWizardLabel Files Listing to Text
^!Set %PageTitle%=^?{Page title=Files in Folder}; %Directory%=^?{(T=D)Directory to search=^$GetExpandedName$}; %FileName%=^?{Text file name (no path or extension) =Files in Folder}; %Specs%=^?{File Specs=*.*}; %Sorting%=^?{(T=C)File sorting==Unsorted|_Name|Type|Date|Size}; %Reverse%=^?{(T=C)Descending order==Yes^=Rev|_No^=}
;End procedure if the user canceled the Clip wizard
^!IfCancel Exit

;Set variable for sorting parameter
^!Set %Sorting%=^%Reverse%^%Sorting%
;Close the output file if there is one open in NoteTab
^!Close "^%Directory%^%FileName%.txt"
;Create a new document with specified name
^!Set %KeepNameFormat%=^$GetNameFormat$
^!SetNameFormat ^%Directory%^%FileName%.txt
^!ToolBar New Document
^!SetNameFormat ^%KeepNameFormat%

^!SetWordWrap ON
;Insert text page features
^!InsertHtml ^%PageTitle%^P^%Directory%^%Specs%^P

^!Keyboard F5
^!InsertHtml ^P

;Retrieve first file name
^!Set %HTMLFullName%=^$GetFileFirst(^%Directory%;"^%Specs%";^%Sorting%)$
:StartLoop
;If the text name is empty (no more matching files), leave the loop
^!IfTrue ^$IsEmpty(^%HTMLFullName%)$ ExitLoop
;Copy HTML name without path to variable
^!Set %HTMLName%=^$GetFileName(^%HTMLFullName%)$
^!InsertHtml ^%directory%^%htmlname%^P(^$GetFileSize(^%HTMLFullName%)$ bytes)
^!InsertHtml ^P

;Get next matching text name and go back to start of loop
^!Set %HTMLFullName%=^$GetFileNext$
^!GoTo StartLoop

:ExitLoop
;Close the file-find variable to restore system resources
^!CloseFileFind
;Insert line break after last tag
^!InsertText ^P

^!If ^$GetSelSize$ > 2 Skip
^!ToolBar Select All
^!If ^$GetSelSize$ < 3 End
^!Set %Text%=^$GetSelection$

;Place cursor back to top of page
^!Jump Text_Start

^!Save AS ^%FileName%.txt

H="Folder Desktop"
^!Set %Folder%=^$GetExpandedName(^$GetShellFolder(Desktop)$)$
^!Shell "^?{(T=D)Enter folder name/ Use the button =^%Folder%}"

H="Folder List Directories"

^!Set %dir%=^?{(T=D)Choose Folder To See FolderTree=C:\}; %which%=^?{Show Dirs or Dirs/Files==_Dirs Only^=nul|Dirs/Files^=*..*}; %Output%=^?{Open in==_New document^=NewDoc|Information box^=}
^!Set %sub_dirs%=^$GetFiles("+^%dir%";^%which%)$
^!Set %sub_dirs%=^$StrReplace("" "";"^p";"^%sub_dirs%";0;0)$
^!Set %sub_dirs%=^$StrReplace("nul";"";"^%sub_dirs%";0;0)$
^!Set %sub_dirs%=^$StrSort("^%sub_dirs%";0;1;1)$
^!IfSame ^%Output%" "NewDoc" Skip_2
^!Info [L]^%nL%^%sub_dirs%
^!Goto End
^!Toolbar New Document
^%sub_dirs%
^!Jump 1

H="Folder My Documents"
^!Set %Folder%=^$GetExpandedName(^$GetShellFolder(Personal)$)$
^!Shell "^?{(T=D)Enter folder name/ Use the button =^%Folder%}"

H="Folder open"
^!Shell "^?{(T=D)Enter folder name/ Use button=^$GetExpandedName$}"

H="Folder opening"
^!Keyboard CTRL+O #^$GetDocumentPath$# ENTER ALT+T #O#

H="Folder whole delete"
^!Continue Deletes the folder and all contents to the Recycle Bin

^!SetWizardTitle Erase folder and contents
 ^!SetWizardLabel In case of error check the Recycle Bin
^!Set %Folder%=^?{(T=D)Folder to remove, can still cancel}
^!RecycleFile "^%Folder%*.*"
^!RmDir "^%Folder%"

H="Open anything"
^!Keyboard CTRL+O ENTER ALT+T #A#

H="Reopen alphabetically"

^!SetHintInfo Reopening files...
^!SetScreenUpdate Off

^!Save All
^!ClearVariable %Files%
^!ClearVariable %Reload%
^!Set %n%=0

:Loop
^!Inc %n%
^!If ^%n% > ^$GetDocCount$ CloseAll
^!Set %FileName%=^$GetDocName(^%n%)$
^!Append %Files%=^%FileName%^%nl%
^!Goto Loop

:CloseAll
^!Close All
^!SetListDelimiter ^%nl%
^!Set %Files%=^$StrSort("^%Files%";0;1;0)$
^!SetArray %ReOpen%=^%Files%
^!Set %Count%=^%ReOpen0%
^!Set %Index%=0

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

H="Reopen 05"
^!ClearVariables
^!Set %Reopen%=4
:LOOP
^!Inc %Count%
^!Keyboard ALT+F R 1
^!If ^%Count% > ^%Reopen% END
^!GoTo LOOP
:END

H="Reopen 15"
^!ClearVariables
^!Set %Reopen%=15
:LOOP
^!Inc %Count%
^!Keyboard ALT+F R 1
^!If ^%Count% > ^%Reopen% END
^!GoTo LOOP
:END

H="Reopen last file"
^!Keyboard ALT+F R 1

H="Reopen menu"
^!Keyboard ALT+F #R#

H=";"

H=";Text Processing"

H="2nd Window & paste"
^!Toolbar New Document
^!Toolbar Second Window
^!Keyboard SHIFT+CTRL+P
^!Keyboard CTRL+END

H="2nd window edit copy"

;Get Name of current document
^!Set %oldfilename%=^$GetDocName$
;Extract path info
^!Set %path%=^$Getpath(^%oldfilename%)$
;extract filename without path info
^!Set %filename%=^$GetFileName(^%oldfilename%)$
;Text to insert in old file name
^!Set %copy%="Original Copy of "
;Build new file name
^!Set %newfilename%=^%path%
^!Append %newfilename%= ^%copy%
^!Append %newfilename%= ^%filename%
^!Save AS ^%newfilename%
;Make original copy read only
^!Keyboard Alt+D O
;Copy all text from file 1 in window 1
^!Toolbar Copy All
;Create file 2 and paste file 1 data to it
^!Toolbar Paste New
;Open second window with file 2 open in it
^!Keyboard Shift+Ctrl+W
;Move cursor to top of file
^!Keyboard Ctrl+Home
;Save the new document to the old document name
^!Save AS ^%oldfilename%
;Delete the "Original Copy of " old document disk file
^!DeleteFile "^%newfilename%"

H="Address name"
^?[Enter name==_Adrian Worsfold|Mick Taylor|Michael Peachey]
^?[Enter street==_32 Chamberlain Close|Flat 3 180 Ings Road|172 Ings Road]
^?[Enter town/ village/ area==_Sutton-on-Hull|Sutton-Ings]
^?[Enter postal town==_HULL|BEVERLEY]
^?[Enter post code==_HU7 4UD|HU8 0JR]

^?[Enter email address==_adrian@pluralist.co.uk|pluralist@pluralist.karoo.co.uk|mickstonepony@mickstonepony.karoo.co.uk]
^?[Enter web address=http://www.pluralist.co.uk]

H="Address website"
http://www.pluralist.co.uk

H="Text clean to DOS"
^!Set %ReDo%=^$StrFixLines("^$GetText$")$
^!Toolbar Select All
^!InsertText ^%ReDo%

H="Addresses email web"
^!Set %Insert%=^P^P
^?[Category=http://www.pluralist.co.uk|_adrian@pluralist.co.uk|pluralist@pluralist.karoo.co.uk]
^!InsertHTML ^P^P

H="Align left plus"
^!Keyboard CTRL+A
^!Keyboard ALT+M A L
^!Keyboard SHIFT+CTRL+I
^!Keyboard CTRL+HOME

H="Asterisks all lines"
^!Keyboard CTRL+A
^!Keyboard SHIFT+CTRL+J
^!Keyboard CTRL+B
^!Keyboard CTRL+HOME

H="Asterisks remove all"
^!SetScreenUpdate Off
^!Keyboard CTRL+A
^!Replace "*" >> "" WAS
^!IfError Next else Skip_-1
^!Replace "  " >> " " WAS
^!IfError Next else Skip_-1
^!Replace "^p " >> "^p" WAS
^!IfError Next else Skip_-1
^!Keyboard SHIFT+CTRL+I
^!Keyboard SHIFT+CTRL+I
^!Keyboard CTRL+HOME

H="Asterisks remove 3 all"
:LOOP
^!Replace "***" >> "" [WAS]
^!IfError END
^!GoTo LOOP
:END
^!Clip "Tabs remove"
^!Clip "Paras regularise"
^!Keyboard CTRL+END

H="Asterisks wrap"
*^&*

H="AutoCorrect enable"
;Opens the AutoCorrect library in the Editor Clipbook
^!LoadLibrary AutoCorrect.clb
;Hides the Clipbook window
^!ShowClipbook False

H="Brackets angular inward"
>^&<
^!Keyboard HOME

H="Bullet point"
•   

H="Brackets angular"
<^&>
^!Keyboard HOME

H="Brackets round"
(^&)
^!Keyboard HOME

H="Brackets square"
[^&]
^!Keyboard HOME

H="Case lower"
^!Keyboard CTRL+L

H="Case sentence"
^!Keyboard SHIFT+CTRL+U

H="Case title"
^!Keyboard SHIFT+CTRL+K

H="Case upper"
^!Keyboard CTRL+U

H="Character big dot"
•

H="Characters special"
^!SetWizardTitle "Pick one"
^!InsertText "^?{(H=9)Select one==â|é|è|ë|ñ|ö|ß|º|°|Copyright ©^=©|Registered TM ®^=®|Quarter^=¼|Half^=_½|Three quarters^=¾|Note^=¶|Two arrows^=»|Xian cross^=? |Big dot^=• }"

H="Column delete"
^!Set %K%=^?{Enter column # to delete}
^!Dec %K%
^!Replace "^([^\,\r\n]*,){^%K%}\K[^,\r\n]*(?|(,)([^\r\n]*?)|(\h*)())(?=\R|\Z)" >> "$3" AIRW

H="Column delete alt"
^!Set %R%=^?{(H=10)Remove column:==First^=F|Second^=1|Third^=2|Fourth^=3|Fifth^=4|Sixth^=5|Seventh^=6|Eighth^=7|Ninth^=8|Tenth^=9}
^!IfSame "^%R%" "F" Next Else Skip_2
^!Replace "^([^,\r\n]+|,),{0,1}" >> "" WARS
^!Goto End
^!Replace "^([^,\r\n]{0,},){^%R%}\K[^,\r\n]{0,},{0,1}" >> "" WARS

H="e.g."
exempli gratia

H="i.e."
id est

H="etc."
etcetera

H="Viz"
videlicet

H="W.T.F."
Quod irrumabo!

H="Font size"
^!Set %size%=^?{Font size=?}
^!Keyboard Alt+D #F# #C# Alt+S #^%size%# ENTER

H="Frequency"
^!Jump Doc_Start
:Loop
^!Find "^(\w+).+(\R\1.+)*" RS
^!IfError End
^!Set %Freq%=^$StrCount("^\d+";"^$GetSelection$";R)$
^!Replace "^" >> "^%Freq%:\x20" HRAS
^!Goto Loop

H="HTML to text"
^!Keyboard ALT+M H R
^!Keyboard CTRL+A
^!Keyboard CTRL+J
^!Keyboard ALT+M L T
^!Keyboard SHIFT+CTRL+I
^!Keyboard CTRL+END

H="Indents remove all"
^!Keyboard CTRL+A
:LOOP
^!Replace "^P " >> "^P" [WAS]
^!IfError END
^!GoTo LOOP
:END

H="Internet acronyms"
^?[(H=8)Choose acronym to paste==_By the Way^=BTW|For What it's Worth^=FWIW|For Your Information^=FYI|I Am Not A Lawyer^=IANAL|In Any Event^=IAE|In My Considered Opinion^=IMCO|In My Humble Opinion^=IMHO|In My Opinion^=IMO|In Other Words^=IOW|Just One of Those Things^=JOOTT|Laughing Out Loud^=LOL|No Reply Necessary^=NRN|On the Other Hand^=OTOH|Real Soon Now [Which May be a Long Time Coming]^=RSN|Rolling on Floor Laughing^=ROFL|Rolling on the Floor Laughing^=ROTFL|Still in the Dark^=SITD|Thanks in Advance^=TIA|There Ain't No Such Thing as a Free Lunch^=TANSTAAFL|Three Letter Acronym^=TLA|Tongue in Cheek^=TIC|With Respect To^=WRT]

H="Keyboard shortcuts"
^!Help "" "Keyboard shortcuts"

H="Lines 3 merge repeat"
^!Replace "\x20+$" >> "" ARSW
;Merge sections
^!Replace "^(\d+)\R(.+)\R(\d.*:.*)$" >> "$1 $2 $3" ARSW

H="Lines compress all"
^!Keyboard ALT+E A
^!Keyboard ALT+M L C
^!Keyboard SHIFT+CTRL+I
^!Keyboard CTRL+HOME

H="Lines compress join"
^!Replace "^p^p" >> "^p" [HAS]
^!Keyboard CTRL+J

H="Lines compress"
^!Replace "^p^p" >> "^p" [HAS]

H="Lines compress simple"
^!Keyboard ALT+M L C
^!Menu Modify/Lines/Unindent

H="Lines join"
^!Menu Modify/Lines/Join Lines
^!Keyboard ALT+M L T
^!Keyboard SHIFT+CTRL+I
^!Jump DOC_END

H="Lines sentences complete"
^!Replace "([\.\?!]\r?\n)" >> "$1[]" RAWS
^!Replace "\r?\n" >> " " RAWS
^!Replace "\[\]" >> "\r\n\r\n" RAWS

H="Lines last blank remove"
;Removes last lines if blank
^!Replace "\R{1,}\Z" >> "" WRS

H="Lines make sort ascend"
^!Select All
^!Menu Modify/Lines/Split Lines
^!Menu Modify/Lines/Sort/Ascending
^!Jump DOC_END

H="Lines make sort descend"
^!Select All
^!Menu Modify/Lines/Split Lines
^!Menu Modify/Lines/Sort/Descending
^!Jump DOC_END

H="Lines number removed"
^!Replace "^\d*\^?[What follows the line numbers etc.=_. |: |; ]" >> "" SAWR

H="Lines number"
^!ClearVariables
^!SetWizardLabel Line numbering options
^!Set %Row%=1; %StartInc%=1; %StartTop%=^?{Star&t numbering at=_Top of document^=1|Cursor position^=}; %LeadZero%=^?{Add leading &zeros to small numbers=_Yes|No}; %AddChr%=^?{Add &character after number: period and/ or space shown=None^=|_ |. }; %StopInc%=^?{&Stop numbering at what line number (enter number if new doc)=_End of Document^=^$GetLineCount$|}; %SkipLine%=^?{Skip numbering of &blank lines=_Yes|No^=}

^!IfTrue ^$IsEmpty("^$GetText$")$ Next else Skip
^!Set %NewDoc%=1

^!Set %StrSize%=^$StrSize(^%StopInc%)$
^!StatusShow Ordering Line Numbers...
^!SetScreenUpdate Off

^!IfFalse ^$IsWordWrap$ Skip_2
^!ToolBar Toggle Word Wrap
^!Set %WrapOff%=1

^!IfTrue ^%StartTop% Next else Skip
^!Jump 1

:StartLoop
^!IfTrue ^%NewDoc% NewDoc
^!IfTrue ^%SkipLine% Next else Skip
^!IfTrue ^$IsEmpty("^$GetLine$")$ SkipLine
^!IfTrue ^%LeadZero% Next else Skip_2
^!InsertText ^$StrFill("0";^$Calc(^%StrSize%-^$StrSize("^%StartInc%")$)$)$^%StartInc%^%AddChr%
^!Goto Skip
^!InsertText ^%StartInc%^%AddChr%
^!Inc %StartInc%
^!Goto SkipLine
:NewDoc
^!IfTrue ^%LeadZero% Next else Skip_2
^!InsertText ^$StrFill("0";^$Calc(^%StrSize%-^$StrSize("^%StartInc%")$)$)$^%StartInc%^%AddChr%^p
^!Goto Skip
^!InsertText ^%StartInc%^%AddChr%^p
^!Inc %StartInc%

:SkipLine
^!Jump +1
^!IfTrue ^%NewDoc% Skip
^!If ^$GetLineCount$ = ^$GetRow$ Top
^!If ^%StartInc% = ^$Calc(^%StopInc%+1;0)$ Top else StartLoop

:Top
^!IfFalse ^%WrapOff% Skip
^!ToolBar Toggle Word Wrap
^!Jump 1

H="Lines number fast"
^!Set %Row%=1; %StartInc%=1; %StartTop%=1; %LeadZero%=Yes; %AddChr%=" "; %StopInc%=; %SkipLine%=Yes

^!IfTrue ^$IsEmpty("^$GetText$")$ Next else Skip
^!Set %NewDoc%=1

^!Set %StrSize%=^$StrSize(^%StopInc%)$
^!StatusShow Ordering Line Numbers...
^!SetScreenUpdate Off

^!IfFalse ^$IsWordWrap$ Skip_2
^!ToolBar Toggle Word Wrap
^!Set %WrapOff%=1

^!IfTrue ^%StartTop% Next else Skip
^!Jump 1

:StartLoop
^!IfTrue ^%NewDoc% NewDoc
^!IfTrue ^%SkipLine% Next else Skip
^!IfTrue ^$IsEmpty("^$GetLine$")$ SkipLine
^!IfTrue ^%LeadZero% Next else Skip_2
^!InsertText ^$StrFill("0";^$Calc(^%StrSize%-^$StrSize("^%StartInc%")$)$)$^%StartInc%^%AddChr%
^!Goto Skip
^!InsertText ^%StartInc%^%AddChr%
^!Inc %StartInc%
^!Goto SkipLine
:NewDoc
^!IfTrue ^%LeadZero% Next else Skip_2
^!InsertText ^$StrFill("0";^$Calc(^%StrSize%-^$StrSize("^%StartInc%")$)$)$^%StartInc%^%AddChr%^p
^!Goto Skip
^!InsertText ^%StartInc%^%AddChr%^p
^!Inc %StartInc%

:SkipLine
^!Jump +1
^!IfTrue ^%NewDoc% Skip
^!If ^$GetLineCount$ = ^$GetRow$ Top
^!If ^%StartInc% = ^$Calc(^%StopInc%+1;0)$ Top else StartLoop

:Top
^!IfFalse ^%WrapOff% Skip
^!ToolBar Toggle Word Wrap
^!Jump 1

H="Lines repetition out"
^!ClearVariables
^!Jump Doc_End
^!InsertText ^p^p
^!Jump 1
^!SetWizardLabel Dups, Trips, Quats removed ;)
^!Set %Prompt%=^?{Prompt before deleting?==Yes^=1|_No^=0}; %Save%=Lines deleted:^%nl%^%nl%

^!IfFalse ^$IsWordWrap$ Start
^!ToolBar Toggle Word Wrap
^!Set %WrapOn%=1

:Start
^!Select Eol
^!Set %Row%=^$GetRow$; %Data%=^$GetSelection$

:Find
^!Find "^%Data%" IS
^!IfError NextRow
^!If "^$GetLineSize$" > "^$GetSelSize$" Find
^!Append %Save%=^%Data%^%nl%
^!If "^$GetRow$" = "^$GetLineCount$" Wrap
^!IfTrue ^%Prompt% Skip_2
^!DeleteLine
^!Goto Find
^!Skip Delete this line?
^!Goto Find
^!DeleteLine
^!If "^$GetRow$" = "^$GetLineCount$" Next Else Find

:NextRow
^!If ^$GetRow$ = ^$GetLineCount$ Wrap
^!Inc %Row%
^!Jump ^%Row%
^!Goto Start

:Wrap
^!IfTrue ^%WrapOn% Next else Skip
^!ToolBar Toggle Word Wrap
^!Jump Doc_End

:Loop1
^!IfFalse ^$IsEmpty(^$GetLine$)$ Skip_2
^!Replace "^p" >> "" SB
^!Goto Loop1
^!InsertText ^p

:Info
^!SetWizardTitle Duplicates Removed
^!SetClipboard ^%Save%
^!Toolbar Paste New

:Loop2
^!IfFalse ^$IsEmpty(^$GetLine$)$ Skip_2
^!Replace "^p" >> "" SB
^!Goto Loop2
^!InsertText ^p

H="Lines repeat singled"
^!Jump Doc_End
^!Insert ^P
^!Replace "(?s)^([^\r\n]+\R)\K(.+\R)*\1" >> "$2" ARSW
^!IfError Next Else Skip_-1

H="Lines sort again"
^!Jump DOC_START
^!InsertText ^P^P
^!Keyboard ALT+M L S A
^!Menu Modify/Lines/Sort/Ascending
^!Jump DOC_END
^!Clip "Paras regularise"
^!Jump DOC_START
^!DeleteLine
^!DeleteLine

H="List to commas spaces"
^!Keyboard CTRL+A
^!Replace " " >> "" [HAS]
^!Replace "^P^P" >> "^P" [HAS]
^!Replace "^P" >> ", " [HAS]
^!Keyboard CTRL+HOME

H="Margin right position"
^!IfTrue ^$IsEmpty(^$GetSelection$)$ Info
^!Set %Amount%=^$GetSelection$; %Width%=^?{Right margin at what column?}; %Trim%=^?{Remove blank spaces at the end of lines?=_Yes^=True|No^=False}

^$StrSplit("^%Amount%";^%Width%;^%Trim%)$
^!Goto End
:Info
^!Info Select some text first! :-)

H="Para copy to foot"
^!Find ^P [BS]
^!Keyboard SHIFTDOWN CTRL+DOWN
^!Set %Textlot%=^$GetSelection$
^!Keyboard SHIFTUP
^!Jump Doc_End
^!InsertText ^p^%Textlot%^p

H="Para delete conditional"
^!ClearVariables

^!SetWizardLabel Delete line or paragraph if it...
^!Set %Action%=^?{==_Contains search criteria.^=1|Does not contain search criteria.^=0}; %Find%=^?{Search for=}; %And%=^?{And it also contains=|_Ignore^=1}; %Word%=^?{If==_Only if the criteria is found by itself.^=C|The criteria is found anywhere, even part of a word.^=T}; %Case%=^?{Ignore case==_Yes^=I|No^=}; %Select%=^?{Delete==_Line|Paragraph}

^!IfFalse ^$IsWordWrap$ Skip_2
^!ToolBar Toggle Word Wrap
^!Set %WrapOff%=1

^!Jump Doc_End
^!InsertText ^p^p
^!Jump 1
^!IfTrue ^%Action% Next else Loop2

:Loop1
^!Find "^%Find%" S^%Word%^%Case%
^!IfError Wrap
^!IfTrue ^%Action% Next else Loop1
^!Select ^%Select%
^!IfTrue ^%And% Skip_3
^!Find "^%And%" HS^%Word%^%Case%
^!IfError Loop1
^!Select ^%Select%
^!ToolBar Clear All
^!If "^$GetRow$" = "^$GetLineCount$" Wrap
^!Goto Loop1

:Loop2
^!If "^$GetRow$" = "^$GetLineCount$" Wrap
^!Select ^%Select%
^!Find "^%Find%" HS^%Word%^%Case%
^!IfError Next else Skip_2
^!Delete
^!Goto Loop2
^!Jump +1
^!Goto Loop2

:Wrap
^!IfFalse ^%WrapOff% Skip
^!ToolBar Toggle Word Wrap
^!Jump Doc_End

:EndBreak
^!IfTrue ^$GetRow$ End
^!If ^$IsEmpty(^$GetLine$)$ = 0 InsEnd
^!Replace "^p" >> "" SB
^!Goto EndBreak

:InsEnd
^!InsertText ^p
^!Jump 1

H="Paras asterisk all"
^!Keyboard CTRL+A
^!Keyboard CTRL+J
^!Keyboard CTRL+B
^!Keyboard CTRL+HOME

H="Paras counted"
^!Set %file%=^$GetDocName$
^!SetScreenUpdate Off
^!Toolbar Copy All
^!Toolbar New Document
^!Paste
^!Clip "Paras regularise"
^!SetScreenUpdate Off

^!Set %n%=0
^!StatusShow Counting

^!Jump 1
:Count
^!Find "^p^p" S
^!IfError Skip_3
^!If ^$GetRow$ = ^$GetLineCount$ Skip_2
^!Inc %n%
^!Goto Count

^!Jump 1
^!Close DISCARD
^!Open ^%file%
^!StatusClose
^!Info Paragraphs counted:^%nl%^%nl%^$Calc(^%n%)$^%nl%^%nl%

H="Paras double gaps"
^!Continue Cancel if not yet highlighted across some or all paragraph gaps, or press OK
^!Replace "^P" >> "^P^P" [HAS]
^!Keyboard CTRL+HOME

H="Paras middling spaces"
^!Replace "^P^P" >> "</p>^P^P<p>" [HAS]
^!Replace "</p></p>^P^P<p><p>" >> "</p>^P^P<p>" [HAS]

H="Paras number all"
^!Keyboard CTRL+A
^!Keyboard CTRL+J
^!Keyboard ALT+M L N
^!Keyboard CTRL+HOME

H="Paras regularise"
^!SetScreenUpdate Off

^!Replace "\t" >> " " RWAS
^!IfError Next Else Skip_-2

^!Replace "^P " >> "^P" WAS
^!IfError Next else Skip_-2

^!Replace " ^P" >> "^P" WAS
^!IfError Next else Skip_-2

^!Replace "  " >> " " WAS
^!IfError Next else Skip_-2

^!Replace "^P" >> "^P^P" WAS

^!Replace "^P^P^P" >> "^P^P" WAS
^!IfError Next else Skip_-2

^!SetScreenUpdate On

H="Paras sort"
; Last updated on 07-04-2004 by Jody Adair
^!Set %Case%=^?{&Case Sensitive=Yes^=True|_No^=False}; %Sort%=^?{&Sort order=_Ascending^=True|Descending^=False}; %Dups%=^?{&Remove duplicates=_Yes^=True|No^=False}; %SortOrig%=^?{Sort which &file=Edit original^=1|_Edit in new file^=0}
^!Delay 2
^!Set %n%=0

^!StatusShow Formatting
^!SetScreenUpdate Off

^!IfTrue ^%SortOrig% Skip_2 else Next
^!SetClipboard ^$GetText$
^!Toolbar Paste New

^!Replace "^p^p^p^" >> "^p^p" WAS
^!IfError Next else Skip_-1

^!Jump Doc_End
^!IfFalse ^$IsEmpty(^$GetLine$)$ Skip_2
^!Replace "^p" >> "" SB
^!Goto Skip_-2
^!InsertText ^p^p

^!Jump 1
^!IfFalse ^$IsEmpty(^$GetLine$)$ Skip_2
^!Replace "^p" >> "" S
^!Goto Skip_-2
^!InsertText ^p^p

:Count
^!Find "^p^p" S
^!IfError Skip_2
^!Inc %n%
^!Goto Count

^!SetClipboard ^$GetText$
^!Toolbar Clear All

^!SetClipboard ^$StrReplace("^p^p";"? ? ";"^$GetClipboard$";False;False)$
^!SetClipboard ^$StrReplace("^p";"?  ? ";"^$GetClipboard$";False;False)$
^!SetClipboard ^$StrReplace("? ? ";"^p? ? ";"^$GetClipboard$";False;False)$

^!StatusShow Sorting

^!SetClipboard ^$StrSort("^$GetClipboard$";^%Case%;^%Sort%;^%Dups%)$

^!SetClipboard ^$StrReplace("^p? ? ";"^p^p";"^$GetClipboard$";False;False)$
^!SetClipboard ^$StrReplace("? ? ";"";"^$GetClipboard$";False;False)$
^!SetClipboard ^$StrReplace("?  ? ";"^p";"^$GetClipboard$";False;False)$

^!Paste

^!Jump Doc_End
^!If ^$IsEmpty(^$GetLine$)$ = 0 Skip_2
^!Replace "^p" >> "" SB
^!Goto Skip_-2
^!InsertText ^p

^!Jump 1
^!If ^$IsEmpty(^$GetLine$)$ = 0 Skip_2
^!Replace "^p" >> "" S
^!Goto Skip_-2

^!Replace "^p^p^p" >> "^p^p" WAS
^!IfError Next else Skip_-1

^!Jump 1
^!IfTrue ^%SortOrig% Next else Skip_3
^!Save:As ^?{(T=S)Save As filename if new file created=^##}
^!IfCancel Skip_2
^!Goto Skip
^!Save:As ^?{(T=S)Save As filename if new file created=^$GetDocumentPath$Sorted.txt}
^!IfCancel Next

^!Info ^%n% paragraphs sorted^%nl%^%nl%

H="_Remind Me"
^!IfSame ^$GetDate(ddd)$ Sun Sunday
^!IfInRange ^$GetDate(mmddhhnn)$ 04141545..04141600 MeetBoss
^!IfInRange ^$GetDate(h)$ 12..13 LunchTime
^!GoTo End

:MeetBoss
^!IfTrue ^%p_MeetBossShown% End
^!Prompt Important! Time to meet the boss :-(^p^p(This message comes from the RemindMe Clip library)
^!Set %p_MeetBossShown%=True
^!GoTo End

:Sunday
^!IfTrue ^%p_SundayShown% End
^!Prompt It's Sunday! Don't forget to get some rest ;-)^p^p(This message comes from the RemindMe Clip library)
^!Set %p_SundayShown%=True
^!GoTo End

:LunchTime
^!IfTrue ^%p_LunchTimeShown% End
^!Prompt Your computer clock tells me it's time for lunch!^p^p(This message comes from the RemindMe Clip library)
^!Set %p_LunchTimeShown%=True
^!GoTo End

H="Remove all # to next,"
^!Replace "^[^\#]*?\K\#[^,]*?," >> "[GONE]" AHIRSW

H="Replace cudqL with stdq"
^!Replace "?" >> """ HAS
^!Jump doc_Start

H="Replace cudqR with stdq"
^!Replace "?" >> """ HAS
^!Jump doc_Start

H="Quote cudqL"
?

H="Quote cudqR"
?

H="Quote cusqL"
?

H="Quote cusqR"
?

H="Quotes cudqs"
?^&??
^!Keyboard HOME

H="Quotes cusqs"
?^&?
^!Keyboard HOME

H="Quotes stdqs"
"^&"
^!Keyboard HOME

H="Quotes stsqs"
'^&'
^!Keyboard HOME

H="Secret decrypt"
^!Keyboard CTRL+HOME
^$StrDecrypt("^$GetSelection$";"^?[key=Fred]")$

H="Secret encrypt"
^!Keyboard CTRL+HOME
^$StrEncrypt("^$GetSelection$";"^?[key=Fred]")$

H="Sentence deleting"
^!Jump line_Start

^!Set %Start%=^$GetRow$:^$GetCol$
^!Find (\.)|(\?)|(\!) IRS
^!IfError End
^!Jump Select_End
^!SelectTo ^%Start%
^!Keyboard SHIFTDOWN RIGHT
^!Keyboard SHIFTUP
^!Skip Delete Sentence?^%nl%^%nl%(CTRL+HOMELT and No to abort)^%nl%
^!Goto Skip
^!InsertText
^!Keyboard LEFT LEFT

:Loop
^!Find (\.)|(\?)|(\!) IRS
^!IfError End
^!Jump Select_End
^!Keyboard RIGHT
^!Set %Start%=^$GetRow$:^$GetCol$
^!Find (\.)|(\?)|(\!) IRS
^!Jump Select_End
^!SelectTo ^%Start%
^!Keyboard SHIFTDOWN Right
^!Keyboard SHIFTUP
^!Skip Delete Sentence?^%nl%^%nl%(CTRL+HOMELT and No to abort)^%nl%
^!Goto Skip
^!InsertText
^!Keyboard LEFT LEFT
^!Goto Loop

H="Sentence highlighting"
^!Info [L] Highlights successive sentences from paragraph start. After cancelling, highlighting remains for choice of operation.

^!Jump line_Start

^!Set %Start%=^$GetRow$:^$GetCol$
^!Find (\.)|(\?)|(\!) IRS
^!IfError End
^!Jump Select_End
^!SelectTo ^%Start%
^!Keyboard SHIFTDOWN RIGHT
^!Keyboard SHIFTUP
^!Continue Highlight next sentence

:Loop
^!Find (\.)|(\?)|(\!) IRS
^!IfError End
^!Jump Select_End
^!Keyboard RIGHT
^!Set %Start%=^$GetRow$:^$GetCol$
^!Find (\.)|(\?)|(\!) IRS
^!Jump Select_End
^!SelectTo ^%Start%
^!Keyboard SHIFTDOWN RIGHT
^!Keyboard SHIFTUP
^!Continue Highlight next sentence
^!Goto Loop

H="Signature standard"
Adrian Worsfold

http://www.pluralist.co.uk
http://pluralistspeaks.blogspot.com
adrian@pluralist.co.uk

H="Sorting numbers align"
^!SetHintInfo Working...
^!SetScreenUpdate Off
^!Set %dig%=2
^!Find "^\d{^%dig%}" WRS
^!IfError Skip_2
^!Inc %dig%
^!Goto Skip_-3
^!Dec %dig%
^!Set %q%=^$Calc(^%dig%-1)$
^!Replace "^" >> "^$StrFill(\x20;^%dig%)$" WARS
^!Replace "^\x20+?(.{^%q%}\d\b)" >> "$1" WARS
^!Select All
^$StrSort("^$GetSelection$";0;1;0)$

H="Sorting numbers zeros"
^!SetHintInfo Working...
^!SetScreenUpdate Off
^!Set %dig%=2
^!Find "^\d{^%dig%}" WRS
^!IfError Skip_2
^!Inc %dig%
^!Goto Skip_-3
^!Dec %dig%
^!Set %q%=^$Calc(^%dig%-1)$
^!Replace "^" >> "^$StrFill(\x30;^%dig%)$" WARS
^!Replace "^\x30+?(.{^%q%}\d\b)" >> "$1" WARS
^!Select All
^$StrSort("^$GetSelection$";0;1;0)$

H="Sorting numbers dashes"
^!SetHintInfo Working...
^!SetScreenUpdate Off
^!Set %dig%=2
^!Find "^\d{^%dig%}" WRS
^!IfError Skip_2
^!Inc %dig%
^!Goto Skip_-3
^!Dec %dig%
^!Set %q%=^$Calc(^%dig%-1)$
^!Replace "^" >> "^$StrFill(\x2D;^%dig%)$" WARS
^!Replace "^\x2D+?(.{^%q%}\d\b)" >> "$1" WARS
^!Select All
^$StrSort("^$GetSelection$";0;1;0)$

H="Sorting numbers full stops"
^!SetHintInfo Working...
^!SetScreenUpdate Off
^!Set %dig%=2
^!Find "^\d{^%dig%}" WRS
^!IfError Skip_2
^!Inc %dig%
^!Goto Skip_-3
^!Dec %dig%
^!Set %q%=^$Calc(^%dig%-1)$
^!Replace "^" >> "^$StrFill(\x2E;^%dig%)$" WARS
^!Replace "^\x2E+?(.{^%q%}\d\b)" >> "$1" WARS
^!Select All
^$StrSort("^$GetSelection$";0;1;0)$

H="Spaces reduce"
^!SetScreenUpdate Off
^!StatusShow Spaces reducing
:LOOP1
^!Keyboard CTRL+HOME
^!Replace "  " >> " " [WAS]
^!IFError END1
^!GoTo LOOP1
:END1

^!Keyboard CTRL+END

H="Spaces remove"
:LOOP
^!Replace " " >> "" [HAS]
^!IfError END
^!GoTo LOOP
:END

H="Statistics text"
^!Keyboard ALT+T S &400 M

H="Surname forward comma"
^!Continue Takes a list of names and puts the last one, the surname, first

^!StatusShow Clean up preparation
^!SetScreenUpdate Off

^!ClearVariables
^!SetWordWrap OFF

^!Keyboard CTRL+END
^!InsertText ^P

^!Keyboard CTRL+HOME
^!Replace "," >> "" [WAS]
^!Keyboard CTRL+HOME

:LOOP1
^!Replace "^P^P" >> "^P" [WAS]
^!IfError PROCEED1
^!GoTo LOOP1

:PROCEED1

^!Set %Count%=^$GetLineCount$
^!Set %Index%=1

^!StatusShow Changing the word order

:LOOP2
^!Inc %Index%
^!If ^%Index% > ^%Count% PROCEED2
^!Keyboard END LEFT LEFT
^!Select WORD
^!Set %Surname%=^$GetSelection$
^!Keyboard DELETE
^!Keyboard HOME
^!InsertText "^%Surname%, "
^!Keyboard DOWN
^!GoTo LOOP2

:PROCEED2

^!StatusShow Presentation

^!Keyboard CTRL+HOME

:LOOP3
^!Replace "  " >> " " [WAS]
^!IfError PROCEED3
^!GoTo LOOP3

:PROCEED3

^!Keyboard HOME

^!Replace ",^P" >> "^P" [WAS]

^!Keyboard CTRL+HOME

^!SetScreenUpdate On

H="Text clean"
^!Set %ReDo%=^$StrFixLines("^$GetText$")$
^!Toolbar Select All
^!InsertText ^%ReDo%

H="Tabs remove"
^!Replace "^P^T^T" >> "^P" CWSA
^!Replace "^P^T" >> "^P" CWSA
^!Replace "^T">> "" CWSA

H="Text repeat"
^!Set %repeat%=^?{How many times?};%statement%=^?{What?}

^!Set %cntr%=0
:loop
^!Inc %cntr%
^!If ^%cntr% > ^%repeat% end
^!InsertText ^%cntr%. ^%statement%^P
^!Goto loop

H="Text reverse"
; By Joe Barta jbarta@apk.net.

^!Set %style%=^?[Reverse style - The rain in Spain==Reverse word order - Spain in rain The^=1|_Reverse all - niapS ni niar ehT^=2]

^!StatusShow Reversing now
^!SetScreenUpdate OFF
^!SetWordWrap OFF

^!SetCursor 1:1
^!Replace "^P" >> "aax2@2xaa" ATIWS

^!Jump TEXT_END
^!InsertText ¿

^!Clip "zzz dependent 3-^%style%"

^!Clip "zzz dependent ^%style%"

^!Clip "zzz dependent 5"

H="Text reverse thorough"
^!ClearVariables
^!Set %Buffer%=*******

^!Jump Text_End
^!InsertText ^P^%Buffer%^P

^!Jump Text_Start
;^!SetDebug ON

:Starter
^!If ^$GetLine$=^%Buffer% Finisher else KeepGoing
:KeepGoing
^!IF ^$GetLine$=^%NL% Spacer else Next
:Spacer
^!Set %NewLine%=^P
^!Set %ending%=^$GetRow$:^$GetCol$
^!GoTo Paster

:Next
^!Set %LineSize%=^$GetLineSize$
^!Set %Counter%=0
^!Jump Line_End

:Rearrange
^!If ^%Counter%=^%LineSize% Paster Else Continue
:Continue
^!Inc %Counter%
^!Set %starting%=^$GetRow$:^$GetCol$
^!MoveCursor -1
^!Set %ending%=^$GetRow$:^$GetCol$
^!SetCursor ^%starting%
^!SelectTo ^%ending%
^!Set %NewChar%=^$GetSelection$
^!Set %NewLine%=^$StrInsert(^%NewChar%;^%NewLine%;^%Counter%)$

^!GoTo Rearrange

:Paster
^!Jump Text_End
^!InsertText ^%NewLine%^P
^!SetCursor ^%ending%
^!ClearVariable %NewChar%
^!ClearVariable %NewLine%
^!Set %Counter%=0
^!Jump +1
^!GoTo Starter

:Finisher
^!Replace ^%Buffer% >> ""
^!Keyboard CTRL+Shift+HOME
^!Keyboard DELETE
^!Sound SystemAsterisk

H="Two files compare"
;The Clip uses the DOS command "fc" to compare the differences between two disk files. If necessary, NoteTab saves a temporary copy of the current document before starting the comparison program
;Define the delimiter for the checkbox field
^!SetListDelimiter " "
;Prompt for file names and option settings used to control the comparisor
^!Set %File1%="^?{(T=O)Compare file=^**}"; %File2%="^?{(T=O)With file=^$GetPath("^**")$}"; %Options%=^?{(H=5;T=A)Switches=_Compares files as ASCII text^=/L|Ignore character case^=/C|Display only first+last lines^=/A|_Do not expand tabs to spaces^=/T|Display line numbers on an ASCII comparison^=/N}
;End the procedure if no file is specified
^!IfTrue ^$IsEmpty("^%File1%")$ End

;Set output file name in a variable
^!Set %OutputFile%=^$GetName("^%File1%")$.dif
;Convert long file names to DOS short names
^!Set %File1%=^$GetShort("^%File1%")$
^!Set %File2%=^$GetShort("^%File2%")$
;Copy the file path in a variable
^!Set %Path%=^$GetPath("^%File1%")$

;If both files being compared are in the same directory, remove the path part from the second file name
^!IfSame "^%Path%" "^$GetPath("^%File2%")$" Next ELSE Skip
^!Set %File2%=^$GetFileName("^%File2%")$

;Create and save the command line in a variable
^!Set %Command%=fc ^%Options% ^$GetFileName("^%File1%")$ ^%File2% >^%OutputFile%
;Show warning if command line exceeds the normal DOS length limit
^!If ^$StrSize("^%Command%")$ > 127 Warning ELSE Execute

:Warning
^!Info Warning: the DOS command line about to be executed is very long; it might not work. In case of failure, try to shorten the path/file names of the documents you want to compare.

:Execute
;Delete the output file if it already exists (created by earlier comparison)
^!DeleteFile ^%OutputFile%
;Set the default path
^!ChDir ^%Path%
;Execute the fc command with all parameters
^!CmdShow Minimize
^!DOS ^%Command%
;Wait until the command has finished executing
^!Wait
;Copy output name to variable
^!Set %OutputFile%=^%Path%^%OutputFile%
;Open the output file if it exists or show error message
^!IfFileExist ^%OutputFile% Next ELSE Error
^!Open ^%OutputFile%
^!Goto End

:Error
^!Info File comparison failed

H="Underline title"
^!Set %Underline%=^?{Underline character=_¯|=|-|~|^|¨|·}
^!Jump Line_End
^!InsertText ^P^$StrFill(^%Underline%;^$GetLineSize$)$

:MODIFY
^!Skip Take off a piece of underline?
^!GoTo END
^!SetScreenUpdate Off
^!Keyboard SHIFT+LEFT
^!Menu Edit/Delete
^!GoTo MODIFY

:END

H="Website completer"
^!Info Highlight with WWW URL and wait
^!Delay 30
^!KEYBOARD CTRL+C
^!KEYBOARD ENTER
http://
^!KEYBOARD CTRL+V
^!KEYBOARD SHIFT+HOME
^!KEYBOARD F9

H="Words all list unique"
^!ClearVariables
^!SetWizardTitle Extracting and listing
^!Set %Document%=^?{==_Use focussed document^=1|Browse for document^=}
^!IfTrue ^%Document% Skip
^!Open ^?{(T=O)Browse to or enter document to open}

^!IfFalse ^$IsHTMLDoc("^##")$ Start
^!Toolbar Strip HTML

:Start
^!SetHintInfo Working...
^!SetScreenUpdate Off

^!Set %AllText%=^$StrReplace("  ";" ";^$GetText$;1;1)$
^!Set %AllText%=^$StrReplace(" ";"^p";^%AllText%;1;1)$
^!Set %AllText%=^$StrReplace("^t";"";^%AllText%;1;1)$
^!Set %AllText%=^$StrLower("^$StrSort("^%AllText%";0;1;1)$")$

^!Set %nbr%=0
^!Set %Delete%=^%Delete0%

^!SetListDelimiter ?
^!SetArray %Delete%='ll? 're? 's? 't? 've? s'? -? !? "? #? $? (? )? *? ? .? /? //? :? ;? ?? <? >? @? [? ]? ^? _? {? |? }? ¯? +? 0? 1? 2? 3? 4? 5? 6? 7? 8? 9? '? com? net? org? ac? o? b? c? d? e? f? g? h? j? k? l? m? n? o? p? q? r? s? t? u? v? w? x? y? z

:Loop1
^!Inc %nbr%
^!Set %AllText%=^$StrReplace("^%Delete^%nbr%%";"^p";^%AllText%;0;1)$
^!If ^%nbr% = ^%Delete0% Skip_2
^!Goto Loop1

^!Toolbar New Document
^$StrSort("^%AllText%";0;1;1)$
^!Replace " " >> "" WAS
^!IfError Next else Skip_-1

^!Replace "^p^p" >> "^p" WAS
^!IfError Next else Skip_-1

^!Jump 1
^!Set %nbr%=0
^!Set %Divide%=^%Divide0%
^!SetListDelimiter ?
^!SetArray %Divide%=a? b? c? d? e? f? g? h? i? j? k? l? m? n? o? p? q? r? s? t? u? v? w? x? y? z

:Loop2
^!Replace "^p^%Divide^%nbr%%" >> "^p^p--- ^$StrCapitalize("^%Divide^%nbr%%")$ ---^p^%Divide^%nbr%%" STI
^!If ^%nbr% = ^%Divide0% Skip_2
^!Inc %nbr%
^!Goto Loop2

^!Find "--- A ---" WS
^!Jump Line_Start
^!Keyboard Shift+Ctrl+Home
^!InsertText ^%Empty%
^!Jump 1

^!Keyboard CTRL+HOME
^!Keyboard CTRL+SHIFT+K
^!Keyboard CTRL+Home

H="Words count and date"
; Created: 30/10/2005 2:58:51 PM
; Author: rpd
;
^!Jump DOC_END
^!Keyboard ENTER

^!Keyboard ALT+T S Y TAB TAB TAB CTRL+C ESC

^!InsertText Date: ^$GetDate("c")$
^!Keyboard ENTER

^!InsertText WordCount:
^!Paste

H="Words count begin"
; Created: 30/10/2005 3:01:17 PM
; Author: rpd

^!IfTrue ^$IsOutlineDoc$ NEXT ELSE COUNTDOC

^!Keyboard ALT+T S Y TAB TAB TAB CTRL+C ALT+C

^!GoTo SAVEWORDCOUNT

:COUNTDOC
^!Keyboard ALT+T S TAB TAB TAB CTRL+C ALT+C

:SAVEWORDCOUNT
^!Set %WordCount1%=^$GetClipboard$

^!SaveValue ClipValues:^$GetShort(^##)$SWC=^%WordCount1%

^!Info Starting word count is ^%WordCount1%

H="Words count tally"
; Created: 30/10/2005 3:02:08 PM
; Author: rpd

^!IfTrue ^$IsOutlineDoc$ NEXT ELSE COUNTDOC

^!Keyboard ALT+T S Y TAB TAB TAB CTRL+C ALT+C

^!GoTo TALLYWORDS

:COUNTDOC
^!Keyboard ALT+T S TAB TAB TAB CTRL+C ALT+C

:TALLYWORDS
^!Set %WordCount1%=^$GetValue("ClipValues:^$GetShort(^##)$SWC")$
^!IfError NOSTART

^!Set %WordCount2%=^$GetClipboard$
^!Set %Tally%=^$Calc(^%WordCount2%-^%WordCount1%)$

^!Info [L]Starting WordCount was ^%WordCount1%^p^pCurrent WordCount is ^%WordCount2%^p^pCreated ^%Tally% words!

^!Goto End

:NOSTART
^!Info [L]There was an error. Didn't save starting WordCount.^p^pRun the Start Counting Words clip

H="Words filter sort"
^!ClearVariables
^!Set %Filename%=^$GetDocName$
^!SetWizardTitle Removal of insignificant words
^!Set %Document%=^?{==_Use focussed document^=1|Browse for document^=}
^!IfTrue ^%Document% Skip
^!Open ^?{(T=O)Use browse button and enter}

^!IfFalse ^$IsHTMLDoc("^##")$ Start
^!Toolbar Strip HTML

:Start
^!StatusShow Gathering text
^!SetScreenUpdate Off

^!Set %AllText%=^$StrReplace("  ";" ";^$GetText$;1;1)$
^!Set %AllText%=^$StrReplace(" ";"^p";^%AllText%;1;1)$
^!Set %AllText%=^$StrReplace("^t";"";^%AllText%;1;1)$
^!Set %AllText%=^$StrReplace("—";" - ";^%AllText%;1;1)$
^!Set %AllText%=^$StrLower("^$StrSort("^%AllText%";0;1;1)$")$

^!Set %nbr%=0
^!Set %Delete%=^%Delete0%

^!StatusShow Bypassing many basic words

^!SetListDelimiter ?
^!SetArray %Delete%='ll? 're? 's? 't? 've? s'? -? –? —? '? !? "? #? $? (? )? *? ,? .? /? //? :? ;? ?? <? >? @? [? ]? ^? _? {? |? }? ¯? +? 0? 1? 2? 3? 4? 5? 6? 7? 8? 9? a? al? all? an? and? any? apr? are? as? at? aug? b? be? because? become? been? being? but? buts? by? c? can? came? cannot? co? com? d? dec? did? do? does? e? eight? either? er? etc? f? far? feb? five? for? four? from? g? get? go? h? had? have? he? her? his? how? i? if? ifs? in? is? it? its? itself? j? jan? jul? jun? k? l? like? m? mar? may? me? mine? my? n? net? nine? no? non? nor? not? nov? o? oct? of? off? on? one? or? org? out? p? pre? purely? q? quite? r? re? s? sep? seven? she? six? so? such? sure? t? ten? than? that? the? then? they? this? three? to? too? two? u? up? use? v? very? via? w? was? we? were? what? when? whence? where? whereas? will? with? which? while? whilst? who? whom? whose? why? www   ? x? y? yes? yet? you? your? yours? z? zip

:LOOP1
^!Inc %nbr%
^!Set %AllText%=^$StrReplace("^%Delete^%nbr%%";"^p";^%AllText%;0;1)$
^!If ^%nbr% = ^%Delete0% Skip_2
^!Goto LOOP1

^!StatusShow Distributing text in order

^!Toolbar New Document
^$StrSort("^%AllText%";0;1;1)$
^!Replace " " >> "" WAS
^!IfError Next else Skip_-1

^!Replace "^p^p" >> "^p" [WAS]
^!IfError Next else Skip_-1

^!Jump 1
^!Set %nbr%=0
^!Set %Divide%=^%Divide0%
^!SetListDelimiter ?
^!SetArray %Divide%=a? b? c? d? e? f? g? h? i? j? k? l? m? n? o? p? q? r? s? t? u? v? w? x? y? z

:LOOP2
^!Replace "^p^%Divide^%nbr%%" >> "^p^p--- ^$StrCapitalize("^%Divide^%nbr%%")$ ---^p^%Divide^%nbr%%" STI
^!If ^%nbr% = ^%Divide0% Skip_2
^!Inc %nbr%
 ^!Goto LOOP2

^!StatusShow Cleaning for presentation

^!Keyboard CTRL+HOME
^!Find --- A ---
^!Jump Line_Start
^!Keyboard SHIFT+CTRL+HOME
^!InsertText ^%Empty%
^!Jump 1

^!Keyboard CTRL+HOME
^!Keyboard CTRL+J
^!Keyboard CTRL+HOME
^!Replace "---" >> "^P^P" [WAS]
^!Keyboard CTRL+HOME

^!Replace "^P^PA^P^P" >> "A^P^P" [WAS]

^!Keyboard CTRL+HOME
^!InsertText Significant Words in:^P^%Filename%^P^P

:LOOPTIDY
^!Replace "^P^P^P" >> "^P^P" [WAS]
^!IfError FINAL
^!GoTo LOOPTIDY

:FINAL
^!StatusClose

H="Words muddle"
^!set letters=[a-zA-Z]
^!set letters3=^%letters%^%letters%^%letters%
:loop
^!find "^%letters3%+" rs
^!iferror end_loop
^!set baseWord=^$GetSelection$
^!set baseLen=^$StrSize(^%baseWord%)$
^!set firstChar=^$StrIndex(^%baseWord%;1)$
^!set lastChar=^$StrIndex(^%baseWord%;^%baseLen%)$
^!set newLen=^$Calc(^%baseLen%-2)$
^!set baseWord=^$StrCopy(^%baseWord%;2;^%newLen)$
;
^!set randSort=^%EMPTY%
;
:build_loop
^!if ^%baseWord%=^%EMPTY% end_build_loop
^!set randSort=^%randSort%<^$StrRandom(9;01)$>^$StrIndex(^%baseWord%;1)$^%NL%
^!set baseWord=^$StrCopy(^%baseWord%;2;100)$
^!goto build_loop
:end_build_loop
;
^!set sortedBlock=^$StrSort(^%randSort%;False;True;False)$
^!set randWord=^$StrStripHTML(^%sortedBlock%;False)$
^!set newWord=^%firstChar%^$StrReplace(" ";^%EMPTY%;^%randWord%;True;False)$^%lastChar%
^%newword%
^!jump select_end
^!goto loop
:end_loop

H="Words sort list"

^!SetScreenUpdate Off
^!Toolbar Copy All
^!Toolbar Paste New
^!Replace "  " >> " " WAS
^!IfError Next else Skip_-1
^!Replace "^p^p" >> "^p" WAS
^!IfError Next else Skip_-1
^!Replace " " >> "^p" WAS
^!Select All
^$StrSort("^$GetSelection$";1;1;1)$

H="zzz dependent 1"
; this route reverses just the word order - Spain in rain The

^!SetScreenUpdate OFF
^!SetCursor 1:1

^!Find "¿"  TIS
^!ToolBar Copy
^!ToolBar Paste

^!MoveCursor -1
^!Set %col1%=^$GetCol$
^!Find " " TIBS
^!Set %col2%=^$GetCol$
^!SetCursor 1:^%col1%
^!SelectTo 1:^%col2%
^!ToolBar Cut

^!IfSame "^$GetClipboard$" "¿" Exit

^!Jump TEXT_END
^!ToolBar Paste

^!Clip "zzz dependent 1"

:EXIT

H="zzz dependent 2"
; this route reverses all - niapS ni niar ehT

^!SetScreenUpdate OFF
^!SetCursor 1:1

^!Find "¿"  TIWS
^!ToolBar Copy
^!ToolBar Paste

^!MoveCursor -1
^!Select -1
^!ToolBar Cut

^!IfSame "^$GetClipboard$" "¿" Exit

^!Jump TEXT_END
^!ToolBar Paste

^!Clip "zzz dependent 2"

:EXIT

H="zzz dependent 3-1"

^!SetScreenUpdate OFF
^!SetCursor 1:1
^!InsertText  

H="zzz dependent 3-2"
^!SetScreenUpdate OFF
; Do nothing

H="zzz dependent 4-1"
; delete a space and a ¿ from the beginning of the file

^!SetScreenUpdate OFF
^!SetCursor 1:1
^!SelectTo 1:3
^!ToolBar Cut

H="zzz dependent 4-2"
^!SetScreenUpdate OFF
; Do nothing

H="zzz dependent 5"
^!SetScreenUpdate OFF
^!SetCursor 1:1
^!Replace aax2@2xaa ^P ATIWS

^!Clip "zzz dependent 4-^%style%"

^!SetWordWrap ON
^!Keyboard CTRL+HOME
^!Keyboard CTRL+J
^!Keyboard CTRL+HOME

^!Replace "¿" >> "" [WAS]
^!SetScreenUpdate ON
^!StatusShow Finished
^!Delay 10

H=";"

H=";Check Use of"

H=""Adrian""
^!Find Adrian I
^!FocusDoc

H=""Pluralist""
^!Find pluralist I
^!FocusDoc

H=";"

H=";Clipboard and without"

H="Clipboard paste"
^$GetClipboard$

H="Copy/ paste"
^!Continue If text is selected a copy operation follows otherwise pasting
^!FocusDoc
^!If ^$GetSelSize$ = 0 Next ELSE CopyText
^!IfTrue ^$IsEmpty("^%KeepText%")$ End
^!SetPasteIndent Off
^!InsertText ^%KeepText%
^!GoTo End
:CopyText
^!Set %KeepText%=^$GetSelection$
^!Jump Select_End

H="Cut/ paste"
^!Continue If text is selected a cut operation follows, otherwise pasting
^!FocusDoc
^!If ^$GetSelSize$ = 0 Next ELSE CutText
^!IfTrue ^$IsEmpty("^%KeepText%")$ End
^!SetPasteIndent Off
^!InsertText ^%KeepText%
^!GoTo End
:CutText
^!Set %KeepText%=^$GetSelection$
^!InsertText ^%EMPTY%

H="File name size"
^!Info [L]This is ^$GetFileName("^##")$ and is ^$Calc(^$GetFileSize("^##")$/1024)$kb.

H="File repeat content"
^!Set %FileName%=^?[New text document name=_Copied|New|Temporary].txt
^!Set %Directory%=^?{(T=D)Directory choice to SAVE DOCUMENT}
^!Set %Back%=^$GetDate(yyyymmddhhnn)$

^!AppendToFile "^%Directory%^%FileName% ^%Back%" ^$GetText$^%nl%^%nl%

^!Open ^%Directory%^%FileName% ^%Back%

H="Line duplicated"
;Duplicates the line at the cursor
^!FocusDoc
;Start by selecting the current line (or word-wrapped line)
^!Select Paragraph
;End the procedure if the line is empty
^!If ^$GetSelSize$ = 0 End
;Copy the selection into a variable
^!Set %ParaText%=^$GetSelection$
;Place cursor at end of selection and remove highlight
^!Jump Select_End
;Check if the paragraph ends with a line break; if not, add one to the front of copy in the variable
^!If ^$StrCopyRight("^%ParaText%";2)$ = ^%NL% Skip
^!Set %ParaText%=^%NL%^%ParaText%
;Insert copied line back into document
^!SetPasteIndent Off
^!InsertText ^%ParaText%

H=";"

H=";Finding and Replacing"
Search the document for the symbol-fraction and replace it with a text version. Replaces all within selected text or the entire document if no text is selected.

H="and from &"
^!Replace "&" >> "and" CWHSA

H="and to &"
^!Replace "and" >> "&" CWHSA

H="Edit compare"
;Get Name of current document
^!Set %oldfilename%=^$GetDocName$
;Extract path info
^!Set %path%=^$Getpath(^%oldfilename%)$
;extract filename without path info
^!Set %filename%=^$GetFileName(^%oldfilename%)$
;Text to insert in old file name
^!Set %copy%="Original Copy of "
;Build new file name
^!Set %newfilename%=^%path%
^!Append %newfilename%= ^%copy%
^!Append %newfilename%= ^%filename%
^!Save AS ^%newfilename%
;Make original copy read only
^!Keyboard Alt+D O
;Copy all text from file 1 in window 1
^!Toolbar Copy All
;Create file 2 and paste file 1 data to it
^!Toolbar Paste New
;Open second window with file 2 open in it
^!Keyboard Shift+Ctrl+W
;Move cursor to top of file
^!Keyboard Ctrl+Home
;Save the new document to the old document name
^!Save AS ^%oldfilename%
;Delete the "Original Copy of " old document disk file
^!DeleteFile ^%newfilename%

H="Find replace all"
^!Replace "^?[Find=Lose this]" >> "^?[Replace with=Gain this]" AS

H="Fraction ? to 1/4"
^!Replace "?" >> "1/4" CTWHSA

H="Fraction 1/4 to ?"
^!Replace "1/4" >> "?" CTWHSA

H="Fraction ½ to 1/2"
^!Replace "½" >> "1/2" CTWHSA

H="Fraction 1/2 to ½"
^!Replace "1/2" >> "½" CTWHSA

H="Fraction ? to 3/4"
^!Replace "?" >> "3/4" CTWHSA

H="Fraction 3/4 to ?"
^!Replace "3/4" >> "?" CTWHSA

H="Replace options"
^!SetScreenUpdate Off
^!Set %Start%=^$GetRowStart$:^$GetColStart$
^!SetCursor ^$GetRowEnd$:^$GetColEnd$
^!SelectTo ^%Start%
^!IfFalse ^$IsEmpty("^$GetSelection$")$ Skip_2
^!Set %Data%=^$GetWord$
^!Goto Skip
^!Set %Data%=^$GetSelection$
^!Set %Data%=^$StrReplace("^p";"^^P";"^%Data%";0;0)$
^!Set %Data%=^$StrReplace("^t";"^^T";"^%Data%";0;0)$
^!SetWizardLabel Find and replace with options
^!Set %Find%=^?{Find what=^%Data%}; %Replace%=^?{Replace with what=^%Data%}; %Options%=^?{(T=A;H=10)Search options=Partial words to whole^=T|Whole words only^=C|_Ignore character case^=I|Backwards^=B|Through all open documents^=G|_Through the whole document^=W|_All occurences^=A|Within selection only^=H|Regular expressions^=R|_No error messages^=S}

^!Replace "^%Find%" >> "^%Replace%" ^%Options%

H="Search again"
H="Search again"
^!Toolbar Search Again

H=";"

H="Bullet mark large"

H="Bullet mark small"
·

H="Copyright"
©

H="Degrees"
°

H="Division sign"
·

H="Rights reserved"
®

H="Spelling InCorrect"
 [Sic]

H="Superscript 1"
¹

H="Superscript 2"
²

H="Superscript 3"
³

H="Superscript a"
ª

H="Trade mark"
â„¢

H=";"

H=";Text storage"

H="Copy file My Writing"
^!CopyFile "^##" "C:\Users\Worsfold\My Writing\"
^!Open "^##"

H="My Writing dump"
^!AppendToFile "C:\Users\Worsfold\My Writing\^?[Enter filename and extension only=thissave.txt]" ^%nl%Appended on ^$GetDate(mmmm dd, yyyy)$ at ^$GetDate(hh:nn:ss)$^%nl%^%nl%^?[==Whole document^=^$GetText$|Selection only^=^$GetSelection$]

H="File other add to end"
^!AppendToFile "^?[(T=O)Name and path of file to append]" ^?[Text to append=Selection^=^$GetSelection$|_Whole document^=^$GetText$]

H="Select to desktop"
^!IfTrue ^$IsEmpty(^$GetSelection$)$ Info
^!TextToFile "C:\Windows\Desktop\^?{Enter filename and extension only=^$GetFileName(^# section.txt)$}" ^$GetSelection$
^!Goto End
:Info
^!Info Select some text

H="Text dump"
^!AppendToFile "C:\Users\Worsfold\My Writing\^?{Enter filename and extension only=^$GetFileName(^##)$}" ^$GetSelection$ ^%nl%Appended on ^$GetDate(mmmm dd, yyyy)$ at ^$GetDate(hh:nn:ss)$^%nl%^%nl%^?[==Whole document^=^$GetText$|Selection only^=^$GetSelection$]

H=";"

H=";Miscellaneous"

H="Address"
32 Chamberlain Close
Sutton-on-Hull
HULL
HU7 4UD

H="CSV spreadsheet"
^!StatusShow CSV File maker
^!Delay 10
^!StatusClose

^!ClearVariables
^!GoTo CHOICES
:START

^!Skip Add a row?
^!GoTo FINAL

^!InsertText ^P
^!IfTrue ^%Columns% = 0 CHOICES

^!GoTo STARTCOUNT

:CHOICES
^!Set %Columns%=^?{(T=C;H=5)These or numbers only: how many columns?==_Three^=3|Six^=6|Nine^=9}

:STARTCOUNT
^!Set %Count%=0

:LOOPINSIDE
^!Inc %Count%
^!If ^%Count% > ^%Columns% DONEFIRST
"^?{Column ^%Count%}",
^!GoTo LOOPINSIDE

:DONEFIRST
^!Keyboard LEFT DELETE
^!Goto Start

:FINAL
^!Set %FileName%=^?{Give the new document a MAIN name=_table|working}.csv; %Directory%=^?{(T=D)Directory choice to SAVE DOCUMENT}

^!Save AS ^%Directory%^%FileName%

H="Multiply"
^!Set %FirstValue%=^$GetSelection$
^!Set %SecondValue%=^$GetSelection$
^!Info Result: ^$Calc(^%FirstValue%*^%SecondValue%)$

H="Date bibliography order"
^!Info [L] Copy a URL first then press OK, if URL wanted
^!ClearVariables

^!Set %date1%=^$GetDate(dddd)$
^!Set %date2%=^$GetDate(mmmm)$
^!Set %date3%=^$GetDate(dd)$
^!Set %date4%=^$GetDate(yyyy)$
^!Set %hours%=^$GetDate(hh)$
^!Set %mins%=^$GetDate(nn)$
^!InsertText Author, Initials. (
^!InsertText ^%date4%
^!InsertText ), 'Title', Journal
^!InsertText ; ^%date2% ^%date4%

^!InsertText ; Volume, Number; pages, Publisher, [Online], Available World Wide Web, URL:
^$GetClipboard$
^!InsertText . [Accessed:
^!InsertText ^%date1% ^%date2% ^%date3% ^%date4%, ^%hours%:^%mins%
^!InsertText ].

H="Date given reorder"
^!Prompt [Date must be DD/MM/YYYY - Highlight or All!]
^!If ^$GetSelSize$ > 3 SKIP
^!Select ALL
^!Replace "\b(\d{2})/(\d{2})/(\d{4})\b" >> "$3$2$1" HRASTI

H="Dates list change sort"
^!If ^$GetSelSize$ > 3 SKIP
^!Select ALL
^!Replace "\b(\d{2})/(\d{2})/(\d{4})\b" >> "y:$3 m:$2 d:$1" HRASTI
^!Menu Modify/Lines/Sort/Ascending
^!Clip "Asterisks remove 3 all"
^!Jump DOC_START
^!DeleteLine
^!DeleteLine

H="Dates list restore"
^!If ^$GetSelSize$ > 3 SKIP
^!Select ALL
^!Replace "y:\b(\d{4}) m:(\d{2}) d:(\d{2})\b" >> "$3/$2/$1" HRASTI
^!Jump DOC_START

H="Date number order copy"
^!Set %Dateorder%=^$GetDate(yyyy)$^$GetDate(mm)$^$GetDate(dd)$
^!SetClipboard ^%Dateorder%
^!ClearVariable %Dateorder%

H="Date number order"
^$GetDate(yyyymmdd)$
^!InsertText ^P^P

H="Date number order yesterday "
 ^[yyyy-mm-^]^$StrCopyRight("0^$Calc(^[dd^]-1)$";2)$

H="Date yesterday"
^$StrCopyRight(0^$Calc(^[dd^]-1)$;2)$/^[mm^]/^[yyyy^]

H="Date slashes"
^$GetDate(dd)$/^$GetDate(mm)$/20^$GetDate(yy)$

H="Date time number order copy"
^!Set %Dateorder%=^$GetDate(yyyymmddhhnn)$
^!SetClipboard ^%Dateorder%
^!ClearVariable %Dateorder%

H="Date time number order"
^$GetDate(yyyymmddhhnn)$
^!InsertText ^P^P

H="Date today full"
^!Set %Intro%=^?{Enter text=Today's date is|This page created on|These events happened today on|Entry for|_Application on}
^!Set %date%=^$GetDate(dddd mmmm dd yyyy)$
^!InsertText ^%Intro% ^%date%^P^P

H="Date years to Roman "
;returns roman year in ^%temp% (clip call), ^%Result% (function)
^!SetListDelimiter |
^!SetArray %M%=|||||||||^%EMPTY%|M|MM|MMM
^!SetArray %C%=|||||||||^%EMPTY%|C|CC|CCC|CD|D|DC|DCC|DCCC|CM|
^!SetArray %X%=|||||||||^%EMPTY%|X|XX|XXX|XL|L|LX|LXX|LXXX|XC|
^!SetArray %I%=|||||||||^%EMPTY%|I|II|III|IV|V|VI|VII|VIII|IX|
^!Set %dec%=^$StrCopyRight("0000^&";4)$
^!IfInRange ^%dec% 1..3999 NEXT else MESSAGE
^!Set %mx%=1^$StrIndex(^%dec%;1)$; %cx%=1^$StrIndex(^%dec%;2)$; %xx%=1^$StrIndex(^%dec%;3)$; %ix%=1^$StrIndex(^%dec%;4)$
^!Set %temp%=^%M^%mx%%^%C^%cx%%^%X^%xx%%^%I^%ix%%
^!Inserttext ^%Result% ^%temp%
^!GoTo END
:MESSAGE
^!Info Not suitable - Highlight an ordinary year
:END

H="Date order changes"
;Date: Mon, 29 Nov 18:20:48 2004 -0500
;Date: Mon, 29 Nov 2004 18:20:48 -0500

^!Replace "^(Date: \w{3}, \d{2} \w{3}) (\d{2}:\d{2}:\d{2}) (\d{4}) (-\d{4})$" >> "$1 $3 $2 $4" WRASTI

H="Word help"
:START
^!Set %Word%=^$GetWord$
^!IfTrue ^$IsEmpty(^%Word%)$ ADVICE
^!Help "" ^%Word%
^!Goto End
:ADVICE
^!StatusShow Five seconds to put the cursor on a word
^!Delay 20
^!StatusClose
^!Delay 50
^!Goto START

H="Tile Vertically"
^!MinimizeApp
^!Shell wscript "D:\PROGRA~1\NoteTab\tilevert.js"

H="Tile Horizontally"
^!MinimizeApp
^!Shell wscript "D:\PROGRA~1\NoteTab\tilehoriz.js"

H="Word meaning"
^!ClearVariables
^!SaveValue WordWeb:Off=0
^!SetClipboard ^%Empty%
^!IfTrue ^$IsEmpty("^$GetSelection$")$ Next else Skip
^!Select Word
^!Set %Word%=^$GetSelection$
^!SetClipboard=^%Word%
^!Shell d:\progra~1\wordweb\wweb32.exe
^!Delay 10
:TRY
^!IfAppOpen "WordWeb*" Skip_2
^!Shell d:\progra~1\wordweb\wweb32.exe
^!Delay 5
^!FocusApp *WordWeb thesaurus/dictionary
^!Delay 5
^!KeyBoard Alt+K #^%Word%# &5 Enter Tab Spacebar
^!FocusDoc
^!Set %NewWord%=^$GetSelection$
^!IfTrue ^%NewWord%="^T" TRYAGAIN
^!GoTo END

:TRYAGAIN
^!Keyboard DELETE
^!GoTo Try

:END

H="Random chars 10*1"
^$StrRandom(10;0..9)$
^%NL%

H="Random chars 10*100"
^!SetHintInfo Working...
^!ClearVariables
^!Set %Counter%=100
:Loop
^!Set %Str%=^$StrRandom(10;A..F0..9)$
^!Append %List%=^%Str%^%NL%
^!Dec %Counter%
^!If ^%Counter% > 0 Loop
^%List%
^%NL%
^!ClearVariables

H="Random chars select"
^!Set %chars%=^?{Character length=001}; %counter%=^?{How many=10}; %layout%=^?{(T=L;H=2)Presentation:=New line^=^%NL%|Space^= }
^!SetHintInfo Working...
:Loop
^!Set %Str%=^$StrRandom(^%chars%;A..F0..9)$
^!Append %List%=^%Str%^%layout%
^!Dec %Counter%
^!If ^%Counter% > 0 Loop
^%List%
^!ClearVariables


H="Mystery word"
^!ClearVariables
^!IfFalse ^$GetSelSize$ Next Else Skip_2
^!Set %old%=^?{Enter a code}
^!GoTo Skip
^!Set %old%=^$GetSelection$
^!SetScreenUpdate Off

^!Toolbar New Document
^!InsertText ^%old%
^!Toolbar Select All
^!Clip "Spaces remove"

^!Toolbar Select All
^!Set %oldcode%=^$GetSelection$
^!Set %oldcode%=^$StrUpper(^%oldcode%)$
^!Clip "Words muddle"
^!Set %limit%=^$StrSize(^%oldcode%)$
^!Set %index%=0

^!Toolbar Select All
^!Keyboard Delete
^!InsertText The old word was ^%old%

:Loop
^!Inc %index%
^!If ^%index% > ^$StrSize(^%oldcode%)$ Out
^!Set %char%=^$StrCopy("^%oldcode%";^%index%;1)$
^!IfTrue ^$IsAlphaNumeric("^%char%")$ Skip_2
^!Set %newchar%=^%char%

^!GoTo Append

^!IfMatch "A|0" "^%char%" Next Else Skip_3
^!IfSame "^%char%" "A" ^!Set %newchar%=Z
^!IfSame "^%char%" "0" ^!Set %newchar%=9

^!GoTo Append

^!Set %chardec%=^$CharToDec(^%char%)$
^!Dec %chardec%
^!Set %newchar%=^$DecToChar(^%chardec%)$

:Append

^!Set %addit%=^$StrRandom(1;A..Za..z)$
^!Append %newcode%=^%newchar%^%addit%

^!GoTo Loop

:Out

^!Set %newercode%=^$StrCopyLeft("^%newcode%";^%limit%)$
^!Set %newercodestill%=^$StrTrim("^%newercode%")$
^!Set %brandnewcode%=^$StrCapitalize(^%newercodestill%)$
^!SetClipboard ^%brandnewcode%

^!InsertHTML ^P
^!InsertText The new word (copied) is ^%brandnewcode%
^!SetScreenUpdate On
^!ClearVariables

H="Code words (reversible)"
^!ClearVariables
^!IfFalse ^$GetSelSize$ Next Else Skip_2
^!Set %old%=^?{Enter a word or words}
^!GoTo Skip
^!Set %old%=^$GetSelection$
^!SetClipboard ^%old%
^!SetScreenUpdate Off

^!Toolbar New Document
^!InsertText ^%old%
^!Toolbar Select All
^!Clip "Text reverse thorough"

^!Toolbar Select All
^!Set %oldcode%=^$GetSelection$
^!Set %oldishcode%=^$StrUpper(^%oldcode%)$
^!Set %newcode%=^$StrROT13("^%oldishcode%")$
^!Set %newercode%=^$StrTrim("^%newcode%")$
^!Set %brandnewcode%=^$StrCapitalize(^%newercode%)$
^!SetClipboard ^%brandnewcode%

^!InsertText The new code (copied) is ^%brandnewcode%
^!SetScreenUpdate On
^!ClearVariables