Page 1 of 1

Script: Call specific help topics - scripting only

Posted: 22 Jan 2024 11:07
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 285 times
Previous version(s):
Show help topics [scripting]_v0.4.xys
(16.51 KiB) Downloaded 272 times
Show help topics [scripting]_v0.3.xys
(15.59 KiB) Downloaded 309 times
ShowHelpFile:
ShowHelpFile.zip
(825.62 KiB) Downloaded 316 times
This is how the html selection output looks like:
html.png
html.png (49.8 KiB) Viewed 2674 times
This is how the inputselect output looks like:
inputselect.png
inputselect.png (7.9 KiB) Viewed 2691 times
Scanning results for ShowHelpFile.exe:
Virustotal result.png
Virustotal result.png (189.32 KiB) Viewed 2935 times

Re: Script: Call specific help topics - scripting only

Posted: 22 Jan 2024 14:49
by klownboy
Looks good highend. It's nice that you included links for undocumented scripting commands. :tup:

Re: Script: Call specific help topics - scripting only

Posted: 22 Jan 2024 19:22
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

Re: Script: Call specific help topics - scripting only

Posted: 22 Jan 2024 20:26
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...

Re: Script: Call specific help topics - scripting only

Posted: 24 Jan 2024 10:49
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...

Re: Script: Call specific help topics - scripting only

Posted: 30 Jan 2024 23:16
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)

Re: Script: Call specific help topics - scripting only

Posted: 31 Jan 2024 09:25
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)!

Re: Script: Call specific help topics - scripting only

Posted: 31 Jan 2024 10:02
by Daniel0312
great ! thank you

Re: Script: Call specific help topics - scripting only

Posted: 31 Jan 2024 16:40
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.

Re: Script: Call specific help topics - scripting only

Posted: 01 Feb 2024 10:01
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