Page 5 of 8

Re: Undocumented script commands - Suggestions

Posted: 20 Apr 2015 13:46
by SammaySarkar
Can't believe no one's discovered ^this^ already by echoing bad strings, as I did. :whistle:

Re: Undocumented script commands - Suggestions

Posted: 20 Apr 2015 17:49
by binocular222
Feel like you're reverse-enginerring XY!!!

Re: Undocumented script commands - Suggestions

Posted: 20 Apr 2015 17:55
by SammaySarkar
by mistake! :mrgreen:

Re: Undocumented script commands - Suggestions

Posted: 28 Apr 2015 19:34
by SammaySarkar
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

Re: Undocumented script commands - Suggestions

Posted: 28 Apr 2015 19:49
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...

Re: Undocumented script commands - Suggestions

Posted: 28 Apr 2015 20:19
by SammaySarkar
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.

Re: Undocumented script commands - Suggestions

Posted: 28 Apr 2015 22:02
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:

Re: Undocumented script commands - Suggestions

Posted: 28 Jun 2015 11:47
by SammaySarkar
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.

Re: Undocumented script commands - Suggestions

Posted: 28 Jun 2015 11:50
by SammaySarkar
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.

Re: Undocumented script commands - Suggestions

Posted: 03 Jul 2015 07:42
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"

Re: Undocumented script commands - Suggestions

Posted: 03 Jul 2015 07:47
by SammaySarkar
eh, that's not actually implemented yet... edit, here it is >> viewtopic.php?t=13822&p=135293#p135293 !

Re: Undocumented script commands - Suggestions

Posted: 21 Dec 2015 16:47
by SammaySarkar
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";

Re: Undocumented script commands - Suggestions

Posted: 12 Jan 2016 17:26
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.

Re: Undocumented script commands - Suggestions

Posted: 12 Jan 2016 17:27
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

Re: Undocumented script commands - Suggestions

Posted: 13 Jan 2016 09:33
by highend
Sammay added both new commands to the overview thread :tup: