Undocumented script commands - Suggestions

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

Re: Undocumented script commands - Suggestions

Post by klownboy »

userbutton
Emulates a click on a custom toolbar button.

Syntax

Code: Select all

userbutton index, [action=1]

index    Index number of a user button.
action    the action to perform
          0    do nothing
          1    left-click
          2    right-click
          128  open the "Edit User Button" dialog.
Example

Code: Select all

 userbutton 14, 128;  //opens the Edit User Button dialog for ctb14.
Remarks
This command is similar to the (documented) button command, but userbutton is exclusive to CTBs.
Note that using userbutton you can also trigger buttons that are not part of the current toolbar! The command can become useful in the context menu definition of User Buttons. E.g., you can wrap a number of rarely used buttons into the context menu of a single button and thus save space on the toolbar.

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

Re: Undocumented script commands - Suggestions

Post by binocular222 »

Code: Select all

Makecoffee [file], [x], [y], [maxwidth], [maxheight]
    Display specific image on the current pane. Call again will not dismiss the previous image.
    file:  path to an image file, resolved relative to <xyscripts>. If omitted then a cup of coffee is displayed. If empty ("") then all makecoffee images are removed.
    x:    X position; randomized if missing
    y:    Y position; randomized if missing
    maxwidth:   maximum width to fit
    maxheight:  maximum height to fit
    Notes:   Arguments "maxwidth" and "maxheight" are only applied if "file" is passed.
    Example:
        makecoffee "<xyscripts>\katy.png", , , 200, 150;
        makecoffee;    //Display a cup of coffee
        makecoffee "";    //Hide katy.png and that cup of coffee
Since v13.90.0107 - 2014-04-12 http://www.xyplorer.com/xyfc/viewtopic. ... 31#p103031
I'm sad that Don no longer allow [stretch] and [rotate]

==========
I think the above format is shorter and easier to read (and Don may just copy-paste it to his .chm help)

Someone write about cell() pls. http://www.xyplorer.com/xyfc/viewtopic. ... 24#p113307
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar »

row()
Returns row number of a file or folder in active tab.

Syntax

Code: Select all

row(item)

item      full name or path of an item in current list
Return
row number of passed item. If item cannot be found in current tab, 1 is returned.

Example

Code: Select all

echo row(<curitem>); //display row number of selected item
History See Also
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar »

cell()
Return various positional coordinates of a cell in the filelist, in pixels.

Syntax

Code: Select all

cell(row, column, data, [flag=""])

row         a row number where the cell is located. This not limited to the displayed rows, nor availlable screen area.
column      title or numeric ID of a column. Column may be inactive or out of visible area.
data        type of coordinate or dimension to return.
            Vertical and horizontal positions are calculated relative to the left and top edge of display area, respectively.
            x             x-position. Equivalent to l
            y             y-position. Equivalent to t
            w or width    width
            h or height   height
            t or top      position of top edge of cell
            r or right    position of right edge of cell
            b or bottom   position of bottom edge of cell
            l or left     position of left edge of cell
flag        pass 1 to return position relative to screen. Else app-internal position. This is not effective on w and h.
Return
Return the value of passed data parameter.

Example

Code: Select all

 text  ' w:'.cell(1, "Name", "w").' h:'.cell(1, "Name", "h"); //display width and height of the "Name" column

Code: Select all

 $x = cell(6, "Name", "x", 1);
 $y = cell(6, "Name", "b", 1);
 popupmenu("dummy|menu", $x, $y); //popup a menu on the Name column, and below the name of the 6th list item (the 6th row)
Remarks
In details view mode, each file/folder is displayed in a row, and each row is divided into one or more cells, one for each column.
If flag is set as 1, then x, l,r positions are relative to left edge of screen display area, and y,t,b positions are relative to top edge of screen display area.
The pararmeter columnname only accepts column titles, not column IDs. Moreover only factory default columns are accepted [citation needed]. If the column is inactive, then it's last position in the column layout is used. (this can be verified using this script ::text setcolumns(,3); )

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

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar »

screen
Pop up a dialog with detailed display information.

Syntax

Code: Select all

screen
Example

Code: Select all

