TSE: 'Autoload list' versus using -e<yourstartupmacro>

35 views
Skip to first unread message

knud van eeden

unread,
Jun 2, 2024, 3:07:04 PMJun 2
to SemWare TSE Pro Text Editor
TSE: Using 'Autoload list' versus using -e<yourstartupmacro>

Hello,

1. I see sometimes that TSE macros are published and then they need to be added to the 'Autoload list' in order to run.

2. I myself basically never use the 'Autoload list' option.

3. Instead I put all the TSE macros that I have to run at startup in a separate single TSE startup macro.

4. Then I start that TSE startup macro using the TSE g32.exe command line option '-e'.

E.g.

g32.exe -emystartupmacro.mac

(note that I do not put a space between '-e' and the TSE startup macro filename)

5. Assumed advantages of this '-e' method:

1) I assume that is not really good practice as it will (I assume at this moment) e.g. not automatically be migrated from one TSE version to another version (e.g. migrating from TSE 4.50 RC23 to TSE 4.50 RC24). One probably has to manually put the TSE macros
back in the autoload list of that latest version migrated to.

2) Instead using the -e method you just recompile (as you always have to do after migration to another version) TSE yourstartupmacro.s and off you go, no more action required.

3) Having those TSE startup macros in an external file, one can much more easily build in some e.g. IF ENDIF, REPEAT UNTIL, WHILE ENDWHILE, ... logic.

E.g. IF <only some condition is met run that particular TSE macro in your single TSE startup macro>

While if you put it in the autoload list it will usually always run (or you must build in logic in that particular TSE macro which does some checking),
but externalizing it is in general the preferred way to go. One does not have to change / recompile the particular TSE macro itself thus only your startup TSE macro).

3) If wanting to switch off a particular TSE macro in the startup TSE macro, I just put '//' in front of the line,
save it and recompile it. Then it is not active anymore. (Also) fast and simple to implement.

4) Example of a TSE startup macro (not showing e.g. the IF ... ELSE ... ENDIF to check if certain conditions are met)

