Minor scripting related wishes (a generic thread)

Features wanted...
TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Minor scripting related wishes (a generic thread)

Post by TheQwerty »

SammaySarkar wrote:Hiiiy, it's me with another wish!
PHP7's new combined comparison operator <=> can be pretty nice!

Code: Select all

// operator <=>
  text compare(1, 2);
  text compare(4, 3);
  text compare(5, 5);

function compare($a, $b) {
  return ($a > $b) ? 1 : ( ($a < $b) ? -1 : 0 ) ;
}
:veryconfused:
XY already has a compare SC, so are you just suggesting the addition of the spaceship (<=>) operator?

Though, I suppose it's a bit more since compare() requires you to specify a method whereas this operator would presumably use the same logic as the existing comparison operators when deciding if the values are strings or numbers.

(Not a vote for or against just a pursuit for clarity.)

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

Re: Minor scripting related wishes (a generic thread)

Post by bdeshi »

Yes, wishing for the operator only.
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: Minor scripting related wishes (a generic thread)

Post by admin »

I read about it but failed to find convincing real world examples for the use of it.

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

Re: Minor scripting related wishes (a generic thread)

Post by bdeshi »

It's the SPACESHIP operator, you don't need real-world examples! :P
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: Minor scripting related wishes (a generic thread)

Post by admin »

:lol: :tup:

zer0
Posts: 2673
Joined: 19 Jan 2009 20:11

Re: Minor scripting related wishes (a generic thread)

Post by zer0 »

Where the displayed SC is truncated by the width of the menu that is shown -- for example, where moveto() paths are quite long and exceed the boundary -- being able to see the whole path on mouseover of that SC would be quite useful. Thanks.
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by admin »

zer0 wrote:Where the displayed SC is truncated by the width of the menu that is shown -- for example, where moveto() paths are quite long and exceed the boundary -- being able to see the whole path on mouseover of that SC would be quite useful. Thanks.
Agreed but not possible.

zer0
Posts: 2673
Joined: 19 Jan 2009 20:11

Re: Minor scripting related wishes (a generic thread)

Post by zer0 »

admin wrote:
zer0 wrote:Where the displayed SC is truncated by the width of the menu that is shown -- for example, where moveto() paths are quite long and exceed the boundary -- being able to see the whole path on mouseover of that SC would be quite useful. Thanks.
Agreed but not possible.
Would it be possible to enable full paths to be shown instead?
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by admin »

Got a screenshot of what you mean? Not sure what menu you are talking about.

zer0
Posts: 2673
Joined: 19 Jan 2009 20:11

Re: Minor scripting related wishes (a generic thread)

Post by zer0 »

admin wrote:Got a screenshot of what you mean? Not sure what menu you are talking about.
Here you go...I would like for the menu to be dynamic in terms of width and display the full paths that are currently truncated
Image
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build

sheeeple
Posts: 13
Joined: 08 Aug 2016 17:31

Re: Minor scripting related wishes (a generic thread)

Post by sheeeple »

Hi, sorry if this had been brought up already. I've searched but I couldn't find anything related.

Would it be possible to have Xyplorer provide a list of extensions of certain file types using the visual filter syntax eg. "{:Video}".
Maybe something like:

Code: Select all

    get("{:Video}", $separator="|", $excludedExts); // returns a list of extensions of video files
This would remove the need to define the file extensions during scripting (eg. $videoExts = "mp4|wmv|flv";) whenever we have to do something which checks for the extension.
It would also be awesome if you allowed the user to add their own Categories(eg. 'Comic Archives', 'Disc Images', 'i'm sure there are others xD') in the Configuration screen instead of being restricted to whats configurable on the 'Previewed Formats' settings.

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

Re: Minor scripting related wishes (a generic thread)

Post by highend »

viewtopic.php?p=121180#p121180

Code: Select all

get("genericfiletype", "{:Video}", ",");
One of my scripts helped you out? Please donate via Paypal

sheeeple
Posts: 13
Joined: 08 Aug 2016 17:31

Re: Minor scripting related wishes (a generic thread)

Post by sheeeple »

highend wrote:viewtopic.php?p=121180#p121180

Code: Select all

get("genericfiletype", "{:Video}", ",");
:oops: Thanks

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by admin »

zer0 wrote:
admin wrote:Got a screenshot of what you mean? Not sure what menu you are talking about.
Here you go...I would like for the menu to be dynamic in terms of width and display the full paths that are currently truncated
Image
Where does this menu come from?

zer0
Posts: 2673
Joined: 19 Jan 2009 20:11

Re: Minor scripting related wishes (a generic thread)

Post by zer0 »

admin wrote:Where does this menu come from?
From a custom "Run Script" UDC.
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build

Post Reply