screen;
Remarks
This command is only intended debug and troubleshooting. Like other debug SCs, this is liable to disappear any time.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar »

getinfo()
Alias of SC get(). See

Code: Select all

::rtfm "idh_scripting_comref.htm#idh_sc_get";
History
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar »

help
Alias of rtfm. See

Code: Select all

::rtfm "idh_scripting_comref.htm#idh_sc_rtfm";
Introduced v11.90.0206
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar »

tweak()
Tweaks an internal setting (a setting without config UI), and returns the old value. The change is effective immediately.

Syntax

Code: Select all

tweak(key, [value])

key     a supported tweak key, case-insensitive.
value   missing   current key value is shown in the statusbar.
        ""        toggles value between 0 and 1, or resets to default. Depends on the key.
        Anything else is set as new value. Depends on the key.
Return
Returns previous value for toggle-able tweaks. In case of other tweaks, nothing is returned.
Current tweak status is always displayed on the status bar.

Example

Code: Select all

 tweak("TAFTimeout", 500);   //sets the key value to 500
 tweak("TAFTimeout", 10000); //sets to maximum value 5000
 tweak("TAFTimeout");        //look at the statusbar
 tweak("TAFTimeout", "");    //resets to 750
 echo tweak("ContextMenu64", ""); //toggles the key and returns last value
 echo tweak("ContextMenu64");     //returns last, and in this case, current value of the key

Remarks
supported keys: [last updated: 1-Jun-2018]

Code: Select all

ContextMenu64
TAFTimeout
SimpleDrag
ScriptStrictSyntax
ShowFolderCounts
GenericIconsForNetworkLocations
AutoOptimizeCatalog
ListNoAutoScrollOnPaste
InterpolationMode  // this now "pipes" to HighQualityImageResamplingInterpolationMode
The following keys were supported in the past but are no longer effective.
olefixfix
MDBUPdfLarge
NetworkNetServerEnum

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

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

Re: Undocumented script commands - Suggestions

Post by binocular222 »

In my memory there was something about DUAL, related to Scripting or maybe Addressbar. Anyone confirm?
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

Stef123

Re: Undocumented script commands - Suggestions

Post by Stef123 »

You dont mean favorite folders, do you?

Code: Select all

2nd pane activated: DUAL:2.C:\||D:\
Only the first pane: DUAL:E:\||
Only the second pane: DUAL:||E:\
Format only (large icons): DUAL:>>7||>>7
prompt for a tabset for each pane: DUAL:tabset();||tabset();
load tabsets right away: DUAL:tabset("load", "Bat");||tabset("load", "Man");

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

Re: Undocumented script commands - Suggestions

Post by klownboy »

Yes binolcular222, I almost forgot about DUAL. It's a good one.

Code: Select all