---

 // ExecMacro( "initglob.mac" )
 // ExecMacro( "dateincc.mac" )
 // ExecMacro( "fileknal.mac" )
 // ExecMacro( "menuknal.mac" )
 // ExecMacro( "doenmenu.mac" )
 // ExecMacro( "smen.mac" )
 // ExecMacro( "taalmenu.mac" )
 // ExecMacro( "qdbmenu.mac" )
 // ExecMacro( "clipview.mac" )
  ExecMacro( "initglob.mac" ) // adapt this to TSE v2.8, v3, v4 (as i.m is compiled for TSE v2.5 only)
   // ExecMacro( "vmatch" ) // operation: view: brace: match: visual [kn, ri, sa, 28-02-2004 17:01:41] // [kn, ri, sa, 02-03-2013 01:17:09] // switched off again because it interferes with typing
   ExecMacro( "initglob.mac" ) // adapt this to TSE v2.8, v3, v4 (as i.m is compiled for TSE v2.5 only)
   ExecMacro( "c:\i.m" ) // adapt this to TSE v2.8, v3, v4 (as i.m is compiled for TSE v2.5 only) // [kn, ri, we, 07-12-2011 20:51:04]
   ExecMacro( "colors.mac" ) // do not use in TSE v2.8, v3, v4, as it has its own color scheme
   ExecMacro( "gotogfmo.mac" ) // gf: goto: mouse: click: double
   ExecMacro( "video.mac" )
 ExecMacro( "find.mac" )
 ExecMacro( "clock.mac" ) // operation: view: time: clock // [kn, ri, we, 07-12-2011 20:12:23]
 ExecMacro( "pcfsearc.mac" ) // operation: search: text: input: menu: pcfsearch // [kn, ri, we, 07-12-2011 20:12:25]
 // ExecMacro( "searcint.mac" ) // operation: insert: clipboard: internet: url: search engine // [kn, ri, sa, 06-06-2009 17:55:58] (do not use it)
 ExecMacro( "knudmenu.mac" ) // run my <F11> menu // [kn, ri, we, 07-12-2011 20:12:29]
 ExecMacro( "cuamark.mac" ) // operation: select: mark: block: cuamark // [kn, ri, we, 07-12-2011 20:12:32] // disabled [kn, ri, we, 24-04-2024 19:00:00] // new [kn, ri, mo, 06-05-2024 15:50:51]
 ExecMacro( "bookmark.mac" ) // must be run after knudmenu.mac has run, as that initializes the global variables [kn, zoe, tu, 13-03-2001 14:47:40]
 // ExecMacro( "blocks.mac" ) // avoid this macro as it slows down your TSE extremely [kn, ri, th, 17-11-2022 12:30:51] /  must be run after knudmenu.mac has run, as that initializes the global variables [kn, ri, mo, 08-08-2022 13:10:06]
 // ExecMacro( "scratch.mac" ) // set the scratch buffer 'A', 'B', ..., 'Z', that becomes the default for copy/paste/cut [kn, ni, mo, 11-11-2002 15:25:52] // [kn, ri, sa, 06-06-2009 17:56:16] (do not use this, it is in Search -> 'Named clipboards' anyhow already)
 ExecMacro( "gotorema.mac" ) // record: goto: case: main: goto: window: top // [kn, ri, we, 07-12-2011 20:12:37]
 ExecMacro( "gotogfma.mac" ) // procedure/function: .gf: goto: name: main // [kn, ri, we, 07-12-2011 20:12:39]
 ExecMacro( "gotogfmo.mac" ) // gf: goto: mouse: click: double // added [kn, ri, fr, 21-05-2004 22:55:14]
 ExecMacro( "chanwicj.mac" ) // switch between open Microsoft Windows windows // added [kn, ri, su, 04-09-2005 03:46:32]
 ExecMacro( "chansccs" ) // show if file changed in yellow color '*' on status bar // [kn, ri, we, 07-12-2011 20:12:42]
 ExecMacro( "chanbopm" ) // box: change: input: prompt: main: right click mouse // [kn, ri, we, 07-12-2011 20:12:47]
 // ExecMacro( "mouserightclick.mac" ) // right click // [kn, ri, we, 07-12-2011 20:12:50]
 ExecMacro( "template.mac" ) // operation: run: template <CTRL><TAB> // [kn, ri, we, 07-12-2011 20:12:59]
 ExecMacro( "complete" ) // expand macro // [kn, ri, we, 07-12-2011 20:13:01]
 ExecMacro( "expand" ) // expand macro // [kn, ri, we, 22-02-2023 20:10:17]
 ExecMacro( "insetecy" ) // auto complete keywords // [kn, ri, we, 07-12-2011 20:13:02]
 ExecMacro( "state -r -q" ) // restore the old state [kn, ri, sa, 10-01-2009 23:17:39] // activated this again // [kn, am, we, 14-07-2010 12:02:18]

---


with friendly greetings
Knud van Eeden





Carlo Hogeveen

unread,
Jun 3, 2024, 7:04:21 AMJun 3
to sem...@googlegroups.com

Knud wrote:
> 1) I assume that is not really good practice as it will (I assume at this moment)
> e.g. not automatically be migrated from one TSE version to another version
> (e.g. migrating from TSE 4.50 RC23 to TSE 4.50 RC24).
> One probably has to manually put the TSE macros
> back in the autoload list of that latest version migrated to.

Your assumption is wrong, which is why the rest of us have no problem with using the Macro AutoLoad List.

Carlo



Fred H Olson

unread,
Jun 3, 2024, 8:29:02 AMJun 3
to sem...@googlegroups.com
I'm guessing Knud is motivated by having not wanting to have a long
autolist to migrate to new versions. One could be to put all macros
one desires into autoload into one macro ( "autolist.mac" ) as he does
AND put that in the autolist making it trivial to migrate.

To make it even easier... TSE's autolist could be modified to
automatically load autolist.mac if it existed.

Fred


--
Fred H. Olson Minneapolis,MN 55411 USA (near north Mpls)
Email: fholson at cohousing.org 612-588-9532
My Link Pg: http://fholson.cohousing.org

