Undocumented script commands - Suggestions

Discuss and share scripts and script files...
klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Undocumented script commands - Suggestions

Post by klownboy »

Hi Sammay, true DUAL isn't a command but a goto 'location' format. 'Command' in the case of this new thread could be more generic. It's seems like a case of semantics especially since 'goto' is listed in the scripting command reference, personally I think it could be listed as a 'goto' add-on instead of relegated to a lowly Easter Egg.

@Stef123 DUAL works great with Favorite Folders :tup:
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Stef123

Re: Undocumented script commands - Suggestions

Post by Stef123 »

klownboy wrote:@Stef123 DUAL works great with Favorite Folders :tup:
Yes, in fact it was me who asked for it, although at the time I had hoped for a more user-friendly dialog to match the easy way of other managers. It takes a lot of clicks and I always have to look up my personal cheat sheet to enter dual locations.

It is for those reasons that I stopped using DUAL it in favor of SessionManager, which is almost the same, although I don't always want to replace the whole tabsets, which is why my SessionManager dropdown bursts beyond manageable scope. And just like catalog it takes considerable mouse travel on a hi-res wide-screen, whereas favfolder pop up at gunpoint wherever I need them. Well, time to warm up an old wish of mine - in a separate topic.

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

Re: Undocumented script commands - Suggestions

Post by bdeshi »

comparehash
calculate hash of a file and compare it with clipboard.
Result is displayed in a popup dialog.

Syntax

Code: Select all

comparehash [algo="md5"], [file=<curitem>]

algo    One of the following:
        crc32, md5, sha1, sha256, sha512
        NOTE: SHA-256 is NOT supported on all systems.
file    file to be hashed.
Example

Code: Select all

 ::comparehash sha1, <xy>;  // pop up calculated sha1 hash of XYplorer.exe (and compare with clipboard)
Remarks
There are 4 possible outcomes, depending on what's in clipboard:
1) clipboard is a hash, and the file's hash matches: "MD5: Match - Hash matches clipboard."
2) clipboard is a hash, and the file's hash matches NOT: "MD5: No Match - Hash does not match hash in clipboard."
3) clipboard contains a hash *somewhere*, and the file's hash matches this: "MD5: Match - Hash is contained in clipboard."
4) nothing in the clipboard matches: "MD5"

History
  • v9.70.0026 - Introduced algo parameter.
    Syntax is now: comparehash [algo="md5"], [file=<curitem>]; (src)
  • v9.70.0011 - Introduction.
    Syntax is: comparehash [file=<curitem>]; (src)
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 »

sysicons
Pop up a list of various system icons.

Syntax

Code: Select all

sysicons [category=0], [iconsize=1]

category    Icon categories to display. One of the following:
            0    icons in the System Image List (aka Shell Icon Cache)
            1    icon overlays
            a    attributes overlays

iconsize    One of the following:
            0    32x32 (large)
            1    16x16 (small)
            2    48x48 (extra-large)
            3    16x16 (small)
            4    256x256 (jumbo)
Example

Code: Select all

 sysicons, 0;  //list shell-cached 32x32 icons
Remarks
Relation between iconsize and displayed icon size might depend on current OS.
Besides the values listed for iconsize, any other integer value will show 16x16 icons, and any other string value will show 32x32 icons.

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

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 »

SammaySarkar wrote: Remarks
This command is buggy.
iconsize is not evaluated if category=1. last iconsize used with category=0 is used.
Besides the values listed for iconsize, any other integer displays iconsize 0x0 (), and any string displays iconsie 32x32 (large)
Fixed in next beta. :)

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

Re: Undocumented script commands - Suggestions

Post by bdeshi »

info
Displays the Various Information dialog (Help > Various Information)

Syntax

Code: Select all

info
Example

Code: Select all

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

PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Undocumented script commands - Suggestions

Post by PeterH »

By the way: often I read "introduced". But this seems to be a bit dangerous.