v12.50.0005 - 2013-06-19 14:21
    + Dual Locations: Experimentally added a new location format called 
      "Dual Locations". Going to a DLOC means that both panes are set to a 
      new location, and dual pane mode is activated (if not already 
      active). A DLOC has its own icon (the toolbar icon for vertical 
      Dual Panes). The format optionally takes a couple of list 
      configuration parameters.
      General Format:
        Just paths:
          DUAL:Path1||Path2
        With prefixed pane to be activated:
          DUAL:2.Path1||Path2
        With settings:
          DUAL:2.Path1>>Settings1||Path2>>Settings2
      Examples:
        Just paths:
          DUAL:C:\||D:\
        Also Quick Searches and Visual Filters work:
          DUAL:C:\?*.sys /f||D:\|a
        Also possible without paths (= applied to current paths):
          DUAL:?a* /f|||*.txt
        With prefixed pane to be activated:
          DUAL:2.C:\||D:\
        With view mode (Details = 0 ... Thumbs #3 = 6, Large Icons = 7):
          DUAL:1.C:\>>3||D:\>>2
        With view mode, sort order, and list style (well, sort order and 
        list style are cryptical techno values, so probably only useful 
        for internal use):
          DUAL:1.C:\>>3,-65536,1335||D:\>>2,-32766,1335
        Only the first pane:
          DUAL:E:\||
        Only the second pane:
          DUAL:||E:\
      Notes:
        - DLOCs can be used anywhere just like normal locations. 
          Exception: You cannot use them recursively (pack two DLOCs in 
          a meta-DLOC). Parsing would fail. It would be a nonsense idea 
          anyway.
        - Of course, you can store such a DLOC as Favorite and give it a 
          caption:, e.g.:
            "First Drives" DUAL:C:\||D:\
         Example: goto "DUAL:1.G:\Pictures\Maine>>0||G:\Pictures\Maine>>6";loadlayout ("dual pics");setcolumns("+:d-Run.28,+Name.175",2);focus P1;#814;#813; //Detailed view on left pane and thumbnail view on right
Oops Stef123 beat me to it.

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

Re: Undocumented script commands - Suggestions

Post by binocular222 »

Thanks Stef123 and klownboy. I combined and cleanup a bit to be pasted to main locked thread:

Code: Select all

DUAL:pane.Path1>>Settings1||Path2>>Settings2
    Activate dual pane mode with specific location set for each pane.
    Usage: Enter directly in Addressbar or via script command "goto".
    pane        [optional] pane to be activated. Possible value are 1; 2 or empty
    path        file/folder path. If omitted, default to current path
    settings    view settings
    Examples:
        DUAL:C:\||D:\      //Just paths:
        DUAL:C:\?*.sys /f||D:\|a   //Quick Searches and Visual Filters
        DUAL:?a* /f|||*.txt        //Without paths (= applied to current paths)
        DUAL:2.C:\||D:\            //With prefixed pane to be activated
        DUAL:1.C:\>>3,-65536,1335||D:\>>2,-32766,1335  //With view mode, sort order, and list style
        DUAL:E:\||   //Only the first pane
        DUAL:tabset("load", "Bat");||tabset("load", "Man")   //load tabsets
    Notes:
        - DLOCs can be used anywhere just like normal locations. Exception: You cannot use them recursively (pack two DLOCs in a meta-DLOC).
        - Of course, you can store such a DLOC as Favorite and give it a caption:, e.g.: "First Drives" DUAL:C:\||D:\
From v12.50.0005 - 2013-06-19 http://www.xyplorer.com/xyfc/viewtopic. ... 610#p88043
Last edited by binocular222 on 14 Mar 2015 13:06, edited 1 time in total.
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

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

Re: Undocumented script commands - Suggestions

Post by binocular222 »

Impressive amount of hidden commands! Much more than I expected when first proposed this thread.
What about other easter eggs such as

Code: Select all

    Alt+Doulble click                 = Properties
    Double click icon in info panel   = Copy icon to clipboard
    Double click on status bar        = Copy text
    Right mouse drag                  = Drag with menu
    Shift + RM drop on tab            = Move
    Ctrl + RM drop on tab             = Copy
    ALT / SHIFT+CTRL + RM drop on tab = Create shortcut
    Shift+Space bar while preview     = Go to beginning and stop
    Ctrl+Shift+Wheel                  = Change spacing between rows in List
    POM: Ctrl+Click                   = go to the application instead of opening it
    POM: Shift+Enter                  = Open with default OS and ignore PFA
    POM: Prefix |                     = only be listed in the POM, but not be triggered on "open". ie: |exe;dll>::copytext <curname>
Should we post here or another thread?
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar »

DUAL: :Err, it's undocumented yes, but DUAL isn't a exactly a scripting command!
binocular's easter eggs: maybe a new topic in the same vein: "XYplorer's secret tricks compendium" :kidding: <= DUAL's proabably better placed here.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Stef123

Re: Undocumented script commands - Suggestions

Post by Stef123 »

SammaySarkar wrote:DUAL: :Err, it's undocumented yes, but DUAL isn't a exactly a scripting command!
binocular's easter eggs: maybe a new topic in the same vein: "XYplorer's secret tricks compendium" :kidding: <= DUAL's proabably better placed here.
:titter: Didn't mean to sneak it in, I was kind of sceptical myself and wondering if bino really meant the favorite folder stuff. But as a dual maniac I also wondered if maybe I'm missing out on something dual. So anyway, this fav folder thing reminds me of something I've been wanting to ask for a long time - I will open a new topic instead of further cluttering up this one. Feel free to delete this.

Post Reply