Undocumented script commands - Suggestions

Discuss and share scripts and script files...
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:46

Can't believe no one's discovered ^this^ already by echoing bad strings, as I did. :whistle:

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

Re: Undocumented script commands - Suggestions

Post by binocular222 » 20 Apr 2015 17:49

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

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 17:55

by mistake! :mrgreen:

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 28 Apr 2015 19:34

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

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

Re: Undocumented script commands - Suggestions

Post by admin » 28 Apr 2015 19:49

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...

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 28 Apr 2015 20:19

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.

PeterH
Posts: 2575
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Undocumented script commands - Suggestions

Post by PeterH » 28 Apr 2015 22:02

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 )

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 28 Jun 2015 11:47

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.

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 28 Jun 2015 11:50

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.

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

Re: Undocumented script commands - Suggestions

Post by autocart » 03 Jul 2015 07:42

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"
customInlineRenameKeys ("OldStyle", "Mouse++" and "Ultimate"), clipboardHelper_and_XYEscToList

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 03 Jul 2015 07:47

eh, that's not actually implemented yet... edit, here it is >> viewtopic.php?t=13822&p=135293#p135293 !

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

Re: Undocumented script commands - Suggestions

Post by SammaySarkar » 21 Dec 2015 16:47

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";

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

Re: Undocumented script commands - Suggestions

Post by TheQwerty » 12 Jan 2016 17:26

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: 4353
Joined: 03 Aug 2007 22:30

Re: Undocumented script commands - Suggestions

Post by TheQwerty » 12 Jan 2016 17:27

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

Re: Undocumented script commands - Suggestions

Post by highend » 13 Jan 2016 09:33

Sammay added both new commands to the overview thread :tup:
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

Post Reply