User tools and extensions | Names and Oneliners |
Macro programmer tools and extensions | Names and Oneliners |
All tools and extensions | Sorted on Date with Full Descriptions |
Tools and Extensions
  Contents
  User tools and extensions - Names
Ansi2oem
BigInt
BigIntSum
BulkFind
Case
CaseFileName
ChFilTim
CmpBuffers
ColorPicker
ControlChars
CursorLine
CursorShape
DelDub3
DirList
DontOpen
EditFileList
EditWithTSE
eFind
eList
EolType
eVwFinds
FindaXlines
FndDubLn
fState
GenWordSet
Git
HelpCurrentWord
HelpRepair
Hidden
HiliteAll
HistCleaner
HistList
History
HistRepair
Hlp2txt
Huffman
IndentResize
IndentView
InsertTaglines
JsonValidator
JsonPP
KeepBlinking
Keys
Lengths
Life
LinuxMouse
LstOpen
LstRecent
Makro
MkSavDir
OEMtoggle
OnlyOneSplitLinesWarning
Palette
PickList
RanGen
ReplaceUncom
RmEmptyDirs
ScreenLocker
Settings
SortLineLen
SortOnRegExp
Status
SubtractFiles
SynCase
Tally
Text2html
UnCrash
Unibrowse
Unicode
Uniview
wsl_drive
Xmas
Zoom
  Macro programmer tools and extensions - Names
CaseExecMacro
CmpBuf
ColorPicker
Compatibility_downto_tse40
EventLogger
Execute
FastStrFind
GetTabSize
get_drive_type
KeyboardLogger
Log
TSEfilVrs
Zz_Log
  User tools and extensions - Oneliners
AbanName | Abandon loaded files with a search string in their names. |
Ansi2oem | Per ANSI character configure to show its OEM character instead. |
BigInt | Simple calculator for large integers up to 255 digits. |
BigIntSum | Total a marked block of possibly very large integers. |
BulkFind | Search for a list of terms in a list of open or disk files. |
Case | Allows keys for better "upper", "lower", "capitalize" and "flip" functions. |
CaseFileName | Change filenames' searched and opened case to their disk case. |
ChFilTim | Add/subtract time for all files in a directory. |
CmpBuffers | Compare two buffers' differences side by side. |
ControlChars | Makes control characters visible. |
CursorLine | A subtle alternative to TSE's crude cursor line coloring. |
CursorShape | Set cursor shapes in Linux. |
DelDub3 | Delete lines with same word in same column. |
DirList | Lists directories and/or files, both with their sizes. |
DontOpen | Undoes opening .bak, .svn, .git, etc. files. |
EditFileList | A "File Open" with a key to edit its result list. |
EditWithTSE | "Edit with TSE" option in Windows File Explorer's item menu. |
eFind | Search in files without TSE running out of memory. |
eList | Search current buffer with a "shrink as you type" list. |
EolType | Enhances TSE's end of line type handling for non-Windows files. |
eVwFinds | Lists found lines with context lines. |
FindaXlines | Finds strings that span across multiple lines. |
FndDubLn | Lists same lines from anywhere in the current buffer. |
fState | Go to last cursor position when opening file. |
GenWordSet | Generate TSE WordSet based on characters in current buffer. |
Git | Integrates some basic git functionality into TSE. |
HelpCurrentWord | Double tapping F1 gets TSE Help for current word. |
HelpRepair | Repairs or enhances the bullet character when viewing TSE's Help. |
Hidden | Lists all TSE buffers, safely open a copy of one. |
HiliteAll | After find, hilite all other matches too. |
HistCleaner | Deletes temporary/not-existing files from TSE's edit history. |
HistList | Type in a history list to reduce it to what you search for. |
History | History management. |
HistRepair | Repairs errors in history lists. |
Hlp2txt | Generates a readable help file from TSE's built-in Help system. |
Huffman | (De)compresses the current buffer in a new buffer. |
IndentResize | Changes a file's indentation. |
IndentView | Lists current buffer without N times indented lines. |
InsertTaglines | Adds an id filed line to other field lines. |
JsonValidator | Validate JSON syntax. |
JsonPP | "Pretty print" (format) a JSON file. |
KeepBlinking | In Windows keep the cursor blinking. |
Keys | Define actions for double/triple/quickly typed key combinations. |
Lengths | Display lengths of current line, string and word. |
Life | Conway's game of life. |
LstOpen | Lists all open files in an editable buffer. |
LstRecent | Lists all recent files in an editable buffer. |
Makro | Makes ("mak") file(s) in folder read-only ("ro"). |
MkSavDir | When saving makes TSE offer to create non-existing directories. |
OEMtoggle | Windows GUI TSE: Toggle OEM on/off. |
OnlyOneSplitLinesWarning | Avoid many warnings opening many files with split lines. |
Palette | Make/save color palettes across TSE sessions. |
PickList | Shrinks TSE picklists to lines containing typed string. |
RanGen | Generate a random string of letters and/or numbers. |
ReplaceUncom | As replace, but only replaces in not-commented text. |
RmEmptyDirs | Generates "rmdir" commands for empty directories. |
ScreenLocker | Password-lock access to Windows and show screensaver. |
Settings | Logs changes in TSE's settings. |
SortLineLen | Sorts lines on their length. |
SortOnRegExp | Sorts lines on a regular expression's matches or tags. |
Status | Show statusses on the right-hand side of the window. |
SubtractFiles | Delete one buffer's lines from another buffer. |
SynCase | Set macro language words to their correct case. |
Tally | Counts unique search results, also for regular expressions. |
Text2html | Converts a text to unsaved HTML including syntax highlighting. |
UnCrash | Makes intermidiate back-ups of files being edited. |
Unibrowse | File browser that can handle Unicode names and ADS's. |
Unicode | Edit files with Unicode content. |
Uniview | Show Unicode characters while editing. |
wsl_drive | Non-TSE: Start/stop a drive letter for a WSL instance. |
Xmas | Draws a Christmassy picture. |
Zoom | Zoom edit-window in/out/back using mouse buttons. |
  Macro programmer tools and extensions - Oneliners
CmdLineParameter | Lets macros receive parameters from the command line. |
CaseExecMacro | Makes ExecMacro() commands case-compliant with Linux. |
CmpBuf | Low-level functionality to compare two buffers. |
ColorPicker | Pick an RGB color by clicking in a palette. |
Compatibility_downto_tse40 | Helper-procs for backwards compatibility. |
EventLogger | Logs selected TSE events to a file and/or the screen. |
Execute | Interactively run a (line of) TSE command(s). |
FastStrFind | In specific cases fasster than TSE's StrFind() function. |
GetTabSize | Tool to determine a buffer's best tab size. |
get_drive_type | Gets drive type of drive or file. |
KeyboardLogger | Log all keystrokes as TSE sees them. |
Log | Helps to explicitly program a log file in a macro. |
TSEfilVrs | Lists internal editor version numbers of files. |
Zz_Log | Can implicitly log all proc begin/ends, and more. |
  All tools and extensions - Sorted on date of last change
