Undocumented script commands - Suggestions

Discuss and share scripts and script files...
bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Undocumented script commands - Suggestions

Post by bdeshi »

Nope, TQ did that himself. :)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Undocumented script commands - Suggestions

Post by highend »

Added "exif" to

Code: Select all

get()
viewtopic.php?p=121180#p121180
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Undocumented script commands - Suggestions

Post by admin »

highend wrote:Added "exif" to

Code: Select all

get()
viewtopic.php?p=121180#p121180
I would not use "<hex value>", hex is just a number format. IMO it should be <exif tag value>, be it in decimal or hex.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Undocumented script commands - Suggestions

Post by highend »

IMO it should be <exif tag value>, be it in decimal or hex.
Ok, changed it^^
One of my scripts helped you out? Please donate via Paypal

eil
Posts: 1617
Joined: 13 Jan 2011 19:44

Re: Undocumented script commands - Suggestions

Post by eil »

it's selfish, but can somebody create a searchable help-file, 'cause at least sendkeys i insert in scripts periodically and for stupid reason each time have to look for format on forum %[
Win 7 SP1 x64 100% 1366x768

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Undocumented script commands - Suggestions

Post by bdeshi »

Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Undocumented script commands - Suggestions

Post by bdeshi »

gsm
Displays various system metrics.

Syntax

Code: Select all

gsm [index]

index     ID of the metric to display
Example

Code: Select all

  gsm 28;  // The minimum width of a window, in pixels.
    gsm 73;  // Nonzero if the computer has a low-end (slow) processor
Remarks
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Undocumented script commands - Suggestions

Post by bdeshi »

opencommandprompt
Opens a command prompt.

Syntax

Code: Select all

opencommandprompt [path], [command], [title], [flags]

path     The initial path for the command prompt.
         Defaults to the current list path.
command  The command to execute. Should be prefixed with /k.
title    The window title.
         Defaults to "<path> - Original location of this command prompt"
flags    (bit field)
         1 = Elevate (open as admin).
         Only makes a difference if XYplorer itself is not elevated.
         "command" and "title" are ignored if the prompt is being elevated.
Example

Code: Select all

  opencommandprompt;
  opencommandprompt "C:\";
  opencommandprompt , "/k dir";
  opencommandprompt "C:\", 3:=1;  //elevate (using numbered argument syntax)
Remarks
This is under development and may be changed often, and at some point documented officially.

History
  • v17.50.0219

    Code: Select all

        + Scripting got a new command.    *** UNDOCUMENTED (still beta) ***
          Name: OpenCommandPrompt
          Action: Opens a command prompt.
          Syntax: opencommandprompt [path], [command], [title], [flags]
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Undocumented script commands - Suggestions

Post by highend »

rethumb
recreates image files from the thumbnails cache.

Syntax

Code: Select all

rethumb cachepath, cachetitle, targetpath, [flags]

cachepath:  Location of cache files (dbits and dat2 file).
            You find this path here:
            Configuration | Thumbnails | Cache thumbnails on disk
cachetitle: Title of the cache files pair (dbits and dat2 file; both are needed!).
            It's always 32 character GUID, e.g. "fc2a2b5e9d46239340b1f1e88023bc32"
            The file "XYThumbs.txt" in cachepath will help you to find
            the right GUID. I kept this as a homework for you to ensure
            this wonderful command comes with a satisfying degree of
            nerdiness.
targetpath: Target folder where the images files are to be created.
            It's recommended to use an empty folder.
flags: (bit field)
            1 = Overwrite prompt (when creating the image files).
                Otherwise same-named files are overwritten without asking.
Remarks

Code: Select all

  - The main use of this command is to retrieve thumbnail versions of
    any lost original image files from XYplorer's thumbnails cache.
  - Note that XYplorer's thumbnails cache can contain also older images
    that had been long removed from the original folder. So you should get
    all your lost images and maybe even some more.
  - Each found thumbnail is stored as a separate image file under the
    original file name.
  - Image files are all saved in PNG format to ensure a lossless quality.
  - The PNG extension is appended (in CAPS) to the original filename, e.g.:
      GLB-PAR31889_2048x.jpg.PNG
    This allows you to see how the original file was called.
Example

Code: Select all

rethumb "E:\XYThumbs", "fc2a2b5e9d46239340b1f1e88023bc32", "E:\Test\reThumbed";
History
One of my scripts helped you out? Please donate via Paypal

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Undocumented script commands - Suggestions

Post by highend »

toolbar()
Customizes the toolbar..

Syntax

Code: Select all

toolbar([buttons], [size], [flags])

buttons [optional] comma-separated list of button keys. 

 missing: keep current toolbar 

 empty (""): reset toolbar to factory default buttons 

size [optional]
0: small
1: large
2: extra large
If missing: keep current setting 

flags: (bit field)
            1 = Returns all existing internal XYplorer icon names
Remarks
  • The command itself is NOT new, but the flags parameter is
Example

Code: Select all

$xyIcons = toolbar(, , 1);
History
  • Code: Select all

    The addition of the flags = 1 parameter isn't officially documented
    but it comes with v18.50.0301
One of my scripts helped you out? Please donate via Paypal

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

Re: Undocumented script commands - Suggestions

Post by klownboy »

Don recently added the new get("fvs", folder) which will return a "1" if the folder has a FVS defined and also added the view parameter get("fvs",folder, "view") to which returns the view mode (same return as get("view") but it this case returns the FVS view and "-1" if there is no FVS.

Code: Select all

 Syntax: get("fvs", folder)
      eg: echo get("fvs", "C:\Users\Donald\Desktop\Desk");
          echo get("fvs", "Desktop\Desk");
     return bit field: 1 = has FVS, 2 = Include subfolders, 4 = Match case

Code: Select all

 Syntax: get("fvs",folder, "view")
 0 = eViewDetails
 1 = eViewDetailsWithThumbs
 2 = eViewList
 3 = eViewSmallIcons
 4 = eViewThumbnails
 5 = eViewThumbnails2
 6 = eViewThumbnails3
 7 = eViewLargeIcons
 8 = eViewTiles
 9 = eViewTilesLarge
 And it will return "-1" if there is not FVS defined.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Undocumented script commands - Suggestions

Post by highend »

sysdebug
outputs <anything> to the Win32 debug output of your local system.

Syntax

Code: Select all

sysdebug <output>

While output can be anything like a string or (probably more appropriate) a variable
Example

Code: Select all

sysdebug $i; // Puts the content of $i into the debug output
History
v18.50.0210 - 2017-11-20 16:54

Code: Select all

    + Scripting got a new command.
      Name: sysdebug
      Action: Sends a string to the system debugger via API OutputDebugString.
      Syntax: sysdebug string
      Example:
        sysdebug "any string";
      Remarks:
      - SysInternals has a tool "DebugView" to view the system debugger:
        https://docs.microsoft.com/de-de/sysinternals/downloads/debugview
        It will show the sent strings in real time in a list.
      - Unicode characters are not supported due to an age old Windows bug.
        They are shown as "?".
      - This command is not officially supported (no mention in help).
One of my scripts helped you out? Please donate via Paypal

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Undocumented script commands - Suggestions

Post by bdeshi »

shellextractthumb
Displays shell provided thumbnail for files.

Syntax

Code: Select all

shellextractthumb file

file    file to show thumbnails of. Path can be real or virtual (see shellopen)
Example

Code: Select all

shellextractthumb "shell:Common Documents\Bookshelf\unix-haters-handbook.pdf";
Remarks
The thumbnail is painted onto the list view, like makecoffee.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Undocumented script commands - Suggestions

Post by bdeshi »

lognetworkaccess
Shows network access logs in a messagebox. Pops up for each log event.

Syntax

Code: Select all

lognetworkaccess [state=""|1|0]

state    1: turn on, 0: turn off. Defaults to empty value, which toggles logging
Example

Code: Select all

lognetworkaccess; // toggle logging
lognetworkaccess 0; //turn off
History
  • Introduced:
    admin wrote:Okay, let's try something now. We'll use a temporary scripting command for debugging.

    - paste ::lognetworkaccess 1 into the address bar and press enter.
    - try to go to your share
    - you should see some message box now; please copy (Ctrl+C) the contents and let me know.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Undocumented script commands - Suggestions

Post by bdeshi »

debuglogtofile
Begins saving debug logs to a logfile in <xydata>.

Syntax

Code: Select all

debuglogtofile [state=bitfield]

state    a bitfield that selects events to log
            values:
            ?   ???
            32  ???
Example

Code: Select all

debuglogtofile 32; //start logging to file <xydata>\XYLog-*.txt
History
  • Introduced in v12.90.0017 (no later than).
    admin wrote: Steps to Debug in v12.90.0017

    1. Enable debugging by entering this script via address bar:

    Code: Select all

    debuglogtofile 32;
    2. Paste a file until crash.

    3. Restart XY ( :mrgreen: ) and go to app data path and look for a newly created file called "XYLog-2013-09-20.txt".

    4. Open that file and post contents here.


    My "XYLog-2013-09-20.txt" file (no crash) looks like this:

    Code: Select all

    17:53:51.564 - paste1
    17:53:51.564 - paste2
    17:53:51.564 - paste3
    17:53:51.564 - paste4
    17:53:51.564 - paste5: 94296456
    17:53:51.564 - paste6
    17:53:51.564 - paste7
    17:53:51.564 - paste8
    17:53:51.574 - paste9: 85570184
    17:53:51.574 - paste10
    17:53:51.574 - paste11
    17:53:51.574 - paste12
    17:53:51.584 - paste13
    
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply