admin wrote:TheQwerty wrote:<xylng> Path and filename of the language file currently in use.
If none has been selected then it should either be blank or the URL to the latest (for that XY vers) reference file.
The latter would be nice in the case of needing to retrieve the English translation of say menu captions including access keys.
Hmm, I don't think scripting should mess with language files. Do you have an example for your needs? I maybe can add better ways to spill out menu captions including access keys.
The variable would really only eliminate reading it from Language.ini; probably after forcing a settings save to ensure its accuracy.
It was something I ran into when attempting to solve this
Application button main menu replacement request. The problem being I can get a list of commands and reconstruct the menu from copying the "List of All Commands" but if I want the access keys included in the captions I either have to extract the English ones from XYplorer.exe (I previously used strings.exe here) or I could possibly get them from the language file so that they're translated as well.
I'm not so much interested in messing with language files, but reading them could be useful, and might provide the capability of more easily offering scripts with "loose" translations.
That said if there were a better way to retrieve the menu / list of commands it could eliminate my needs entirely.
Off the top of my head, maybe something like this?
Code: Select all
CommandReport([template], [query=All], [flags=0]);
Template:
{CID} Command ID
{Category} CKS Category / Main Menu
{Path} {Category} | [Submenus |] {Command}
{Command} Command name only.
{Description} Description as shown in CKS.
{Shortcuts} Keyboard shortcuts.
{Scope} Shortcut scope.
{MenuCaption} Menu caption for command.
{Checked} 1 = Menu items is checked; 0 = not checked, checkable, or in menu.*
{State} 1 = Command is currently enabled; 0 = disabled.*
Defaults to the List All Commands format: "{CID}<tab>{Path}<tab> ({Shortcuts})<crlf>"
Query:
"All" or "*" (Default) Retrieves all commands.
Category / main menu name. Retrieves only the commands in a given category.
#CID Retrieves only the command specified by CID.
#CID,CID Retrieves only the commands specified by CIDs.
#START-END Retrieves the range of commands specified by CIDs.
Flags:
0 (Default) Return all matching commands.
1 Return only commands with keyboard shortcuts.
* I realize these may be pushing my luck.
Something like that would be much better, but it's probably quite a bit more work than just exposing the language file via variable.
EDIT: Also care to comment on this previous post?
http://www.xyplorer.com/xyfc/viewtopic. ... 752#p83752