H P

unread,
Jun 3, 2024, 9:12:51 AMJun 3
to sem...@googlegroups.com
That's easy just put it a macro like this;

// Delete existing autoloadlist and create new one */

    If FileExists(s_LoadDir + "tseload.dat")
        EraseDiskFile(s_LoadDir + "tseload.dat")
    EndIf

    #IfDef LINUX
        AddAutoLoadMacro(s_LoadDir + "ownmac/matchuncom")
        AddAutoLoadMacro(s_LoadDir + "ownmac/keepblinking")
        AddAutoLoadMacro(s_LoadDir + "mac/sort")
//      AddAutoLoadMacro(s_LoadDir + "ownmac/scrollcurs")
        AddAutoLoadMacro(s_LoadDir + "mac/syncfg2")
        AddAutoLoadMacro(s_LoadDir + "mac/template")
        AddAutoLoadMacro(s_LoadDir + "mac/vmatch")
        AddAutoLoadMacro(s_LoadDir + "mac/expand")
        AddAutoLoadMacro(s_LoadDir + "mac/insmatch")
        AddAutoLoadMacro(s_LoadDir + "ownmac/clipbord")
        AddAutoLoadMacro(s_LoadDir + "ownmac/complete_word")
        AddAutoLoadMacro(s_LoadDir + "ownmac/syncase")
        AddAutoLoadMacro(s_LoadDir + "ownmac/histlist")
        AddAutoLoadMacro(s_LoadDir + "ownmac/cursorshape")
        AddAutoLoadMacro(s_LoadDir + "ownmac/linuxmouse")
    #Else
        AddAutoLoadMacro(s_LoadDir + "ownmac\matchuncom")
        AddAutoLoadMacro(s_LoadDir + "ownmac\keepblinking")
        AddAutoLoadMacro(s_LoadDir + "mac\sort")
        AddAutoLoadMacro(s_LoadDir + "ownmac\scrollcurs")
        AddAutoLoadMacro(s_LoadDir + "mac\syncfg2")
        AddAutoLoadMacro(s_LoadDir + "mac\template")
        AddAutoLoadMacro(s_LoadDir + "mac\vmatch")
        AddAutoLoadMacro(s_LoadDir + "mac\expand")
        AddAutoLoadMacro(s_LoadDir + "mac\insmatch")
        AddAutoLoadMacro(s_LoadDir + "ownmac\chgnotif")
        AddAutoLoadMacro(s_LoadDir + "ownmac\clipbord")
        AddAutoLoadMacro(s_LoadDir + "ownmac\complete_word")
        AddAutoLoadMacro(s_LoadDir + "ownmac\syncase")
        AddAutoLoadMacro(s_LoadDir + "ownmac\histlist")
    #EndIf


Met vriendelijke groet,
With kind regards,
Muy atentamente,
Mit Freundliche Gruß,
Sinceramente,


H. Pikaar

Henri...@gmail.com



Op ma 3 jun 2024 om 14:29 schreef Fred H Olson <fho...@cohousing.org>:
--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/semware/b719b8d8-45b3-feda-2dbe-8f866981e27%40cohousing.org.

H P

unread,
Jun 3, 2024, 9:16:49 AMJun 3
to sem...@googlegroups.com
Forgot; String s_LoadDir[255]           = LoadDir()

Met vriendelijke groet,
With kind regards,
Muy atentamente,
Mit Freundliche Gruß,
Sinceramente,


H. Pikaar

Henri...@gmail.com



Op ma 3 jun 2024 om 15:12 schreef H P <henri...@gmail.com>:

knud van eeden

unread,
Jun 3, 2024, 9:54:03 AMJun 3
to sem...@googlegroups.com
The statement is thus that the 'auto load list' is just a very limited with less possibilities and more effort and just a special case of a more general -e startup macro.

The latter -e method is thus much more versatile, is external, can be migrated automatically and recompiled together with your other TSE macros, edited and compiled outside TSE or as a file within TSE and recompiled from the command line.