When you save a file to a non-existing directory, then this extension makes TSE offer to create that directory.
v1.0.1 Has extra error-checks to make the extension more fool-proof.
TSE's color configuration menus refer to 1 fixed palette of 16 fixed foreground colors and 16 fixed background colors.
This extension allows you to make any number of named palettes of 16 foreground and 16 background colors, which each can be any of 16,777,216 RGB colors.
A selected palette is persistent across TSE sessions.
So, if you just want a different shade of red, or you want to match your TSE border and menu colors with your Windows theme colors, or you want to make your own TSE nature or party theme, or you want to create an old green, amber or black-and-white monitor theme, then this is the extension for you.
v1.1
If the ColorPicker tool is installed,
then the Palette extension now uses it as its internal color
picker.
Palette's submenu now uses the <Ctrl I> and <Ctrl E>
keys to differentiate between using its internal and external
color picker.
v1.1.2 Fixed incompatibility with TSE's '-i' command line option and the TSELOADDIR environment variable.
v1.1.3 Has extra error-checks to make the extension more fool-proof.
This macro protects you against (accidentally) opening unwanted files, like "*.bak" files, or like files in Subversion's "\.svn\" meta-directories, or whatever.
Especially when you use TSE's -a and -s options and wildcards you can and want to open whole direcories or directory trees of files, but without those pesky exceptions.
This macro notices it when you try to open such files, and asks your confirmation to NOT open them.
You get one question for each File Open command that results in opening such files, and your answer applies to all files opened by that specific File Open command.
You are asked the question only when the editor is otherwise idle, so that the macro doesn't interfere with other macros.
For the same reason the macro internally works by letting TSE open the files, and then closing the unwanted ones.
The macro works by matching the names of opened files against a TSE regular expression, and asks the user a question to confirm to not open the matching files.
You can configure your own regular expression and question by executing the macro. The default configuration is for .bak and Subversion metafiles.
v1.0.1 Has extra error-checks to make the extension more fool-proof.
This extension allows us to set separate cursor shapes for Insert mode and Overwrite mode.
BUT BUT BUT:
It does not work for all combinations of Linux brand
and command line interface and terminal.
For example, for me it only works
- in Debian within WSL, and
- directly acessing a Debian desktop machine,
- directly acessing a Debian server, or
- indirectly accesing anything through Putty.
You will have to test yourself for which, if any, Linux brand/CLI/terminal combination it works for you.
My hope is, that it will at least work on all WSL Linux installations and on all directly accessed modern Linux desktops.
v1.0.1 Added a proper warning if the configuration cannot be saved.
v1.0.2 Small technical improvement suggested by Sammy.
v1.0.3 Has extra error-checks to make the extension more fool-proof.
Linux TSE v4.41.35 upwards
This extension enables TSE to recognize and edit files for all major Unicode encodings: UTF-8, UTF-16, UTF-32, including their variants; big endian (BE) and little endian (LE), and with or without a byte order mark (BOM).
Installation: The Unicode extension requires the Status extension to be installed.
If you are a user of the EolType extension, then you need to upgrade it to EolType v7. The older EolType versions do not understand the newline characters in the UTF-16 and UTF-32 files we can now edit.
Key features:
-
For Unicode characters that have an ANSI equivalent the ANSI
character is shown.
Typically this already covers the most frequently used Unicode
characters that are not ASCII characters:
€ ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ Ž ‘ ’ “ ” • – — ˜ ™ š › œ ž Ÿ ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ
- Other Unicode characters are shown as quoted hexadecimal Unicode codepoints, using the DELETE character (shown as a square-like character) as quotes.
-
You do not have to remember these hexadecimal codes:
- The character's Unicode description is shown as a status.
- You can insert any character into your text by typing part of its Unicode name or description in a shrink-as-you-type list of characters.
- A file's character encoding (ASCII, ANSI, UTF-8/16/32[BE/LE][+BOM]) is shown as a status.
- You can explicitly change a file's character encoding by right-clicking or pressing [Shift] F10 on the status. Note that this allows you to convert any ASCII, ANSI or Unicode character encoding to any (other) Unicode character encoding.
- ASCII and ANSI files are semi-automatically upgraded to another character encoding when you type a non-ASCII or non-ANSI character.
Key lacking features:
-
It does not display non-ANSI characters graphically.
For that you can install the Uniview extension.
ANSI only covers the alphabets of languages like Danish, Dutch, English, Finnish, French, German, Hungarian, Icelandic, Indonesian, Italian, Norwegian, Portuguese, Spanish, and Swedish. -
It does not support Unicode when browsing the file system.
For that you can install the Unibrowse tool.
Unicode info
The Unicode Consortium has a fun 6 minute
intro video.
Tom Scott has an interesing technical 9½ minute
intro video
about UTF-8 specifically.
The
Unicode Consortium
is Unicode's source of truth.
Scroll all the way down their page for useful technical links.
Wikipedia has helpful articles on
Unicode
in general, as well as on the specifics of
UTF-8
,
UTF-16
and
UTF-32
.
v2.5 New copy, cut and paste functions, that support ASCII, ANSI, and Unicode-encoded text to and from the Windows clipboard.
v2.8
- Updated the data files to Unicode 16, which now supports 154,998 characters, and was released by the Unicode Consortium on 10 Sep 2024.
- Partial fix to make interacting macros less case-sensitive to each other's names.
v2.8.1 Has extra error-checks to make the extension more fool-proof.
Linux TSE Beta v4.41.35 upwards
This TSE extension enhances TSE by displaying the lengths of the current line, string and word on the right hand side of the screen.
Which of these lengths you want to see can be configured.
The Lengths macro requires the Status macro to be installed.
v1.1 Added Linux compatibility. Added direct access to the status colour in the configuration menu.
v1.1.1 Fixed incompatibility with TSE's '-i' command line option and the TSELOADDIR environment variable.
v1.1.2 Partial fix to make interacting macros less case-sensitive to each other's names.
v1.1.3 Has extra error-checks to make the extension more fool-proof.
This is a TSE extension that enhances TSE's end of line type handling when editing non-Windows files with TSE.
The EolType macro requires the Status macro to be installed.
TSE itself already does a reasonable job of handling end of lines for those non-Windows files that:
- AND exist on disc,
- AND are not empty,
- AND have a correct end of line type.
This macro fills the gaps:
- It also lets you CREATE non-Windows files,
- it adds the correct end of line type to files that were empty,
- it can be configured to repair files with the wrong end of line type,
- it lets you change a file's end of line type.
You might edit non-Windows files for instance:
- on a network drive that is mapped to a Unix, Linux or Mac machine.
- by using a remote-machine-browsing-tool like WinSCP or Total Commander, which you have configured to use TSE as its editor.
- when editing a file you downloaded from the internet.
v7 Added understanding the newline characters in UTF-16 and UTF-32 files.
v7.1 Added support for Linux TSE Beta v4.41.34 upwards.
v7.1.1 Fixed incompatibility with TSE's '-i' command line option and the TSELOADDIR environment variable.
v7.1.2 Partial fix to make interacting macros less case-sensitive to each other's names.
v7.1.3 Has extra error-checks to make the extension more fool-proof.
This extension keeps the cursor blinking.
Without this extension, if you do not type for some seconds, then the cursor stops blinking.
This problem is not TSE-specific. It was introduced many years ago by a then new Windows version, and affected Windows applications unless they started compensating for it. For example, Notepad was not adapted and still has the stops-blinking problem.
v1.0.1 Fixed: KeepBlinking did not work when comparing files.
v1.1
Makes KeepBlinking compatible with and runnable from
the Potpourri menu.
v1.1 was included in TSE v4.50rc29.
v1.1.1 Has extra error-checks to make the extension more fool-proof.
Linux TSE v4.50 rc 17 upwards with an RGB-compatible Linux terminal or command line.
CursorLine comes with a demo video [4:10].
This extension provides three options for TSE's cursor line:
- Same as other lines.
- Use TSE's cursor line colors.
- Dim or brighten the cursor line's foreground and background colors by a configurable percentage.
A cool new feature is that these options retain each other's settings.
I nerded out on making the configuration menu user-friendlier than TSE's standard menus allow:
- It has a close button.
- Submenus extend down as part of the main menu.
- Two menu options split their label and value over two lines.
-
Two menu options let a user decrease and increase their value with:
- Pressing the left and right cursor keys.
- Clicking their left and right arrow buttons.
v1.3
The extension is now Linux-compatible IF your Linux terminal or
command line supports RGB colors.
A nice, safe and pretty way to test the latter is with the
Test_RGB_color_support
tool.
v1.3.1 Has extra error-checks to make the extension more fool-proof.
Using this extension, you can select for each character of an ANSI font, whether TSE in the editing text should show an OEM character instead.
v3.0.1 Has extra error-checks to make the extension more fool-proof.
"Advanced Linux distributions", like WSL2 and typically non-server distributions, and "advanced Terminals", like Putty.
Tested with WSL v2, with Putty, and with Debian and Ubuntu desktop distributions.
This extension aims to support mouse clicking and scrolling in Linux TSE.
It has 3 major flaws:
-
It only works in sufficiently advanced Linux distributions and
terminals.
You will simply have to test for yourself whether it works in your Linux distribution and terminal(s).
If it does not work, using the mouse typically invokes TSE's Help, or ignores a few keystrokes, or inserts some random characters into the text. -
It disables TSE's <F1> key and other function keys. 😟
You yourself will have to define an alternate key for TSE's Help or use the menu instead. - It disables the terminal's right-mouse-click capability to paste the Windows clipboard into a Linux terminal. 😢
It also has some minor flaws.
v0.5 This is an administrative release. On the one hand the extension has at least one user despite its flaws and deficiencies. On the other hand currently no further development is planned, because I do not know how to fix any of the major flaws. To reflect these facts v0.5 is released as a flawed non-beta version.
This tool offers you many ways to select two buffers.
It then compares them and lets you browse their differences efficiently.
The tool has three help screens.
The browser has keys for the most used configuration options, and has a configuration menu for all of them.
Configuration options are effective immediately and can be saved for future usages of the tool.
v1.1 interactively (!) lets you configure its browser keys.
CmpBuffers' main advantages over CmpFiles:
- It lets you configure its browser keys.
- It never aborts on a "resync" error.
- It has more ways to select the two buffers, incuding one that lets you instantly compare a changed buffer to its disk file.
- It lets you save its configuration settings, of which it has many more than CmpFiles.
- It not just marks the currently selected difference, but also hilites other differences that happen to be on the screen.
- You can navigate differences in both directions.
- Navigating differences pauses at two places: At the first lines of each difference and at the last lines.
- It also treats empty lines as whitespace when using the Filter Whitespace configuration option.
- It compares the whole buffers instead of just chunks of it, resulting in more consistently recognized differences.
- It lets the user decide when to stop a too long running comparison. In practice those are rare.
- A prematurely stopped comparison stops gracefully: it shows compared lines correctly and shows not-yet-compared lines as one big difference.
CmpBuffers' main disadvantages over CmpFiles:
- It does not let you replace a difference in one buffer by its counterpart from the other buffer.
- It does not let you zoom text.
- Its comparison algorithm is slower.
Linux TSE v4.41.35 upwards
There is no download, because HiliteAll v1.1.2 has been included in TSE.
When a Find or Replace command is started with its own key and hilites its found match, then all other matches currently on the screen are hilited too.
Linux TSE Pro v4.41.43 upwards
This extension integrates some basic git functionality into TSE.
It requires that git is pre-installed on the computer and that the Status macro is pre-installed in TSE.
If the current file is in a git directory, then the its git status is shown on the right-hand side of the screen.
In Windows right-clicking the status (or in any OS executing the Git macro) pops up a menu, from which you can do explicit commits and list and open old versions of the current file.
You can configure the extension to automatically do a "git add" or "git add+commit" after each file save.
v1.4
New: Open an old version of the current file by selecting it from
a commit list.
v1.4.5
Partial fix to make interacting macros
less case-sensitive to each other's names.
Linux TSE Beta v4.41.35 upwards
This TSE extension enhances TSE by enabling other macros to display extra statuses on the right hand side of the screen, and by enabling them to handle typing and clicking on such a displayed status.
The colour for these statuses, which defaults to the menu colour, can be configured.
The "other macros" should explicitly inform you, that for them to work they require you to install the Status macro first.
v1.2 Added Linux compatibility and some minor improvements, bug fixes and tweaks.
v1.2.1 Fixed incompatibility with TSE's "-i" command line option and the TSELOADDIR environment variable.
v1.2.2 Partial fix to make interacting macros less case-sensitive to each other's names.
This extension is in BETA: Please give feedback on bugs, deficiencies & wishes.
The extension validates JSON syntax for a JSON buffer.
The syntax checking code was written by David Goodenough, as published on 27 Aug 2024 as json.s v2 in the public mailing list.
Validation happens:
- When executed with parameter "validate".
- When selected from its menu.
- When a .json file is saved.
- As you edit a .json buffer.
The first three options go to the error location.
The last one does not, because you need to be able to edit
elsewhere.
An error cursor is shown at the error location.
v0.2:
- Simplified the documentation.
- Fixed the color picker's header not being shown.
-
Created 7 configuration options for saving a .json file that has errors,
including options for NOT saving such a file.
Therefore some options allow using TSE's own "File Save" key, for example <Ctrl S>, to validate a .json file without saving it if it has errors.
This tool is in BETA: Please give feedback on bugs, deficiencies & wishes.
The tool "pretty prints" a JSON block or buffer into a new buffer.
Be careful: I wrote this tool 14 years ago for personal use. I did not significantly rewrite it for this publication. In initial tests it does seem to work.
v0.1.1 Documented the known error, that the formatting might go wrong if both AND the file size is near or larger than 32KB AND if TSE uses the Unicode macro. Currently there is no reported case of this happening. I want to fix this, but that will not have high priority until a user requests it or I run into such a large .json file.
This macro's intended users are macro programmers.
I advise non-macro programmers to simply compile and run the included CmpBuf_test.s file, which will generate two input buffers and an output buffer, which will show why CmpBuf is not suitable for end-users.
Planned future end-user macros that will use CmpBuf are CmpBuffers and FindChange
CmpBuf's intended use is for the content of its CmpBuf.inc file to be copied into another macro.
Given two input buffer ids and an output buffer id, CmpBuf sequentially compares the input buffers, and in the output buffer reports the line numbers of the blocks of lines that are equal and different.
It supports options like ignore case, filter spaces, the number of consecutive lines to be equal, when to start showing progress, and a time limit.
CmpBuf's unique selling points (compared to CmpFiles) are:
- It compares the whole buffers. Its result is therefore not dependent on cursor positions.
- It does not stop until it has found all commonalities and differences. It has no "resync" error.
- It starts reporting its progress after running an optional amount of seconds.
- A user or an optional time limit can interrupt a running comparison.
- When interrupted it still provides valid output, reporting the remaining lines as different.
v0.1:
- Optimized the "phase 2" code for brevity.
- Improved the documentation.
- Changed the macro's status from "development" to "beta".
To do:
- More testing for correctness!
Linux TSE v4.41.44 upwards
This TSE extension logs selected TSE events to a file and/or to the screen.
This helps macro programmers understand how TSE's hooks work.
File logging is technically the best way, because it works fast and gives detailed timing information. You need to afterwards match your actions with the log entries.
Visual logging to the title bar or the message line can be more problematical, because it can interfere with and be interfered by the editor. It can be really helpful though to see events as they happen in the context they happen in. It slows the editor a lot, because it pauses for you to read the logging.
v1.2 EventLogger no longer adds/deletes itself to/from the Macro AutoLoad List (based on whether any events are selected or not), because this turned out to be impractical and user-unfriendly.
v1.2.1 Fixed the menu helpline not immediately updating after changing the log directory.
zz_log implements old-school debugging.
If a target macro source file is current, then this tool includes a reference to the zz_log.inc file, adds zz_log_open() and zz_log_close() statements once, and adds zz_log_write() lines to the start and end of each procecedure.
You can also add your own zz_log_write() lines.
Afterwards all zz_log lines are easily removed with TSE's Find&Do menu.
v1.1
Adds the hundredths of seconds to timestamps.
In practice this helped me to more precisely see which logs happened together.
In theory this could help to detect slow pieces of code.
There is no download, because EditWithTSE v2 has been included in TSE v4.50rc24.
This tool adds or removes an "Edit with TSE" menu option with a TSE icon to/from Windows File Explorer's item menu.
The tool does not need to be started in Administrator mode.
It will elevate itself to Administrator mode when it modifies the Windows registry.
Note there are now 3 different tools out there:
- "EdWihTSE" is the first version I published a long time ago, which can still be found at Semware's old website.
- "EdWithTSE" from Eliyahu Trigoub added a TSE icon to the menu option.
- "EditWithTSE" adds that the tool can be started without Administrator mode.
Strictly speaking this is not a TSE tool, but Linux TSE testers often install and use WSL2.
If you manually connect a drive letter to a WSL distro, then it loses connection after a short moment.
This script connects a drive letter to a WSL v2 distro, and then keeps running to keep the connection alive.
Running the script again closes the connection and stops both scripts.
Typical use:
Run the script minimized from a Windows desktop shortcut
with a free drive letter and the name of an installed WSL v2 distro
as parameters.
You can have multiple shortcuts for multiple drives and WSL distros, and run them concurrently.
Example shortcut commands:
wsl_drive W Debian
wsl_drive U Ubuntu
wsl_drive V Ubuntu-22.04
Default use:
Do not supply parameters.
The two default settings at the top of the script will be used.
Example macro code:
set wsl_drive=W
set wsl_distro=Debian
or
set wsl_drive=U
set wsl_distro=Ubuntu
or
set wsl_drive=V
set wsl_distro=Ubuntu-22.04
For Windows GUI TSE this extension allows you to toggle OEM on/off.
This setting will work on fonts that default to ANSI but also support OEM.
The setting is remembered across TSE sessions and fonts.
If OEM is set ON for a font that does not support OEM, then Windows automatically selects another font that does, and the extension will report the change showing the old and new font names.
Do not use OEMtoggle!
One of the strengths of Linux TSE and Windows GUI TSE is, that they support ANSI,
which is a character set that is compatible with at least 14 languages:
Danish,
Dutch,
English,
Finnish,
French,
German,
Hungarian,
Icelandic,
Indonesian,
Italian,
Norwegian,
Portuguese,
Spanish,
and Swedish.
Another advantage of ANSI is,
that you can use the Unicode extensions on this page.
If you set the character set to OEM,
this actually refers to a group of character sets,
almost none of which are ANSI compatible.
Within OEM, Windows selects a specfic character subset
based on its "code page" setting.
OEM/code page-based character sets are typically language-specific.
This means that texts are typically only perfectly exchangeable
between people who use one and the same language.
OEM character sets have their use in still being able to read
and maintain text in or from old environments.
Some people enjoy OEM's line drawing capability,
even though they cannot share it with ANSI users,
and even though it might be only partially compatible
with the OEM code page of of another language than theirs.
This extension was created for one specific user,
who was well aware of its advantages and disadvantages.
There is no download, because BigIntSum v1.2.2 has been included in TSE v4.50rc19.
Given a marked column block of integers of at most 255 digits, this tool will add a line below the block with the sum of all the integers.
The block width must be at most 255 characters, consisting of decimal digits, optional leading and trailing spaces and signs (plus and minus), and optional single group separators between digits. Valid group separators: comma, period, space, apostrophe, underscore.
Only for the sum inserted in the text:
If group separators are consistently used for all numbers in the block, then
the sum is formatted the same under the column followed by the unformatted
number, otherwise only the unformatted sum is inserted.
v1.2.2 does addition in about ⅔ of its previous version's time.
This tool can be used as a simple calculator for signed integers of up to 255 characters.
It supports addition, subtraction, multiplication, division, and comparison.
It also contains a separate file for macro programmers, the content of which can be copied as a whole into their own macros to do calculations on big integers.
v1.3.1 Improved the speed of addition, now taking about ⅔ of its previous version's time.
This tool creates a list of directories and/or files.
Directories are listed with their sizes!
As one example of its use: By sorting a directories-only list on size, I discovered an 80 GB directory that should have been deleted ages ago.
v3.2 25 Jan 2024
- Added a sound and a final statistics pop-up when ready.
- Added the current date/time to the generated buffer's name.
v4 28 Jan 2024
- The tool was rewritten to fix the recursion bug for too many subdirectories.
- This does not fix too long paths and names: That is a different problem.
- Listing directories was added to DirList, making the DirSize tool obsolete.
- You can still list directories or files separately by using parameter -d or -f.
- Object type is now a column: "d" or "f" for a directory or file.
- Accessibility is now a column: "1" or "0" for accessible or not accessible by TSE.
This tool tries to lock access to Windows until a password is re-entered.
It has a screensaver!
v1.1
- New: When ScreenLocker is loaded from the command line or a Windows shortcut, for example with "g32 -eScreenLocker", then it unloads all other extensions, and abandons the editor after the user unlocks or there was a "burglary" attempt.
- Fixed: Another extension (HistCleaner) accessing a network drive, which can happen up to minutes after starting TSE, made the editor lose focus, which ScreenLocker interprets as a burglary attempt. Now ScreenLocker temporarily unloads HistCleaner.
This tool executes TSE's standard EditFile() command, and then enhances its list with the <Alt E> key to edit its path\filenames in a new buffer.
No, other file properties were intentionally not copied to the edit buffer.
Yes, this also works for lists generated with the "-s" parameter.
Yes, this has everything to do with the fact that the "-s" option no longer crashes Windows TSE as of Windows TSE v4.50 rc 13.
This tool changes a file's indentation primarily by changing its tab size.
This macro refuses to work for a file with tab characters. If a file has tab characters, then first use another tool or method to get rid of them.
Some indentation theory I made up:
Indentation can be tab-size-based or alignment-based.
In natural text tab-size-based indentation is typically used for
lists of points or to make a block of text stand out as a block.
In programming tab-size-based indentation is typically used to
visually group a sequence of statements as the subject of a
condition or iteration by indenting lines one single extra
tab-size unit.
Alignment-based indentation however can have any size, including
not conforming to any multiple of the current tab-size.
Alignment-based indentation is generally used to align the first
character of a line with a character on a previous line to
visually indicate a semantic similarity between the content at
those two positions.
A rule of alignment-based indentation is, that between the
alignment-indented line and the line of the content it aligns with
there can be no lines with a lesser indentation.
Based on this theory this tool (and we) can reasonably recognize
these two types of indentation and differentiate between them.
However, if a text uses tab characters instead of space
characters, then we would at the same time have to recognize
both alignment types and the tab size.
That would be non-trivial.
Luckily the days that computer memory was so expensive that the
tab character's disadvantages were acceptable have passed.
Modern plain text editors default to inserting the appropriate
amount of space characters when we use the tab key.
Therefore this tool does not cater to tab characters and their users.
v2.2 Made the tool Linux-compatible.
This zip contains an include file for the function get_drive_type() and a test macro to test both and to demo its possible use.
get_drive_type() accepts a fully qualified directory or file and returns the type of its root (drive).
In Windows this also works for shares that start with "\\".
In Windows get_drive_type() returns a named number that reflects what Windows thinks that the root(drive)'s type is.
In Linux it pretends to work by always returning DRIVE_FIXED.
Possible types are
- DRIVE_UNKNOWN
- DRIVE_NO_ROOT_DIR
- DRIVE_REMOVABLE
- DRIVE_FIXED
- DRIVE_REMOTE
- DRIVE_CDROM
- DRIVE_RAMDISK
The Windows GetDriveType() function requires a bare root (drive) as input, without a path or file, which in turn requires its caller to determine a directory's or file's root.
The here provided macro procedure get_drive_type() also accepts a fully qualified path to a file or directory, including shares, absolving its caller from the problem to figure out its required root.
get_drive_type() is optimized for speed by caching its determined root(drive)s and their types.
This extension deletes no longer existing files from TSE's edit history.
TSE's _EDIT_HISTORY_ is used by the TSE functions EditFile(), EditThisFile(), InsertFile(), SaveBlock(), and SaveAs().
The extension is designed to be autoloaded, but can also be loaded or executed at will.
v2 (main changes only)
Added a configuration option which defaults to always showing a
list of the found deletable edit history entries.
The list can then be accepted, edited or rejected.
Added a configuration option which defaults to not deleting
unqualified files.
Added a configuration option which defaults to not deleting
files on disconnected drives and shares.
Mitigated making TSE shortly freeze when checking the edit
history entry of a file on a network drive or share.
with an ANSI-compatible font (like Courier New).
TSE itself only supports 256 characters, 218 of which are displayable ANSI characters.
Unicode 15.1 (12 Sep 2023) supports 149,813 characters.
The Uniview extension lets TSE display a text's Unicode characters.
Exception:
Uniview does not work for the current line.
I do plan to add that some day, perhaps as an option,
but this has a low priority,
because the current situation has a security benefit,
the current line requires a lot of extra work,
and nobody asked for it.
Installation note:
The Uniview extension requires the
Unicode extension,
which requires the Status
extension.
Courier New
Despite the fact that the Courier New font itself supports only
about 2700 characters, you can configure TSE to make Windows
augment that to almost all Unicode characters, and displayed in a
high quality at that! See Uniview's documentation.
Unifont
I do not recommend the Unifont font, but it is a logical
alternative to want to try for users who decide to try other
fonts.
I did, and I found no better alternatives to Courier New.
I urge you to first read Uniview's documentation about Unifont's
pros and cons, and for a link to a monospace version of the font.
v1.1 Uniview's error message about its incompatibilty with TSE's Console version (e32.exe) can now be disabled.
THIS IS A BETA VERSION.
It has been tested on my systems and there it has no known errors.
Please report any errors and imperfections.
This tool and extension will repair any errors in the tsehist.dat file in which TSE stores its history lists.
History errors are likely, because:
- TSE's GetFreeHistory() function has at least one bug.
- TSE has a limit of 127 free history lists, which users of many macro tools and extensions might over time exceed.
- Semware's and my macros do not test whether GetFreeHistory() returns FALSE when it fails, and blindly continue. Sorry!
v0.1
It works on my computer. 😇
This extension shrinks a TSE picklist to only those files, that contain the search string you type.
In TSE a picklist is a file list with a known TSE format.
Picklists are used by TSE's File Open menu, its file manager,
and more.
This extension hacks TSE's picklists. While that is an imperfect solution, it seems to work really well, as attested by its users.
PickList default does not work for regular lists, because in general it can damage some of them permanently. However, you can configure PickList for some regular lists. Read the documentation for more details about for which regular lists it is safe to do so. Known safe regular lists: List Open, View Finds. Known unsafe regular lists: List Recent, Potpourri.
v1: Only changed the version number and documentation to reflect that I no longer consider PickList to be a beta release.
Unibrowse (formerly "Edit2") is a tool that implements a lot of of TSE's File Open functionality, with the added capability to also browse and open folders, files and alternate data streams (ADSs) with "Unicode names", meaning with non-ANSI characters in their names.
Note this distinction:
For the names of folders, files and ADSes with
non-ANSI characters use this Unibrowse tool.
For the content of files and ADSes with non-ANSI
characters use the Unicode extension.
An ADS is an optional, invisible, file-like attachment to a file or folder on the Windows NT file system (NTFS). There are a few command line tools that can show them. As far as I know Unibrowse is the only file browser that does. An example of where an ADS occurs is, that when you download a file, for example "Unibrowse.zip", your web browser will typically add an ADS to it, in this example a tiny text ADS called "Unibrowse.zip:Zone.Identifier".
An included example of a filename containing non-ANSI characters is "Unibrowse - The α and ω of Tools.txt".
Unibrowse features:
- For its input and output it requires and default displays non-ANSI characters as their hexadecimal Unicode codepoint quoted with character 127 (usually a square).
- Luckily you can browse to such folders, files and ADSes, and the browser's current line is redisplayed above the list using the current font's full character range.
- As the tool's parameters you can enter a folder or file or ADS, optionally with non-ANSI characters or wildcards or preceded by the options "-a" (load all) or "-c" (configure) or "-d" (only ADSes) or "-f [filename]" (load files listed in file or current buffer) or "-s" (include subfolders).
- These options work much like they do for TSE's File Open command, but with the additional access to non-ANSI names and ADSes.
- Files and ADSes opened by Unibrowse can be edited and saved.
v1.0.1 Renamed the tool from "Edit2" to "Unibrowse".
This tool sorts the lines of a buffer or block, either on a regular expression's matches, or on a sort key of regular expression tags.
For example:
.csv and log files often do not align their fields into columns,
so such files cannot be sorted using a regular sort tool.
If a TSE regular expression can recognize a field based on
the field separator or field content format, then this tool can
sort on that that field.
Using tags in the regular expression it can even sort on
multiple such fields.
That said, .csv and log files can easily be so big, that the
tool's slowness negates its usefulness.
Note: Even with regular expressions, the tool can only sort alphabetically, not numerically, so it cannot sort on numeric fields that have no leading zeros to make their lengths equal.
My guestimate says that this tool will only sporadically be useful, even if I would solve its main downsides. So, unfortunately, I have no good excuse to develop it further.
v1
Only changed the version number to a non-beta one
to indicate that further development was halted.
3 Jan 2023
I just figured out how to cheaply make the tool faster,
so some day I might do this, or sooner if anyone asks for it.
Linux TSE Beta v4.41.31 upwards
This TSE extension allows you to assign an editing action to a quickly typed sequence of defined keys or mouseclicks.
It uses a Keys.ui interface definition file in TSE's "mac" folder. Its syntax is like a standard TSE .ui file with some minor restrictions. It does not compile with Macro Compile, but is compiled when you save the file.
For example, I use it in the Windows GUI version of TSE to assign a triple tap of the <.> key to the "…" (ellipsis) character, a triple tap of the <e> key to the "€" (euro) character, a triple tap of the <?> key to the "¿" character, and the tapping of <1></><2> to the "½" character.
Likewise you could for example assign different actions to a double, triple and quadruple tap of the <Home> key.
In Linux it is ideal for typing characters with diacritical marks in the same way Windows does for "international" keyboards. For example, you can enter an "é" by quickly typing the <'> and <e> keys.
A lot of examples are given in the example Keys.ui file that is included with the macro.
You can configure how long "quickly" is.
v1.0.4 Fixed a rare bug that almost nobody but me would run into, namely the extension disabling itself during editing of a file containg TSE Help codes.
This powerful tool implements a TSE-like search command that creates a list of counts of each unique search result.
If you search without a regular expression, then there is typically only one unique search result which gets counted.
If you search with a regular expression, then there are typically multiple unique search results, which each get counted separatedly!
Example usages:
- List and count all unique ip addresses, email addresses or URLs.
- List and count all unique values of the Nth field of a log or .csv file.
- List and count all unique usages of syntax in software programs.
- List and count all unique words, characters, names or abbreviations.
Read its documentation for more about its power options.
v1.1
Implemented search option "a".
The Options prompt is now more self-explanatory.
Made search option "g" redundant: it is always used.
Improved the documentation.
This tool generates a TSE WordSet based on the characters it finds in the current buffer.
It presents the generated WordSet in a prompt, from which you can copy it.
v1.1 Usually when a space character occurs in the buffer, it needs to be omitted from the WordSet, so I added this as a question with the usual case as its default answer.
v1.1.1 Fixed: If the buffer contained a backslash character, then the WordSet could miss an unrelated character.
This tool generates a random string of letters, numbers or both, of a selectable length.
You can copy the generated string from the result-prompt.
There is no download, because Execute v2.0.1 has been included in TSE v4.50rc19.
This tool can interactively run a TSE command or a whole line of TSE commands without you having to program a macro for it.
New in v2:
- Now supports all TSE versions and variants from TSE 2.5e upwards.
- Can now be installed in and started from the Potpourri menu, and then supplies its own prompt and history list.
- For compilation errors it now provides a fancy error window with a pointer to the error (TSE v3 upwards).
- Breaking change: Removed the Dos command line capability.
- Fixed: Now also works if TSELOADDIR is set and the original load directory is not writable, perhaps because it is on a write-protected network drive.
v2.0.1 Fixed: NextFile() could not be used as a TSE command.
This tool allows you to add keyboard definitions for handier versions of upper, lower, flip, and capitalize to your user interface file.
Its parameters "upper", "lower" and "capitalize" advance the cursor to the next word when they are not used in a block.
"flip" advances the cursor to the next character when it is not used in a block.
"capitalize" also works outside a block.
This extension makes the use of TSE history lists a lot more efficient.
When in a history list, just start typing a part what you search for to reduce the list to matches of what you typed.
Example 1: This often allows me to only type a file's name without having to supply its folder.
Example 2: By typing "-a" in the history list I can quickly select the previously entered string again that opens all TSE macros.
v1.0.2 adds the left mouse button to select a history entry.
This extension repairs or enhances the bullet character in TSE's Help.
It makes TSE's Help show its bullet character if it did not, and for all code pages it makes the Console variant of TSE show a BIG bullet character.
TSE's Help contains a lot of bullet-pointed text, but newer TSE GUI users will never have seen that, and other TSE versions and variants have issues with the bullet character as well.
The main reason for this extension was, that in newer GUI TSE versions, its Help shows a bullet character as a space character, making what should have been bullet-pointed text look like cluelessly indented paragraphs.
Out of the box this TSE extension enhances the editing of TSE macro source code by setting keywords to their default predefined UPPER, lower, and CamelCase as you type.
SynCase v7 was rewritten to make use of the latest TSE capabilities and is compatible with Linux TSE.
Its configuration reuses the delimiters and keywords from TSE's syntax hiliting configuration to determine the casing of keywords.
For TSE's macro language it can set keyword casing back to its default values if you ever lost them, which unfortunately a sneaky TSE feature can trick you into doing.
It can be turned on and off per mapping set of TSE extensions. As this implies you can configure it for other languages as well.
You can configure non-keywords to be UPPER or lower cased.
For Linux TSE and for SynCase's full features you need at least TSE v4.41.19 upwards. For older Windows TSE versions from v4 upwards an old version of SynCase is included.
v7.0.2 Fixed an incompatibility with TSE's '-i' command line option and the TSELOADDIR environment variable.
v7.1
Added 38 missing SAL keywords to case.
All of them occur in Semware's distributed TSE macros.
As of this date (6 Oct 2022) they are missing in TSE's syntax
hiliting too, and need to be added there too to hilite and case them.
Details are in SynCase.s's "HISTORY" section at 7.1.
The missing keywords are:
Keywords 4:
DetabColumnBlocks.
Keywords 5:
GERMAN,
COPYTO_CURR,
LINUX,
LOCKFIX,
MORE_KEYWORDS,
_DONTLOAD_,
_PICK_BUFFER_FN_COL_.
Keywords 6:
ax,
bx,
cx,
dx,
height,
Cleanup,
Default,
Flags,
Prologue,
Startup,
Black,
Blink,
Blue,
Bright,
Cyan,
Green,
Intense,
Magenta,
Red,
White,
Yellow.
Keywords 7:
FindInfoPtr,
GetOutputDriver,
SetOutputDriver,
HookDebugger,
Interp,
intr,
LockMacroId,
UnLockMacroId.
Keywords 9:
KeyPad0.
This macro logs changes in TSE settings.
At any time you can execute the macro for a report of the history of changes in your settings.
v1.3 Default no longer automatically restores TSE settings after a TSE upgrade, because new TSE releases will do that themselves.
v1.3.1 Fixed a case-sensitivity bug, when Windows TSE is started from a network drive, that is implemented by a Linux machine, that enforces addressing its files case-sensitively.
This tool makes ("mak") one file or all files in a folder read-only ("ro") or not read-only.
Note that the read-only attribute is a very light protection in Windows: It is often and easily ignored. Occasionally it is honored, which makes it slightly better than no protection at all.
v2
Now generates an unsaved .cmd file with the necessary commands,
so you can check and even modify the command file before executing it.
Now also adds or removes a folder's read-only attribute.
Linux TSE v4.41.12 upwards
I have written and downloaded lots of macros for Windows with upper case letters in their names. My user interface file has lots of ExecMacro commands that reference them. And lots of those macros reference each other with ExecMacro commands. Whether these references were in the same case did not matter, because Windows is case-insensitive.
Now there is a case-sensitive Linux TSE beta. Oops! Porting problem!
This tool repairs ExecMacro commands in all opened files that contain an ExecMacro with a differently cased macro name than its disk filename.
Linux-specific example:
In a UI or macro file the command ExecMacro('Adjust')
does not work if the macro's disk name is tse/mac/adjust.s .
With this macro you can repair one or all ui and macro files in one go, check its report and unsaved changed files first, and if you are satisfied with the result, then you can save them all, and recompile all macros.
v1.0.1 Fixed incompatibility with TSE's '-i' command line option and the TSELOADDIR environment variable.
Linux TSE probably all versions
This tool lists the TSE internal editor version number of one specific file or of all files in a folder.
Fair warning: Even for uber-TSE-nerds it takes an exceptional situation for this tool to be of any practical use.
Context: For different but close TSE releases, the editor and compiler executables and .mac files might still be compatible with each other. This means that macros do not always need to be recompiled for a new release, as is currently already sometimes skipped for .si macros. Whether this is the case can administratively be determined by the "internal editor version number" of these TSE-related .exe and .mac files. This tool can list the internal editor version numbers of these files.
v2.0.1 Fixed incompatibility with TSE's '-i' command line option and the TSELOADDIR environment variable.
This TSE extension logs all your TSE keystrokes and which file you did them in, default to a Log\Tse\KeyboardLogger folder in your personal folder.
Each TSE session creates a unique logfile YYYYMMDD_HHMMSS_WWWWW.txt based on the start-time of the session.
v2
Instead of first logging keystrokes to a buffer and afterwards copying the
buffer to a file, now keystrokes are immediately logged to a file on disk.
The formerly proscribed method of autoloading the macro is loosened and
enhanced with intermediate options.
Executing the macro now provides a menu with run-time and configuration
options.
Added Linux compatibility.
v2.0.1
Fixed incompatibility with TSE's '-i' command line option
and the TSELOADDIR environment variable.
Hlp2txt generates a readable help file from TSE's built-in Help system, either in HTML or PLAIN TEXT format, and either using UTF-8, ASCII or OEM character encoding.
The main changes for version 3 are:
- In the HTML version of the manual its links are now identical to those of TSE's Help. This means no more missing links and no more excessive linking wherever a topic's name, word or phrase is used.
- The HTML manual now has actual bold and italic text where the Help uses colors for these.
- The manual now includes the Help's InfoBoxes as "Info->..." topics.
- The manual now also includes those not-indexed topics that are linked to from indexed topics.
- The tool no longer supports the unused "Word" and "Generic" text formats. You can still open the full HTML file in Word.
Macro programmers: Technical notes about what I discovered about the insides of the Help are described in the source coude in a "technical info" section, and here on the site are two tools that helped with this discovery and with verification of its correctness.
v3.0.3 Fixed incompatibility with TSE's '-i' command line option and the TSELOADDIR environment variable.
Download blocked:
Nowadays this old extension turns out to be buggy.
I have blocked its download while I review what is wrong.
Features:
- Avoid history lists deleting each other.
- Get an overview of all history lists with their names.
- Delete an entire history list.
- Define cleanup-rules per history list.
v5.0.8 Fixed incompatibility with TSE's '-i' command line option and the TSELOADDIR environment variable.
There is no download, because fState has been included in TSE.
This TSE extension remembers the cursor position of recently viewed files.
Even for the temporary files that are created by tools that use TSE as their external editor.
Windows TSE Beta v4.41.37a upwards
This TSE extension now has two functions.
1. For each TSE session that was open during a (Windows) crash, it automatically offers to recover one of those sessions each next time TSE is started.
2. At any time you can access the recent back-ups it made through a shrink-as-you-type list, and thereby retrieve deleted and previous versions of recent files.
I created this extension because historically all my Windows home PCs have tended to occasionally crash, especially during the summer months.
Then in practice I found out that I also used it to retrieve (old versions of) files.
v1.1
Added a user-friendly interface to at any time list and retrieve UnCrash's
backup files.
Fixed Uncrash v1.0.7 showing a system buffer if it was started manually.
Undid the change in v1.0.7 to not report a crash if the Close button of the
GUI version of an older TSE version than v4.41.46 was used.
Semware improved the Close button in TSE v4.41.46, so UnCrash's fix is no
longer necessary for newer versions of TSE and even hampered it, and it was
too much work to make UnCrash support both the fixed and older versions of
TSE when there is a free public newer TSE version available.
v1.1.1 Fixed incompatibility with TSE's '-i' command line option and the TSELOADDIR environment variable.
The tool's name stands for "Find across lines".
It works like TSE's Find command, but with these differences:
- The search string can match a text string that spans across lines.
- Only the search options g, i, m, v, x, + and digits are used.
- When searching it sees each line end as a line feed character.
- In a regular expression "^" and "$" match a line end, "." now includes matching a line end, and "\s" matches any whitespace character (space, tab, line end, …).
- Default it matches a search range of at most 255 characters.
- In the search options you may specify a different search range, or "m" for the maximum range of 31,998 characters.
- Parameters can also be supplied as macro command line parameters.
- In the text it marks a found string as a block, and in a View Finds list it colors each found string.
v1.0.1
Fixed a display bug in the View Finds list.
v1.1
Made the documentation Potpourri-compliant, so you can easily
Windows-copy/paste it to create a new Potpourri entry.
This tool helps macro programmers to easily create a log file and write time-stamped lines to it.
It just requires simple commands like:
ExecMacro('Log open <filename>')
ExecMacro('Log write <some text>')
ExecMacro('Log write <some other text>')
...
ExecMacro('Log close')
Every logged line of text will be prefixed with its date and time.
It logs to one file at a time. This is a limitation if you want to debug two macros independently. This is a feature if you want to debug one problem that has dependencies in multiple macros.
Linux TSE Pro - tested with v4.42
This tool shows a list of all TSE buffers in memory, those of files as well as hidden and system buffers.
You can select a hidden or system buffer to safely view a copy of its content, or select a normal buffer to switch to it.
The advantage of the "Hidden" tool over TSE's built-in "Buffers" tool is, that "Hidden" is safe. "Buffers" edits the actual (system) buffer, which risks accidentally changing it.
v1.3.1 Bug fixed: Now you can select a system or hidden buffer more than once, which refreshes its copy-buffer.
Linux TSE Pro probably all versions
This tool sorts all lines from the current buffer on their length into a new unnamed buffer.
v1.1 No longer modifies the current buffer. Improved the progress messages for very large buffers.
It only partially works in other Windows TSE Pro v4 versions.
This tool converts a text buffer to an unsaved HTML page including TSE's syntax highlighting.
The result can be used as (a snippet in) a web page or an email.
For an HTML example with style attributes, see how the following text is embedded in this HTML page. This is not a picture, but text, that can be marked and copied as text:
// Example highlighted code snippet // generated with this tool. proc Main() string response [10] = '' integer number = 0 while Ask('Number?', response) number = Val(response) Warn('The square of'; number; 'is'; number * number) endwhile end Main
For an HTML example of class attributes referring to a stylesheet, see the code snippets in TSE PRO Undocumented Features .
For use in an email your email client needs to support the
necessary HTML formatting.
Use in an email works by saving the generated HTML page, opening
the saved file in a web browser, and copying the highlighted text
from the web browser into an email.
If an email receiver's email client does not support this
highlighting, they still tend to see the text, just not
highlighted.
Email clients that have been reported to support this highlighting:
- Outlook
- iOS mail
- Pegasus (if a message wrap option is set)
- eM Client
- Thunderbird
v1.2 Added a choice whether to generate "style attributes" or "class attributes with a stylesheet" for the HTML colors.
v1.2.3 Fixed: Now also works if TSE's cursor line is configured to be colored differently from other text lines.
This tool lets you or your macro pick an RGB color by clicking in a palette of colors.
Theoretically there are 16,777,216 RGB colors. On my monitor the tool will only show about 200,000 colors.
The tool is very slow to start up. If that is not an acceptable price for its awesomeness, then you might want to use an online color picker instead.
v1.0.1 Only tweaked the documentation.
This include-file allows us to create macros, that use some of the new macro syntax from TSE v4.2 upwards, but are still backwards compatible down to TSE v4.0.
It does so by implementing some of the new macro COMMANDS as macro PROCEDURES, and by using compiler directives to only use these macro procedures for those TSE versions that do not support the new macro commands yet, and to use the faster macro commands for the newer TSE versions that do support them.
Additionally this file starts with a group of compiler directives that make the compiler give a clear and specific message if someone compiles the macro with a TSE version before TSE Pro v4.0.
Also it adds backwards compatible names for the component bits of the return value of QueryEditState().
TSE commands implemented as procedures: - Their procedure versions:
- integer proc isAutoLoaded() - 1.0
- integer proc MkDir (string dir) - 1.0
- integer proc RmDir (string dir) - 1.0
- integer proc StartPgm (string pgm_name, string args, string start_dir, integer startup_flags) - 1.0
- integer proc StrCount (string needle, string haystack) - 1.0
- integer proc StrFind (string needle, string haystack, string options) - 1.0
- integer proc StrFind5 (string needle, string haystack, string options, integer occurrence, var integer found_length) - 1.0
- string proc StrReplace (string needle, string haystack, string replacer, string options) - 1.0
- string proc VersionStr () - 1.1
Support procedures - Their procedure versions:
- integer proc compare_versions(string version1, string version2) - 2.0
- integer proc wurn(string text) - 1.0
v1.7 Added StrCount().
v1.7.1 Bug fix: For Linux WIN32 should be defined, but as FALSE.
This tool can be used to navigate and gain insight into large recursive lists and program source code.
It accomplishes this by compressing text into a list of lines with a certain maximum indentation, which you can control with the Right and Left keys.
For example, it compresses a shopping / todo / notes list of increasingly indented topics and subtopics into a new list of only the (sub)topic lines, where you control which level of subtopics you want to see.
As another example, programs typically use indentation to clarify
their structure.
Top-down this tool works somewhat like TSE's "Function List"
menu, but with the added capability that it can then include
lines with ever increasing indentation,
which gives some insight into the program's structure.
Bottom-up this tool shows lines with the current line's
indentation or less,
which gives insight into what the current line's place in
the program structure is.
This is a tool for macro programmers to determine a buffer's best tab size.
Here tab size means how many SPACE and TAB characters are the most consistently used to increase the indentation of a next line. A TAB character is treated as one SPACE character.
For testing you can run it interactively to create a report of found tab sizes and the determined tab size.
It also comes with a GetTabSize_Test tool, which tests and
demonstrates GetTabSize by listing the tab sizes for all text
files in a folder, defaulting to your TSE folder.
(Aside: GetTabSize_Test has a neat is_text_file(filename)
procedure.)
Linux TSE Beta v4.41.35 upwards
This tool lists recent files' names into an editable buffer.
It shows the same content as TSE's "File List Recent" menu, but not as an interactive list from which you can pick and open a file, but as an editable buffer.
Linux TSE Beta v4.41.35 upwards
This tool lists all open files' names into an editable buffer.
More specifically, it creates a new TSE buffer, that contains a sorted list of the same files' and buffers' names that are interactively shown by TSE's "File List Open" menu.
v1.0.1 Gave the new buffer a significant name. Improved the documentation.
Linux TSE Beta v4.41.41 upwards
This tool encodes (compresses) or decodes (decompresses) the current buffer to a new buffer it creates.
Its main feature is, that it does so solely with TSE's capabilities, i.e. without any dependency on a non-TSE third-party tool.
It is not compatible with with any other compression tool. It is intended as a helper tool for TSE-specific applications.
This include-file for macro programmers provides us with the FastStrFind() procedure as a much faster (*) alternative to TSE 4.4's built-in StrFind() function.
(*) Qualifier 1: Much faster in computer terms. Only macros that use StrFind() thousands of times might become faster to us humans by the use of FastStrFind(). I use FastStrFind() to speed up some file conversions.
(*) Qualifier 2: FastStrFind() is just as fast as StrFind() when searching for a regular expression or a word; it is a lot faster when only using other search options.
A FastStrFind_Test macro is provided to demonstrate FastStrFind()'s use and speed.
This tool asks for a directory and generates a TSE buffer with "rmdir" commands for those directories there that contain no files. Directories containing only empty directories are listed too.
You can examine and edit the resulting TSE buffer, and rename it to a .cmd file to execute it to remove the listed directories.
This TSE extension allows you to temporarily zoom in and out by using Ctrl MouseWheel up and down, and to go back to the original size by clicking Ctrl MouseWheel.
While zooming, the screen size is kept as much the same as possible.
To make a screen zoom size permanent, use the TSE menu "Options -> Save Current Settings".
Zooming out is limited to where letters (have) become to small to read.
Zooming in is limited to where a screensize of 80 x 25 characters would no longer fit, because that might stop TSE's menus from working.
v1.3 Allows disabling its incompatibility warning for TSE's Console version.
An implementation of Conway's "Game of Life".
v1.2.1 It makes Life also compatible with TSE Pro v4.41.38 upwards.
Linux TSE Beta v4.41.24 upwards
This power tool searches for a list of search terms in a list of files or in all open files.
This tool can be used as a simple calculator for signed integers of up to 255 characters.
It supports addition, subtraction, multiplication, division, and comparison.
It also contains a separate file for macro programmers, the content of which can be copied as a whole into our own macros to do calculations on big integers.
v1.3.1 Improved the speed of addition, now taking about ⅔ of its previous time.
This extension lets macros receive parameters from the command line, without TSE trying to load them as files.
Also included is a macro to test and demonstrate this functionality.
This tool assumes that you want to subtract the lines in the current file case-insensitively from the lines in the previous file, putting the result in a new file.
With this TSE extension you can better see control characters, like null, bell, backspace, tab, line feed, form feed, carriage return, and others.
Better: Default the GUI version of TSE with an ANSI compatible font "hides" control characters by showing them as spaces. The Console version of TSE and e.g. the Terminal font show most control characters as regular characters, which is better but does not differentiate them from those regular characters. This TSE extension always shows all control characters and always makes them recognizable and distinguishable.
Note, that in normal/non-binary mode TSE has stripped carriage returns and line feeds from lines, and what is not there will not be shown. Open a file in binary mode -3 (prefix opening a file with " -b-3 ") to see any carriage returns and line feeds too.
In the TSE menu "ASCII Chart" you see control characters 0, 1, 2, 3 ... 31 also as the column "^@", "^A", "^B", "^C", ..., "^Z", ..., "^_". This TSE extension consistently shows a control character as the second character from that last column in the inverted text colour. This way you can always reference the ASCII Chart for the now visible control characters.
v1.0.1 Improved the documentation.
Linux TSE Beta v4.41.12 upwards
This TSE extension makes TSE more user-friendly with regard to the case of a file's folder and name.
For Windows it makes TSE show a file's path as it is cased on disk. For example, in Windows TSE has no problem opening "tse\MAC\adjust.s", but by itself it would keep showing "MAC" in upper case.
Its first Linux feature allows you to case-insensitively open a specific folder or file.
Its second Linux feature adds, that if you renamed only a file's case in the editor, then upon saving it to disk the disk file is renamed too, just like in Windows.
ReplaceUnCom emulates TSE's Replace command but only replaces in uncommented text.
v0.2 == v1.0:
- Optimized the comment colour check with a regular expression.
- Added the three ToEOL attributes as comment attributes too.
- Added the check that comment colours must differ from other editing colours.
This tool creates a new file from the current file, where every line containing a supplied regular expression is put before itself and before every next line that does not contain that regular expression.
Afterwards you can use existing TSE functionality to search all lines in combination with their tag lines, or to sort the now ubiquitous tag lines on their columns.
When you are done you have the option to remove the inserted tag lines with a column block to get the original file format back.
For example, given the file content:
id=1
name="Bob"
street="Main street"
city="Metropolis"
id=2
name="Alice"
street="Station street"
city="Gotham"
It can create the new file content:
id=1 id=1
id=1 name="Bob"
id=1 street="Main street"
id=1 city="Metropolis"
id=2 id=2
id=2 name="Alice"
id=2 street="Station street"
id=2 city="Gotham"
There is no download, because eList has been included in TSE.
List the current buffer with a "shrink the list as you type" search function.
This TSE extension is a near-perfect solution to the problem, that if you access many files at once, and many or all of them have longer lines than TSE's limit, then TSE forces you to press "OK" on a separatete warning for each such file.
With this macro installed you only get a warning for the first such file, after which ALL warnings are disabled, but only for the duration of the current user command.
For instance, if you open a 100 files using the "-a" option and a wildcard character, and you then search them all at once using the "a" search option; then this macro ensures that that you have to press OK at most once on a "Long lines split: ..." warning, even if all 100 files have them.
This TSE extension does the following:
When you double tap the F1 key when editing a TSE program, then TSE's Help is called for the word at the cursor, otherwise the F1 key works as usual.
v1.0.1 Fixed: It did not work in .ui files.
If two consecutive lines have case-insensitive the same word overlapping the above column-position, then the second line is deleted, from the current line onwards.
If there is no word on the column-position, then no line is deleted.
v1.3 adds hiliting the search-results and some minor improvements.
Here whitespace-insensitive means that any non-empty string of consecutive whitespace-characters matches any other such string.
Here the whitespace characters are space, horizontal tab, and formfeed.
FndDubLn ignores characters past column 255.
v1.0.1 Fixed: The macro could not handle empty lines, resulting in erroneous reports. The macro now ignores empty lines and lines containing only whitespaces.
There is no download, because Xmas has been included in TSE.
Xmas draws an fine-grained, slightly animated Christmassy picture.
It was originally written to make the files on a LAN server an hour older (by adding -1 hour) to solve a synchronization problem when the outside world was about to switch from summertime to wintertime.
When the outside world switched from summertime to wintertime, and clocks went an hour back, then file-times on Windows pcs also went an hour back (*), but file-times on a LAN did not. So if files on Windows pcs were synchronized from a LAN-directory based on date/time, then the switch to wintertime suddenly made files on Windows pcs appear one hour older than the same files on a LAN, which inadvertenly triggered synchronization.
(*) There are also advantages to this: A running Windows process doesn't see a just created file suddenly becoming an hour older or newer. Which for instance also means that a process cannot create files "in the future" :-)
The macro prompts for:
- The directory.
- The type of time-unit: years, months, days, hours, minutes, seconds.
- The positive or negative number of time-units to add.
- Whether to Simulate or Make the changes.
Use this macro at your own risk. It is not perfect.
Always do a simulation first, and especially search the resulting report for "overflow", which means that a certain date/time will not be changed.
v3.0.1 Improves the warning if too many files were opened. v3.0.2 Solves a nasty bug which sometimes caused AbanName to incorrectly load one file as if it were an empty file.
TSE lets you open files without loading them, thus avoiding a memory limit. Contrary to TSE's own Find command, this macro can search across files only temporarily loading one file at a time, thus also avoiding a memory limit.
The macro can also "Find and Do" to Keep or Abandon files containing a certain string: You can do this multiple times, thus step by step zeroing in on a smaller and smaller selection of opened files.
v2.0.2
Improves the warning if too many files were opened.
v2.01
Removed the dependency on global.zip and macpar3.zip.
Added a pre-emptive check (including for regular expressions) to warn the user, that there is no use in searching for an empty string.