Introduced seems the be the XY version when a command/function was defined. But several commands had quite some changes over time - so I think something like "last version" would be quite neccessary.
(Example: "increment" or "$a=$i++" :arrow: before v14.30.0100 the value was incremented before the variable was used - later vice versa.)
W7(x64) SP1 German
( +WXP SP3 )

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

Re: Undocumented script commands - Suggestions

Post by bdeshi »

I noticed that. Maybe I should remove that altogether. ed. or this can be expanded to command's biography! [thanks TheQ! :tup: ]
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 »

Thanks for all the suggestions. I'm currently spending a week in Denmark but will be back tomorrow. I'll add everything probably on sunday.
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 »

deletefile
Silently delete a file, without confirmation, skipping recycle bin. Handle with caution.

Syntax

Code: Select all

deletefile file

file   full path to a file
Example

Code: Select all

::deletefile inputfile("%TEMP%",, "Pick a file to remove")
Remarks
file must be the full path to a file. Relative paths are not supported. Folders are not accepted.

SC DeleteFile simply wraps Windows API DeleteFile (and thus can be used e.g. to delete ADS Alternate Data Streams). Cf. https://msdn.microsoft.com/en-us/librar ... 85%29.aspx
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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 »

FYI, SC DeleteFile simply wraps Windows API DeleteFile (and thus can be used e.g. to delete ADS Alternate Data Streams). Cf. https://msdn.microsoft.com/en-us/librar ... 85%29.aspx

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

Re: Undocumented script commands - Suggestions

Post by bdeshi »

logchange
Generate logs for various app/file-system actions and operations. Intended for debugging.
Syntax

Code: Select all

logchange [mode=0]

mode   one of the following
       0 turn off logging
       1 log some actions [which actions?], display each log entry instantly
       2 log some actions [which actions?], display each log entry instantly
       3 ???
       4 ???
       5 log actions [all?] internally only, do not display
       ? ???
Example

Code: Select all

::logchange 5;
Remarks
Details are sketchy :whistle:
the setting is restricted to current XYplorer session only. The applied mode is forgotten and logging turned off when XYplorer is closed/aborted.
generated log can be retrieved using the get() function's "debuglog" parameter. Eg, first do ::logchange 5; , then perform some file/app actions (such as rename) to build a log, then do ::text get("debuglog");

Introduced very long ago

See Also
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 »

winpos
Reposition XYplorer window. Doesn't apply to maximized or minimized window.

Syntax

Code: Select all

winpos [left=0], [top=0]

left   [X] new position of window's left edge, in pixels, relative to left edge of screen
top    [Y] new position of window's  top edge, in pixels, relative to  top edge of screen 
Example

Code: Select all

::winpos 0, 0; //move to top-left of screen
::winpos get(screen,width)/2, get(screen, height)/2; //move window to the bottom-right quandrant of screen
Remarks
Negative left and top values move window's left and up respectively.
left and top are apparently not limited at all. So it's possible to set weird window positions such as -99999,-99999 or 99999,99999.
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 »

winsize
Resize XYplorer window. Doesn't apply to maximized or minimized window.

Syntax

Code: Select all

winsize [width=0], [height=0]

width   new width  of window, in pixels
height  new height of window, in pixels
Example

Code: Select all

::winsize 420,800;
::winpos 0, 0; winsize get(screen,width), get(screen, height); //psuedo-fullscreen
::winsize 700, 0; //roll-up window
Remarks
width and height are implicitly limited to screen width and height. Greater values are automatically trimmed by the OS.
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 »

comment
Add comment tags to items.

Syntax

Code: Select all

comment [value=""], [items=<curitem>]

value   Comment tag value
        if empty: remove comment.
items   |-separated list of items (full path) to tag;
        if empty then current list selections are tagged
Example

Code: Select all

::comment "The best file manager!", <xy>;
::comment "settings data files", "<xydata>\ks.dat|<xydata>\fvs.dat";
::comment "", "<focitem>"; //remove focused item's comment
Remarks
Comments can have line breaks. Use <crlf>, or this character: ¶, to add one.

History
  • v7.90.0123 - 2009-02-16 13:01 - Introduction [citation needed][guessing added along with SC tag]
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply