Session Manager [v7.00]  —  Bookmark your environments: locations and/or display (tabsets and layout)

Discuss and share scripts and script files...
Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: Session Manager [v4.5 ML(5)]

Post by Enternal »

FluxTorpedoe wrote:@all
Edit: Typo in changelog and SM’s "Options>Display Commands…", about the modifiers to define a favorite session (which can later be recalled by Ctrl+Alt + Click on SM button).

• To define a favorite session, all three modifiers must be pressed while clicking on SM toolbar button:
— Ctrl+Alt+Shift + Click


@Enternal
No idea how that’s even possible!
Blind guess: which version of XY do you use?
Hello! I'm using version 16.10.0200. I was supposed to figure it out but currently still too busy even now so I can't test it out yet :(

EDIT:
I don't use temporary sessions since I have autosave off. Looking at the code under Temporary session identification, the codes:

Code: Select all

	$PRE_TmpSession = regexmatches($l_AllTabsets, $GEN_TmpSession);
	if $PRE_TmpSession {
		$l_AllTabsets = replace($l_AllTabsets, "$GEN_TmpSession|");
	}
is one of the problem areas that is causing me problem. Right before this code, $l_AllTabsets is equal to |Main|Temp|
$PRE_TmpSession would then equal ||||||||||| because I do not have any temporary sessions. I'm assuming that means there are no matches (nothing between those "|"). However, the code if $PRE_TmpSession checks only if $PRE_TmpSession contains anything but it's a faulty check since $PRE_TmpSession does indeed contain something according to it but not what you intended. So if I add something before the check to clean up the $PRE_TmpSession such as $PRE_TmpSession = FormatList($PRE_TmpSession, "tsed", "|");, the code now works. So final code is something like:

Code: Select all

// ------------------------------<> Temporary session identification
	$PRE_TmpSession = regexmatches($l_AllTabsets, $GEN_TmpSession);
	$PRE_TmpSession = FormatList($PRE_TmpSession, "te", "|");
	if $PRE_TmpSession {
		$l_AllTabsets = replace($l_AllTabsets, "$GEN_TmpSession|");
	}
Although I still have an issue with the kind of weird indent. Still investigating...
2015-12-26 17_33_53-Desktop - XYplorer 16.10.0200 _ User.png
2015-12-26 17_33_53-Desktop - XYplorer 16.10.0200 _ User.png (4.39 KiB) Viewed 4584 times
EDIT2: Oh. The indent was intentional. Oh, out of curiosity, I played with the autosave feature. What symbol was that supposed to be? I'm getting some Chinese(?) characters instead.
2015-12-26 17_44_51-.png
2015-12-26 17_44_51-.png (1.86 KiB) Viewed 4584 times
And oddly enough, the autosave session is the only one that shows (meaning the original session for it does not show up at all).

EDIT3: Wait. Was the issue with the autosave of a session being the only session showed instead of together with its original session that it derived from intentional? The only way go back to the session it originally came from is by using the "Reset Session". Unlike the previous SessionManager where you can simply select the original session of the autosave session.

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: Session Manager [v4.51 ML(5)]

Post by FluxTorpedoe »

Thanks a lot for investigating, it cut the chase short!

It’s clear that the double-separators issue is (at least) related to a codepage problem

:arrow: Could you move your SM language file out of the folder and tell me if the problem still exists?

Note: your solution works by curing the symptom, now let’s try and fix the disease itself. ;)

---------------------------

• Explanations:

 — The original SM script itself is in ANSI, but the language files are in UTF8 by default.

 — FYI, "Temporary Session" and "AutoSave" are two different features (but more about them in a future post, especially about AutoSave —though it hasn’t changed since its implementation).

 — The existence of a Temporary session is detected if one of the sessions (i.e. tabset folders in <xypanes>) has the exact name that was *predefined* in the language file for Temporary session —and assigned to $GEN_TmpSession.
 — Same process is used to check the existence of an Autosave, based on the specific *predefined* Autosave name, though only used as a suffix in this case —$GEN_AutoSaveSuffix.

