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 »

Can't believe no one's discovered ^this^ already by echoing bad strings, as I did. :whistle:
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Undocumented script commands - Suggestions

Post by binocular222 »

Feel like you're reverse-enginerring XY!!!
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

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

Re: Undocumented script commands - Suggestions

Post by bdeshi »

by mistake! :mrgreen:
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 »

enumshellfolderitems
Shows contents of special file-system locations.

Syntax

Code: Select all

enumshellfolderitems [CLSIDL=-1], [propindex],[showpath=0]

  CSIDL      a numerical constant predefined by the OS pointing to special locations.
  propindex  include a particular property of subfolders in the listing.
  showpath   include full path of subfolders in the listing. 1 = yes, 0 = no.
Example

Code: Select all

enumshellfolderitems 16, 4; //list Desktop subfolders with created date.
Remarks
Not all CSIDLs will return existing subfolders. For example, 16 and 0 both point to Desktop but 0 returns empty list.
propindex is the same property index as used in SC property(), but without the '#' prefix.
Invalid propindex defaults to 0 (Name).

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

Just a warning note: I can theoretically modify or remove undocumented script commands at any time without notice. So I'm not sure if this thread is a good idea... :eh: ... at least it should be accompanied with lots of warning signs...

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

Re: Undocumented script commands - Suggestions

Post by bdeshi »

yep. common knowledge, I believe.
Still I separated some such commands in a separate list in the sticky. Most traffic here comes from that thread now, I think.
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 »

admin wrote:Just a warning note: I can theoretically modify or remove undocumented script commands at any time without notice. So I'm not sure if this thread is a good idea... :eh: ... at least it should be accompanied with lots of warning signs...
I hope there is a difference?

Fully understand this for commands that were not intended to be known.
But, e.g., somewhen I asked for Caller(), you created it like Self(), but said, you wouldn't document it. I would be very sad if somewhen you would remove it.

So I'd say: the situation would be much clearer it you would document those that make sense.

By the way: I love the extended functions of echo :ball:
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 »

shellcopy
copies files or folders using the shell.

Syntax

Code: Select all

shellcopy source, target

  source  |-separated list of items
  target  location where the items will be copied
Example

Code: Select all

::shellcopy <curitem>, "<xydata>";
::shellcopy <curitem>, "shell:Desktop";
Remarks
* The target must exist beforehand. Name collision behavior is shell-controlled.
* See reference to SC shellopen for path spec.
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 »

shellmove
moves files or folders using the shell.

Syntax

Code: Select all

shellmove source, target

  source  |-separated list of items
  target  location where the items will be moved
Example

Code: Select all

::shellmove <get 'selecteditemspathnames' '|'>, "%desktopreal%";
::shellmove <curitem>, "shell:Desktop"
Remarks
* The target must exist beforehand. Name collision behavior is shell-controlled.
* See reference to SC shellopen for path spec.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

autocart
Posts: 1246
Joined: 26 Sep 2013 15:22

Re: Undocumented script commands - Suggestions

Post by autocart »

I did not try this nor do I fully understand it (cannot give a full discription), however, I noticed that it is missing from here so far:
http://www.xyplorer.com/xyfc/viewtopic. ... 22#p122144
::dlbtn([Url]);
assuming it is called "Download Button"

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

Re: Undocumented script commands - Suggestions

Post by bdeshi »

eh, that's not actually implemented yet... edit, here it is >> viewtopic.php?t=13822&p=135293#p135293 !
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 »

echoraw
shows how XYplorer interprets the raw string that was passed upto the end of the statement.

Syntax

Code: Select all

echoraw text

text     the text to display
Example

Code: Select all

  echoraw 'Hi!'; //returns 'Hi!' with the quotes
  echoraw <<<>>
"heredoc text."
>>;
  $a = 42; echoraw "the value is: $a";
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Undocumented script commands - Suggestions

Post by TheQwerty »

error
Generates and catches a specific error.

Syntax

Code: Select all

error [errnumber=1];

errnumber    Number of error. Defaults to 1 an 'Application-defined or object-defined error'.
Example

Code: Select all

error 11; // Division by Zero
History
  • v16.10.0306 - 2016-01-12 21:46

    Code: Select all

        * Scripting: Slight change in the syntax of the recent newcomers:
          Syntax: error [errnumber=1];
          Syntax: crash [errnumber=1];
  • v16.10.0305 - 2016-01-12 17:20 - "Official" Introduction

    Code: Select all

    v16.10.0305 - 2016-01-12 17:20
        + Scripting: Added two undercover commands that will not appear in the 
          official help but could be useful for debugging and other pastimes.
          - Name: Error
            Action: Generates and catches a specific error.
            Syntax: error errnumber;
            Example: error 11;  //Division by Zero
  • Note: This existed previously.

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

Re: Undocumented script commands - Suggestions

Post by TheQwerty »

crash
Generates a specific error and crashes on it.

Syntax

Code: Select all

crash [errnumber=1];

errnumber    Number of error. Defaults to 1 a 'Run-time error 97: Can not call friend function on object...'
Example

Code: Select all

crash 11; // Division by Zero
History
  • v16.10.0306 - 2016-01-12 21:46

    Code: Select all

        * Scripting: Slight change in the syntax of the recent newcomers:
          Syntax: error [errnumber=1];
          Syntax: crash [errnumber=1];
  • v16.10.0305 - 2016-01-12 17:20 - Introduction

    Code: Select all

    v16.10.0305 - 2016-01-12 17:20
        + Scripting: Added two undercover commands that will not appear in the 
          official help but could be useful for debugging and other pastimes.
    . . .
          - Name: Crash
            Action: Generates a specific error and crashes on it.
            Syntax: crash errnumber;
            Example: crash 11;  //Division by Zero

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

Re: Undocumented script commands - Suggestions

Post by highend »

Sammay added both new commands to the overview thread :tup:
One of my scripts helped you out? Please donate via Paypal

Post Reply