Script: Call specific help topics - scripting only

Discuss and share scripts and script files...
Post Reply
highend
Posts: 13333
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Script: Call specific help topics - scripting only

Post by highend »

This is the "little" brother of: viewtopic.php?t=9248

It's only there to get fast access to commands / functions of the XYplorer scripting language (and NOT to all other topics of the help file)

With the default configuration it'll show all entries as a html page for easier finding a command...

Initial setup
Place the Show help topics [scripting].xys in your XYplorer script folder.
To get there you can e.g. use: Menu | Scripting | Go to Scripts Folder

The external "ShowHelpFile" tool exists to navigate to scripting commands by reusing only one chm window instance
instead of opening multiple windows each time you use the script to show another help entry.
To use it download the ShowHelpFile.zip attachment, extract it and place
ShowHelpFile.exe & ShowHelpFile.ini (together) wherever you like (but NOT in a UAC protected folder)
ShowHelpFile.exe is detected as a trojan by some anti-virus engines. Ofc this is a false-positive
If you still don't trust it, don't download or use it!

Open the ShowHelpFile.ini with a text editor and adapt the path to your XYplorer.chm file
If you want to let the chm window appear somewhere else, edit the other values in that file as well.

Now execute Show help topics [scripting].xys once.
It will write an .ini file into its directory: Show help topics [scripting].ini
Edit that file and adapt the ExtViewer= entry if necessary
ExtViewer=D:\Tools\XYplorer\@Tools\ShowHelpFile\ShowHelpFile.exe

Running it
Now run the script again and everything should work as expected...
If not, post in this thread and show where you've copied all the files and what you've changed in the two .ini files^^

To gather all available script commands the XY .chm file is extracted.
This happens only when a new XY version is detected or the LastVersion=
entry in the Show help topics [scripting].ini file is empty.
If you want to forcefully initiate the redetection of all script commands:
- Clear the LastVersion= value
or
Run the script like this once (assuming that it is in your standard XY scripts path):

Code: Select all

perm $P_SHOW_HELP_TOPICS_SCRIPTING_UPDATE = true;
    load "Show help topics [scripting].xys";
Current version:
Show help topics [scripting]_v0.5.xys
(18.79 KiB) Downloaded 63 times
Previous version(s):
Show help topics [scripting]_v0.4.xys
(16.51 KiB) Downloaded 54 times
Show help topics [scripting]_v0.3.xys
(15.59 KiB) Downloaded 92 times
ShowHelpFile:
ShowHelpFile.zip
(825.62 KiB) Downloaded 67 times
This is how the html selection output looks like:
html.png
html.png (49.8 KiB) Viewed 541 times
This is how the inputselect output looks like:
inputselect.png
inputselect.png (7.9 KiB) Viewed 558 times
Scanning results for ShowHelpFile.exe:
Virustotal result.png
Virustotal result.png (189.32 KiB) Viewed 802 times
One of my scripts helped you out? Please donate via Paypal

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

Re: Script: Call specific help topics - scripting only

Post by klownboy »

Looks good highend. It's nice that you included links for undocumented scripting commands. :tup:
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

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

Re: Script: Call specific help topics - scripting only

Post by highend »

v0.2 added (you need to download the inital version too if you want to use the external viewer tool!)
Added the option to define the height of the inputselect dialog window via the .ini
One of my scripts helped you out? Please donate via Paypal

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

Re: Script: Call specific help topics - scripting only

Post by highend »

v0.3 added (and v0.2 removed)

The HTML now has a link at the bottom #Show inputselect...
It lets you switch to the inputselect dialog

The dialog itself has an entry at the top #Show HTML...
...
You can switch as often between both views until you select an entry or close any of them...
One of my scripts helped you out? Please donate via Paypal

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

Re: Script: Call specific help topics - scripting only

Post by highend »

I've attached a new ShowHelpFile.exe .zip (it includes the .ini file).

The .exe is signed and Microsoft doesnt't think it's malware anymore...
One of my scripts helped you out? Please donate via Paypal

Daniel0312
Posts: 154
Joined: 15 Feb 2016 10:48

Re: Script: Call specific help topics - scripting only

Post by Daniel0312 »

hi highend
I love this script and use it all the time ! So user friendly. Thank you.
Just noticed there's at least one command missing » getpathcomponent(), gpc()
and one too much » preview64 (one is from the change log, the other from the help file)
Daniel
Windows7 SP1 x64 / XY latest stable

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

Re: Script: Call specific help topics - scripting only

Post by highend »

All fixed :tup:

Code: Select all

Changes for v0.4:
getpathcomponent / gpc & interfacecolors / ifc aliases are added
getinfo aliases points to the correct new get section (for XY >= 24.00.0104)
preview64 removed from the "Undocumented" .ini section
Before you run v0.4, delete its belonging .ini file (normally: Show help topics [scripting].ini)!
One of my scripts helped you out? Please donate via Paypal

Daniel0312
Posts: 154
Joined: 15 Feb 2016 10:48

Re: Script: Call specific help topics - scripting only

Post by Daniel0312 »

great ! thank you
Daniel
Windows7 SP1 x64 / XY latest stable

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

Re: Script: Call specific help topics - scripting only

Post by klownboy »

Thanks for another update highend. I made a personal preference type change for the non-HTML listing such that the option to switch to the HTML version is at the bottom of the list. Which is similar to the way it is on the HTML version. I really don't need to see that option on the top of the list, and it's really not something a user is going to change that often to warrant a top of list position. I also got rid of the line numbers "4096" since I really don't need to see them. :)
$cfgContent = $cfgContent . <crlf 2> . $entry;

Thanks again.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

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

Re: Script: Call specific help topics - scripting only

Post by highend »

v0.5 released

Code: Select all

Added:
- LinkPosHTML & LinkPosInput keys (in the [General] section) added
   Both use "bottom" as their default value.
   If you want any of them to show at the top, use "top" instead
- LineNumbersInput key (in the [General] section) added
   The default is true / 1
   If you don't want to see line numbers in the non-HTML dialog window, set it to false or 0
- Missing .ini values (because of new released script versions) are now added to the .ini file through the script
   No more doing this by hand
- Various small tweaks and corrections
One of my scripts helped you out? Please donate via Paypal

Post Reply