Undocumented script commands - Suggestions

Discuss and share scripts and script files...
PeterH
Posts: 2575
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Undocumented script commands - Suggestions

Post by PeterH » 25 Mar 2015 22:58

SammaySarkar wrote:winsize
Reposition XYplorer window. Doesn't apply to maximized or minimized window.

Syntax

Code: Select all

winpos [left=0], [top=0][/quote]
Typo? Seems this should be named winpos? ([b]Corrected now[/b]  :D )

winsize is next entry :biggrin:
Last edited by PeterH on 26 Mar 2015 10:43, edited 1 time in total.
W7(x64) SP1 German
( +WXP SP3 )

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 26 Mar 2015 06:06

:tup:

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 26 Mar 2015 07:32

loadscriptfile
alias of SC load. See

Code: Select all

::help "idh_scripting_comref.htm#idh_sc_load";

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 28 Mar 2015 18:55

showshellprops
Open the Shell Properties dialog of an item.

Syntax

Code: Select all

showshellprops [item=%personalreal%]

item    a file, folder or drive
Example

Code: Select all

::showshellprops ?:\ ; //show properties of XYplorer's parent drive
Remarks
This is analogous to calling SC property() with empty property parameter, (eg, ::property( , ?:\); )
except this SC defaults to a different item, and has no return parameter.

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 28 Mar 2015 19:01

wmcopydata
Display detailed information of last data sent to XYplorer as a wm_copydata system message.

Syntax

Code: Select all

wmcopydata

no known parameters
Example

Code: Select all

::wmcopydata;
Remarks
This command displays a non-editable text box with source window handle, data ID (dwData parameter of copydata), data length, and hexdump of the data.

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 29 Mar 2015 20:02

escapeunicode
convert and display unicode characters in the *U+xxxx hex unicode notation.

Syntax

Code: Select all

escapeunicode string

string    text to convert
Example

Code: Select all

 escapeunicode "Lucy in the sky with ♦"; //shows a msg with "Lucy in the sky with *U+2666"
Remarks
Command now deprecated: viewtopic.php?f=3&t=16608&p=158562#p158562

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 29 Mar 2015 20:11

Undocumented parameters of the get() function:

get()

Syntax

Code: Select all