• So you pointed out the right culprit with this line:
$PRE_TmpSession = regexmatches($l_AllTabsets, $GEN_TmpSession);
 — The only way you can get "|||…" is that your $GEN_TmpSession is empty —no way this should be possible!

:arrow: $GEN_TmpSession is read from the language file, either external, or if not found, embedded at the end of SM script.
— So either way, there’s a problem with the parsing of the language…
   Corroborated with the weird "Chinese" symbol you get instead of the default •• around the Autosave suffix.

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: Session Manager [v4.51 ML(5)]

Post by Enternal »

I had a feeling that it's a code page issue for a while now. I use SessionManager on my main computers and they all work fine for the most part (my primary computer, the one I'm on the most has the code page to Japanese but the rest are still in English so it still works for the most part). On my laptop however, the code page is in Japanese together with the formatting settings and SessionManager can't be used on that computer. I once tried converting your script file over to UTF-8 but the entire script broke. I did not investigate about it further since I was busy.

On the other hand, I'm not using any SM language file so the problem exists even without the SM language file. However, you confirmed my thoughts, it's definitely a code page issue. So I will try a few more things and report back later. Your explanations helps a lot so I have seveeral ideas to try out haha. Thank you!

Also, don't you mean UTF-16 LE? From what I see, most of the language files are in UTF-16 LE and not UTF-8.

EDIT: Lol. Instead of trying to find the code problems again, I simply I tried converting the SessionManager script over to UTF-16 LE on a computer that has all settings to English and the script now works perfectly. I realized that the reason why my initial attempt at changing the script file to UTF-8 did not work was because the code page (Japanese) on the computer screwed up the conversion process for Notepad2-mod (it's a specific problem with this software and I forgot about it during that time). So instead, I set everything back to English and then use Notepad2-mod again to convert the encoding. Aaargh encodings are such a pain. Anyways converting the main script to UTF-16 LE or UTF-8 both works. And the script also now works on my laptop which for the longest time I did not use SessionManager because I needed the code page and formatting settings that I have applied to that computer. Now I can finally use it!! :biggrin:

Anyway, perhaps you should use UTF-16 LE or UTF-8 from now on for the main script? It makes a bit more sense since you want to support multiple languages so it probably should be in some kind of Unicode itself. I think it would be more problematic (my case for example) if you have the main script in ANSI and the language files in something else. By converting, we can keep any scripting problems independent of the code page it's being run on. Perhaps let the other uses try the files first to see if there are no side effects first. I have attached both the UTF-16 LE and UTF-8 version to this post just so that you can test it out. They are both based on version 4.51. Also importantly, I think the language files should also be encoded in UTF-8 or UTF-16 LE. There were some language files that were also in ANSI and those don't load well on my computer with the changed code page. It load correctly once I converted it to UTF-8 or UTF-16 LE. Now the decision would be what UTF should we use? Don loves UTF-16 LE so for consistency, should it be UTF-16 LE?

But wow does you script size went up when using UTF-16 LE. It's at 250 KB lol! :lol:

Also a question. Autosave only works on one tabset right?
Attachments
SessionManager UTF-16 LE.xys
(254.34 KiB) Downloaded 150 times
SessionManager UTF-8.xys
(127.96 KiB) Downloaded 159 times

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Session Manager [v4.51 ML(5)]

Post by SkyFrontier »

Hi, Flux.

How safe is to use latest version on 15.80?
(I'll start testing on a fresh 15.80 guinea pig, 16.10 if something goes terribly wrong)
Planning a lang update also.
Thanks for the implementation - looks promising! :beer:

Edit:
- You can't delete a session that is currently active (i.e. loaded even partially). To do so, just load another session before trying to delete.
-why? How to know in advance that a session is in use? (guess: marked on script menu, somehow; but... is it really necessary?)

edit 2:
Halt.

XY error:
"Shift"? No such info!
Check your spelling.

Code: Select all

if (get("Trigger") && get("Shift")) {
...
-15.80, xydata from my main installment;
-button installed via snippet;
-click on btn causes the error;
-load <curitem>; // error too
-reqs sez "XYplorer >= v15.00.0518 :!: (w/ User Defined Functions)" :eh: (I'll 16.10 in the meantime)
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Session Manager [v4.51 ML(5)]

Post by SkyFrontier »

Is there a way to prevent SM from... erm... 'saving saved session',ie, overwriting a current session whatever it is? It seems to be the only thing I dislike. IOW: if I save a session, when restarted I'd like to have my original session loaded, not the latest saved one. Temp session can keep this current behavior, though.

-regarding our long gone conversations: any way I could have, say 20 (user defined!) slots for temporary sessions, auto-named after, say, the top left tab+time & date (format easily tweak-able by user templates), latest sessions on top?

The only concern I have as of now is: does SM touches XY official files in its operations? Which ones? Can this be avoided by any means without much effort on your side?

A quick analysis on SessionManager.ini makes me wonder SM heavily relies on xydata, which makes me scary...

(please, don't get that mad on me!)
:oops:
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: Session Manager [v4.51 ML(5)]

Post by FluxTorpedoe »

Enternal wrote:Anyways converting the main script to UTF-16 LE or UTF-8 both works.
Great! :biggrin:
Thanks a lot for trying and for the feedback.
And indeed, maybe it’s time to post the script in (at least) UTF-8…
Regarding Autosave —and the rest—, see next post for another part of the missing manual… :whistle:
---------------------------
SkyFrontier wrote:How safe is to use latest version on 15.80?
Shouldn’t cause any problem per se!
But indeed, modifiers were added recently, so you may be missing this feature… I have to update the minimum requirements!
Edit: Modifiers introduced in v15.80.0002 (Thanks SammaySarkar)

• Hmmm, I can’t find the complete XYplorer changelog/history file anymore, to track down when this was implemented (and a bit on a rush).
Does someone know where to find it?
---------------------------
SkyFrontier wrote:
- You can't delete a session that is currently active (i.e. loaded even partially). To do so, just load another session before trying to delete.
-why?
Because that’s the way XYplorer’s tabsets work: an active tabset (i.e. whose settings are in a real folder) can’t be deleted when in use.
I had given it a try a while back but it’s not worth the hassle: being able to delete the active session would imply either to save the session or tabsets to another name (which would be senseless since you want to delete it!), or to automatically load another session before (but which one, and what if none exists?)…
---------------------------
SkyFrontier wrote:Is there a way to prevent SM from... erm... 'saving saved session',ie, overwriting a current session whatever it is? It seems to be the only thing I dislike. IOW: if I save a session, when restarted I'd like to have my original session loaded, not the latest saved one.
Nothing to do: that’s the default behavior for all sessions.
Only the session with Autosave (when Autosave active) will store the latest settings —and it won’t overwrite the original ones, session can be reseted to original state anytime (first entry of menu: "Reset to Original Session").
---------------------------
SkyFrontier wrote:The only concern I have as of now is: does SM touches XY official files in its operations? Which ones? Can this be avoided by any means without much effort on your side?A quick analysis on SessionManager.ini makes me wonder SM heavily relies on xydata, which makes me scary...
No need to be scared! :ninja:
Session Manager only “touches” its own stuff. See next post for details.
Last edited by FluxTorpedoe on 31 Dec 2015 13:47, edited 1 time in total.

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: Session Manager [v4.51 ML(5)]

Post by FluxTorpedoe »

 
 
      •••   Session Manager Missing Manual – Misc   •••
 

    :idea:  HOW TO RUN  :idea:
 
• Session Manager can be used:
 — via its main menu:
   › by clicking on its toolbar icon
   › by clicking on its toolbar icon while pressing a modifier (Ctrl/Alt/Shift)
 — via an external run of one of its commands, from XYplorer’s:
   › catalog
   › custom keyboard shortcut (CKS)
   › custom toolbar button (CTB)
   › user defined command (UDC)
   › another script
   › etc. (anywhere in XY where a script can be run)

 »»» List of modifiers and commands in SM’s menu "Options | Display Commands…"


------------------------------------------------------


    :!:  DEFINITONS  :!:

• A standard Session is a “pack” of what you see on screen
 It stores, then restores when loaded:
 — the tabsets, i.e. the list of tabs showing your folders (whether you’re in Single or Dual Pane)
 — and, optionnally and independantly:
   › the layout, i.e. the visual interface of XYplorer (visibility of Single or Dual Pane, tree, preview…)
   › the toolbar
   › a script

• A Temporary Session is a unique autonamed standard session:
 — saved quickly: via SM’s main menu, or external command
 — named automatically: as "— Temporary Session —" (may vary depending on your language)
 — listed separately at the bottom of the session list
 — supports all attributes of standard sessions (layout, Autosave…)

Quick Sessions are unlimited autonamed standard sessions:
 — only saved externally: via Shift+Click on SM’s button, or external command
 — named automatically: based on time and active tab folder name
 — listed separately at the end of the session list
 — supports all attributes of standard sessions (layout, Autosave…)
 »»» Difference with Temporary Session: +:unlimited , -:less identifiable , ~:only external run

Autosave is a feature that remembers the last state of a single chosen session (of any kind):
 — when switching from another session to the session with Autosave, its latest state is loaded with the session exactly where and how it was last used;
      whereas when switching between other sessions, it’s their user-saved state that is loaded, regardless of how it’s been used in the meantime
 — session with Autosave can be reset to its original state at any time (menu "Reset to Original Session")
 — Autosave can be assigned to another session at any time (previous session with Autosave will be reset to its original state),
      by loading the new desired session, then menu "Reset Autosave to Current Session"
 »»» Enable Autosave in menu "Options | Enable Autosave…"


------------------------------------------------------


    :idea:  SUGGESTED BASIC USE  :idea:

• Concept:
  Define a default/favorite session and set it to autosave; define a default layout;
  create other sessions to your taste, with or without layout, and enjoy! 8)

 »»» Now, work and switch between your sessions:
   Each time you’ll load your favorite “default” session (e.g. via Alt+Ctrl+Click), SM will resume with things exactly how and where you’ve left them!
   And when it’s becoming too messed-up, just reset it to its original state (Alt+Click, or menu "Reset…")

• How-to:
 — Adjust your tabsets (folders, view type, sort…) to your most regular/favorite content, then save session as e.g. "Default", and place it first in list
   › menu "Options | Reorder List of Sessions" > Erase everything and leave only "Default", it will be listed first, on top of all other sessions listed alpabetically below a separator
 — Assign Autosave to "Default" session
   › make sure "Default" session is loaded, then
     menu "Options | Enable Autosave…"
     or menu "Reset Autosave to Current Session" if already enabled for another session
 — Set session as “favorite” so that later you can load it faster by Ctrl+Alt + Click on SM’s button
   › make sure "Default" session is loaded, then
     Ctrl+Alt+Shift + Click on SM’s main button
 — Adjust your layout according to your favorite state, then define as default
   › menu "Layout Tools | Update Default Layout"


------------------------------------------------------


    :idea:  EXAMPLES  :idea:
// Writing in progress… To be replaced by much more evocative screenshots!!! (one day…)
 — “Default” session with Autosave assigned: listing your favorite folders (default layout used automatically)
 — “Project” session: listing only specific folders related to your project in one or two panes
 — “Photos” session with layout: single pane listing all your photo folders opened in separate tabs with thumbnails view, other pane hidden, tree and catalog hidden (to save space), and Preview opened and maximized
 — “Movies” or “Posters” sessions with layout: idem, maximize preview and minimize the rest
 — “Backup” session: full layout listing your usual source folders in one pane, and your destination folders in the other
 — “Sandboxie” session: real "%program…%" and "%user…%" locations in one pane, and corresponding sandboxed ones in the other
 — “Ebooks/Musical Scores” session with layout: Ultra-maximized layout with only one pane and tree, and maximized/enlarged preview, no menu, no tabs (one ), no catalog, addressbar next to toolbar…


------------------------------------------------------


    :idea:  MENTION OF GOOD PRACTICE  :idea:

 »»» Session Manager only edits its own files, either its own INI or its own tabsets

 »»» Precisely, Session Manager has only 2 kinds of write operations:

 • it directly edits only 1 file:
   — its own SessionManager.ini

 • it sends only 1 set of file-tampering commands to XY:
   — save/rename/delete of its own tabsets (named "§1§…" and "§2§…")
     › all this is managed directly by XYplorer itself
       (in xydata obviously since tabsets are saved in "Data\Panes" by default)

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Session Manager [v4.51 ML(5)]

Post by klownboy »

Hi again Flux, back at home again and I tried v4.51 on my desktop and have the same problem with the double lines as I mentioned in an earlier post with my laptop. The laptop is Windows 7 x64 and the desktop Windows 10 x64. Certainly nothing strange or unusual about my setup - both computers are English, no language files loaded in XY or SessionManager and were set up independently - no files ever crossed from one to the other as far as SessionManager goes. I do not use temporary sessions and I also do not have automatic saving feature on. I also converted Session Manager to UTF 8 (with BOM) and have the same result.

I stepped through the script and wasn't able to pick out what the issue is. It's apparent though that when you get to the script section where entire variable $Menu is built, that $Menu ends up with the following (as copied from "Show value" in the view variables). Obviously I'm ending up with the 2 quoted dashes accounting for the double lines.

Code: Select all

Variable: $Menu

"Normal|D:\Graphics\Icons\SessionManager_Layout.ico|1"
  global $DYN_InpSess; $DYN_InpSess = "Normal"; load("D:\Tools\XYplorer\Scripts\SessionManager.xys", "_Reset");
"   Dual - Pics and Walls|:dpv"
  global $DYN_InpSess; $DYN_InpSess = "Dual - Pics and Walls"; load("D:\Tools\XYplorer\Scripts\SessionManager.xys", "_Load");
"   Dual Vertical - Photos|D:\Graphics\Icons\image eye.ico"
  global $DYN_InpSess; $DYN_InpSess = "Dual Vertical - Photos"; load("D:\Tools\XYplorer\Scripts\SessionManager.xys", "_Load");
"   Pictures and Wallpaper|D:\Graphics\Icons\wallpaper_08.ico"
  global $DYN_InpSess; $DYN_InpSess = "Pictures and Wallpaper"; load("D:\Tools\XYplorer\Scripts\SessionManager.xys", "_Load");

"-"



"-"

"Reset Session (and Layout)|:tabsets"
  load("D:\Tools\XYplorer\Scripts\SessionManager.xys", "_Reset");
"Update Session (and Layout)|:tabsets"
  load("D:\Tools\XYplorer\Scripts\SessionManager.xys", "_Update");

"-"

"Save Session as...|:savesett"
  load(" ...
So for whatever reason the additional dash is being created between after my main menu (I have no temporary sessions or auto saves) and the reset / update menus section. I know this isn't solving the actual problem as to why the second line is being created in my situation, but would it be possible to simply have a line of code which would eliminate any adjacent double "-" before the "load($Menu, , s);" line? By that point no double lines should exists for the actual display of the menu. I put the sessions list at the bottom of the menu instead of the top and I still had 2 double lines.
Thanks for any help,
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: Session Manager [v4.51 ML(5)]

Post by Enternal »

@ klownboy
Have you tried my version of the converted script from ANSI to UTF-8/UTF-16 in the post above? I noticed that even on completely English systems, some tools have issues with converting from one encoding to another. Probably does not hurt to try it and see if there are any differences.

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Session Manager [v4.51 ML(5)]

Post by klownboy »

Hi Enternal, I had tried the UTF-8 version you posted the day you posted it on my laptop and it made no difference as far as the double lines. I hadn't tried it on my desktop computer, but I just did, and unfortunately I got the same result as the one I converted in Akelpad. Using the UTF 16 LE version wouldn't bring up the sessions that I already have (i.e., they didn't appear in the menu at all). I'm having no success yet in stripping the extra "-" before the menu displays with "load($Menu, , s);. It's probably something best handled with regex which I'm not at all familiar. I can always revert back to the previous revision as an option, but would rather not. Thanks for the suggestion.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Session Manager [v4.51 ML(5)]

Post by klownboy »

Hi Flux,
I managed to remove the second line of the 2 lines I was getting under the sessions, but it's only a fix and not actually fixing the problem. I added the first of the following lines to rid the display of the double lines.

Code: Select all

   $Menu =replace($Menu, '"-"',"" , , 1,1);  //or strip 2nd occurrence with...,2,1);
	load($Menu, , s);
As I pointed out earlier for my computers, the double lines appear with the following conditions, no temporary saves, auto save is disabled, and there are no Quick Saves. I think it may be the Quick Saves where the issue arises at least in my case. I say that because if I do a Quick Save without the added line above, the quick save is displayed correctly between the 2 lines. Well that's assuming quick saves are suppose to fall between the 2 lines. With no Quick Saves, the double lines appear. If I then go and delete the Quick save session, I get the double line again. So I'm thinking, and may be wrong, but could you look at that section of code around line 258 that works with the Quick saves and cross check that it will properly not add or result in a another line "-", if the user under all conditions has no Quick Saves?

Also I received an error message when I tried to do a Quick Save on a session (at the time I was on a session simply called "Normal" no quotes) but I think the key is that I was in a tab named "C:\" with no quotes. So the in the Rename Tab... entry is: C:\|:home The message read as follows:

Code: Select all

 Session name is invalid because it contains:  :
 --> Save under a different name.
I only received this message when performing a Quick Save and the current tab is a tab where the name contains a folder with the ":" with in the folder name.
Thanks Flux.
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

highend
Posts: 13313
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Session Manager [v4.51 ML(5)]

Post by highend »

Just as a reference how to "trim" multiple (adjacent) occurrences in /r?/n separated value lists via regex:

Code: Select all

    $a = <<<>>>
abc
-
-
-
def
ghi
-
xyz
-
-
>>>;
    $a = regexreplace($a, "(-(\r?\n|$))+", "-<crlf>");
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Session Manager [v4.51 ML(5)]

Post by klownboy »

Hi highend, thanks for the example. It's obviously more suited to take care of the double or multiple lines anywhere as oppose to a particular place in the script. The example worked fine, but I found when I placed $Menu = regexreplace($Menu, "(-(\r?\n|$))+", "-<crlf>"); in the script it did not strip out the extra line. I believe it's due to the fact that Flux's script has the dashes double quoted "-". So if you double quote the - in your example script it doesn't work. How does that change your regex statement? See the printed out variable, $Menu in my earlier post above to see the quoted dashes.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

highend
Posts: 13313
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Session Manager [v4.51 ML(5)]

Post by highend »

Code: Select all

    $a = <<<>>>
"abc"
"-"
"-"
"-"
"def"
"ghi"
"-"
"xyz"
"-"
"-"
>>>;
    $a = regexreplace($a, "(""-""(\r?\n|$))+", """-""<crlf>");
    text $a;
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Session Manager [v4.51 ML(5)]

Post by klownboy »

Thanks again highend, but that change to take into account the quoted -'s didn't work. This time I believe it's due to the fact that the code has blank lines in it and lines that are not quoted. Though I think it's just the blank line <crlf>'s with no content that cause the failure. If you take the content of the variable $Menu from my entry above http://www.xyplorer.com/xyfc/viewtopic. ... 00#p133316 and call it $a if you like and use it in your regex statement you'll see the problem (or simply add some blank lines between the "-" lines in your example to test). When I strip out the blank lines it works fine. Thanks again.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

Post Reply