If you believe not please provide contra evidence otherwise accept the facts ;-)

with friendly greetings 
Knud van Eeden

Sent from Yahoo Mail on Samsung Galaxy S24 Ultra / 1 terabyte / artificial intelligence

--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.

Carlo Hogeveen

unread,
Jun 3, 2024, 10:56:46 AMJun 3
to sem...@googlegroups.com

@Fred and HP,

When upgrading Windows TSE with the set-up program (e.g. tse.txe), most settings and the Macro AutoLoad List are preserved.
So there is no need to "migrate" the Macro AutoLoad List.
If someone wants to implement their own Macro AutoLoad List with their own macro that is their time to waste, but the spreading of misinformation to advice others to do so too needed to be countered.

Carlo



knud van eeden

unread,
Jun 3, 2024, 12:55:06 PMJun 3
to sem...@googlegroups.com
> If someone wants to implement their own Macro AutoLoad List with their own macro that is their time to waste, but the spreading of misinformation to advice others to do so too needed to be countered.

What did they call it, curmudgeon? ;-) ;-)

Ethymology: As fickle and stubborn as the type of person it describes, curmudgeon comes to us without a history, its origins undisclosed. It was originally believed to have come from coeur mechant, the French phrase for “evil heart,” but that theory has been long discarded.




Carlo



--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.

knud van eeden

unread,
Jun 3, 2024, 1:11:16 PMJun 3
to sem...@googlegroups.com
1. As stated in the first statements before if the AutoLoad List is automatically migrated, I have not tested (and as stated earlier in that email I assumed at that moment it did not). It might be the case thus, not sure, not tested. I personally never used the AutoLoad List thus as such. 

Why? Mostly because having 3rd party autoload list macros interfered unfortunately often in puzzling ways with the usual workings and startup of my TSE. 
So immediately deleted those and did not use the 'AutoLoad List'.

On the other hand thus try to create all that logic as I for example do in the screenshot (which shows part of my startup TSE macro). Is that possible? Not sure thus, maybe not, it will certainly be much more complicated to achieve.

Inline image



S.E. Mitchell

unread,
Jun 3, 2024, 5:14:45 PMJun 3
to sem...@googlegroups.com
Since the autoload list is migrated from release to release, and since it is very easy to update it - it is all menu driven - I think that is the best way to go for most users, if they want macros automatically loaded.
But TSE is highly configurable - if one wants to do something differently, or roll their own, that is certainly their prerogative. 
--

knud van eeden

unread,
Jun 3, 2024, 5:52:21 PMJun 3
to sem...@googlegroups.com
Yes difficult to convince, but anyhow worth a try, it might be useful for some though some time and now they know about it.


Sent from Yahoo Mail on Samsung Galaxy S24 Ultra / 1 terabyte / artificial intelligence

Harald Mezger

unread,
Jun 4, 2024, 3:59:05 AMJun 4
to sem...@googlegroups.com
Am Mo., 3. Juni 2024 um 23:14 Uhr schrieb S.E. Mitchell <sammy.m...@gmail.com>:
Since the autoload list is migrated from release to release, and since it is very easy to update it - it is all menu driven - I think that is the best way to go for most users, if they want macros automatically loaded.
But TSE is highly configurable - if one wants to do something differently, or roll their own, that is certainly their prerogative. 

Fully agree on this, Sammy -- though I also concede Knud's point that list of macros to be auto-loaded can become awkwardly long.

My solution to this problem was to write a kind of "collection macro" for my autoload list: it contains definitions and ExecMacro("path\name") lines for all the macros that should be active,
with their associated keyboard commands. This way they don't have to be listed as separate entries.

The help file sections "Event Macros with Predefined names" and "Event Macros Defined by the User" explain different ways off executing macros
on being loaded, or on editor start-up. Executing the "collection macro" makes available all the macros defined or listed in it.

It is located in a subdirectory added to TSEPath, so the installer will automatically recompile with each new Tessie version.

Best Wishes,
Harald.
Reply all
Reply to author
Forward
0 new messages