get(info, [param1], [param2])
Undocumented possible values for info, param1 and param2:
  • "Assoc", [type=<curitem>]
    Returns first associated program for a file type.
    type is the file type to detect association of. Can be a extension (with or without the dot), or path to a file/folder.
    Defaults to <curitem>.
  • "ClipboardDropEffect"
    Returns drop effect, or pasting method, of the system clipboard's current content.
    Return value is a bit field.

    Code: Select all

    fdDropEffectNone = 0
    fdDropEffectCopy = 1
    fdDropEffectMove = 2
    fdDropEffectLink = 4
  • "ClipboardFormats", [sep="|"]
    Returns data formats/types of the system clipboard's current content, separated by "sep".
  • "Columns"
    Returns current list's columns, with '+' prefix to denote visibility, and pixel width prefixed with a '.'.
    Equivalent to the return of ::setcolumns(,3);
  • "ColumnWidth", [column="Name"]
    Returns width of specified column.
  • "DebugLog"
    Returns internal debug log as a string. The log is populated using SC logchange
  • "EXIF", <exif tag value>, [<file name>]
    Returns EXIF properties for image files (e.g. jpg, jpeg).
  • "FVS", folder, "view"
    Returns the Folder View Settings view mode (same return as get("view") but it this case returns the FVS view and "-1" if there is no FVS. More Info: viewtopic.php?f=7&t=13582&start=75#p158075
  • "GenericFileType", type, [sep=<crlf>]
    Returns a sep-separated list of file extensions included in generic file types template "type".
  • "Help"
    Returns path to the help file.
  • "LoadTimes"
    Returns detailed loadtime information as a string. Loadtime is the total time taken to initialize various program features during startup.
  • "Locale", info
    Returns various info regarding current system locale and regional settings. info is an integer between 1 and 123 inclusive.
  • "Network"
    Displays a list of available servers.
  • "PIDL", [devicepath=<curitem>], [param2]
    Returns PIDL of given devicepath (can be retrieved with ::get('pdpath')). param2: PIDL format (encoding? bitfield?)
  • "PIDLName", [devicepath=<curitem>], [param2]
    Returns name from PIDL of given devicepath.
  • "PIDLPath", [devicepath=<curitem>], [param2]
    Returns path from PIDL of given devicepath.
  • "PDPath", [device=<curpath>], [param2]
    Returns unique device path to portable devices. param2: path format (bitfield?)
  • "RS", [length=8], [characters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"]
    Returns a random string of specified length, made out of given characters.
    length can also be given as a "min-max" range for a random length, e.g. "8-12". Default length is 8, and maximum is 32768.
    characters is a string of characters from which the returned string is built, and it defaults to "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".
  • "SpotPatterns", [pane="a"]
    Returns last used spot patterns of either pane.
    The "pane" argument can be: a = [default] active pane, i = inactive pane, 1 = pane 1, 2 = pane 2.
  • "SysColor", [index=0], [format=0]
    Returns a color from system color palette by index. index corresponds to this table.
    format 0 returns hex color, 1 returns decimal color (as used in <xyini>), 2 returns 6-char padded hex color.
    These sys colors are defined in Windows' advanced theme color settings and listed in HKCU\Control Panel\Colors.
  • "TargetItems", [separator=<crlf>]
    Returns the full paths of all target items of the last file operation (copy, move, backup, create new, add to paper folder).
Examples:
  • Code: Select all

     text get("assoc", "rar");
     text get("assoc", "<xyini>");
     text get("assoc", "<xydata>");
     text get("clipboarddropeffect");
     text get("clipboardformats", <crlf>);
     text get("columns");
     text get("columnwidth", "created");
     text get("debuglog");
     text get("exif", 0x9003, <curitem>);
     text get("fvs", "C:\Users\Donald\Desktop\Desk");
     text get("genericfiletype", "{:Text}", "|");
     text get("help");
     text get("loadtimes");
     text get("locale", 4);
     text get("pdpath", "Nexus 10");
     text get("pidl", text get("pdpath", "Nexus 10"));
     text get("spotpatterns", "i");
     text get("rs", 16, "0123456789ABCDEF");
     text get("rs", "4-12");
     text get('syscolor', 3); // inactive titlebar color
     text get("targetitems", "|");
    

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 30 Mar 2015 14:24

attaching detailed history tends to make posts unnecessarily long. I think links to beta release notes can suffice, with a short description of what changed in the post's history section.

TheQwerty
Posts: 4353
Joined: 03 Aug 2007 22:30

Re: Undocumented script commands - Suggestions

Post by TheQwerty » 30 Mar 2015 15:27

SammaySarkar wrote:attaching detailed history tends to make posts unnecessarily long. I think links to beta release notes can suffice, with a short description of what changed in the post's history section.
Who cares about the length?

If you want to document that which is not documented, not documenting is an odd approach.

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 30 Mar 2015 15:43

these are more like descriptions, not detailed historical analyses! :kidding:

Online
binocular222
Posts: 1410
Joined: 04 Nov 2008 05:35
Location: Hanoi, Vietnam

Re: Undocumented script commands - Suggestions

Post by binocular222 » 31 Mar 2015 03:16

How did you find out all that suff? Digging beta history?
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 31 Mar 2015 18:27

that, and obscure forum posts, and some luck, and ...

Filehero
Posts: 2283
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Undocumented script commands - Suggestions

Post by Filehero » 31 Mar 2015 21:07

SammaySarkar wrote:..., and ...
:whistle:

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 03 Apr 2015 13:46

:wink:

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 20 Apr 2015 13:39

[undocumented parameters]
echo
Shows a simple message box.

Syntax

Code: Select all

echo text, [topic], [notes], [icon]

text     the text to be displayed
topic    topic line, printed in bold at the top. Defaults to "Echo"
notes    notes line, printed under topic text
icon     icon displayed at the top-left corner. Default is 6
Example

Code: Select all

::echo 'Hi!';
::echo "where did the color go?",,, -1; //no icon
::echo "Job done!", "Complete",, 0;
::echo "Job failed!", "Warning",, 7;
::echo 'What you seek is seeking you.',''; // plain text messagebox
Remarks
The echo message is shown in an iconless and plain window if topic is an empty string.
color of topic text depends on icon. This table shows the relationships:

Code: Select all

code  icon               topic color
----------------------------------------
<0    no icon            black
 0    checkmark          green
 1    minus bubble       red
 2    customcopy icon 1  blue
 3    customcopy icon 2  blue
 4    warning circle 1   orange
 5    question bubble    blue
 6    info bubble        blue   [default]
 7    warning triangle   black
 8    black crossmark    black
 9    warning circle 2   blue
 >9   error ladybug      red
For <0 (no icon), The icon's space is not preserved either.
For >9 (error), topic & notes are printed much larger, and they will overlap.

Post Reply