David - that is the first line on lxp's button. Can you explain what you thing the problem is?
That line was added to lxp's button by Directory Opus.
Somehow the button was set to Script Function and then was changed to Standard Function.
When the button was changed, Directory Opus added the line @script JScript.
Try removing that line.
Does it work then ?
Thanks - I don't know much about scripting. The JScript line looks like it was added when I switched back and forth between Standard and Script trying to fix it.
Using freshly pasted versions of lxp's Cycle button and the 'test' button he attached above, and confirming that neither have the "@script JScript" included in the code, I still get nothing when clicking either button.
I'm beginning to think that lxp is right and there is something wrong with my Windows installation. If anyone has any idea how to check or where to start I'd appreciate it.
Ensure that the script has properly installed.
Settings > Scripts
SaveLayoutsAsVars should be in the list.
I appreciate all of the attempts to help with this! The script is installed in the right location and status shows 'OK' in the script management window.
Don't worry about the script if the SysInfo test button doesn't work.
What you could try to repair:
- Install all Windows updates
- Backup/uninstall/install Opus. Try the button before restoring the backup
- Run Windows System File Checker (SFC): Execute
sfc /scannowfrom a command line.
If this doesn't fix it it might be less effort to wipe the system and start with a fresh Windows installation.
I figured out what the issue was related to the script, and the Cycle through Layouts works now! Posting here in case someone else runs into this in the future. I was reviewing my Layouts and found two layouts that showed they had zero listers! I think this is an artifact of a prior computer that got carried forwarded. Once I deleted both of those it works perfectly! This is really useful. Thank you lxp!
Unfortunately, I still can't figure out why the "Hi" does pop up in the test script.
Click the version info with your mouse.
The script log then shows "Hi" .
Glad you don't have to start over with a new Windows installation ! ![]()
This is such a great script, re-thank you very much
@lxp I've been using it daily ever since and it's has been a huge time saver in my workflows.
I was wondering, is it correct that the script cycles through all the saved lister layouts?
For example:
Let's say I would like to have specific lister layout that auto launches when I connect an external USB drive on occasion. What I'm trying to achieve in a bit more detail:
I wouldn't want that lister layout to be included in saved layouts cycle list when the drive is not connected, as that would clutter cycle list I use very often too much. Hence why I would like to exclude these layouts from the cycle list.
I did find how to hide/grey out a specific saved lister and still be present in the saved lister layouts list so they can be activated when needed or when the drive gets connected again...
However this doesn't seem to exclude the hidden lister from the cycle button list?
I didn't even know layouts could be hidden ![]()
Detecting hidden layouts seems to be straightforward. Try this new version:
EventSaveLayoutsAsVars.js.txt (2025-10-03)
Thank you! From my testing the updated version does hide the hidden Layout ('Time Storms') in the Menu bar > Settings > Lister Layouts > Saved Layouts list.
Though using the command button to cycle through the (unhidden) Saved Layouts still triggers the hidden Layout at some point when doing a full list cycle.
Please check the first lines of the .oll files in /dopusdata\Layouts.
Do the lister_layout tags contain anything other than:
<lister_layout flags="192">
or
<lister_layout flags="224">
Yes they do,
The visible/unhidden Layouts show:
<lister_layout flags="193">
The hidden Layout ('Time Storms', in my case, as in the screenshot above):
<lister_layout flags="225">
I see. Let's replace
if (xmlText.indexOf('<lister_layout flags="224">') > 0) continue; // Layout is hidden
with
if (xmlText.indexOf('<lister_layout flags="22') > 0) continue; // Layout is hidden
Admittedly, a bit pragmatic ![]()
But very effective! ![]()
With this change the hidden Layout is now indeed excluded from the full list cycle and reincluded in the button cycle when under 'Edit Layout' I uncheck 'hide this layout from layout list'
Also tried with other saved Layouts from my list and it all seems to work beautifully!
Thank you very much @lxp for your efforts ro get this working and for sharing your magic
![]()

