Undocumented script commands - Suggestions

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

Re: Undocumented script commands - Suggestions

Post by klownboy » 14 Mar 2015 13:24

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:

Stef123

Re: Undocumented script commands - Suggestions

Post by Stef123 » 14 Mar 2015 13:39

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.

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 17 Mar 2015 15:58

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 ]

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 17 Mar 2015 16:29

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

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
  • v15.00.0112 - 2015-03-17 18:28 - bugfixes (src)
  • v9.10.0014 - Introduction
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 48685
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Undocumented script commands - Suggestions

Post by admin » 17 Mar 2015 17:30

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. :)
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Wear DIY masks! 😷

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 17 Mar 2015 18:37

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: 2583
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Undocumented script commands - Suggestions

Post by PeterH » 18 Mar 2015 00:42

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 )

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 18 Mar 2015 05:20

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: 8675
Joined: 06 Feb 2011 00:33

Re: Undocumented script commands - Suggestions

Post by highend » 20 Mar 2015 09:17

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 or highend (at) web (dot) de

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 24 Mar 2015 15:35

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: 48685
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Undocumented script commands - Suggestions

Post by admin » 24 Mar 2015 15:48

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
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Wear DIY masks! 😷

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 24 Mar 2015 16:13

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 ]

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 24 Mar 2015 16:31

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 ]

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 24 Mar 2015 16:32

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 ]

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 24 Mar 2015 16:41

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