Page 26 of 28

Re: Minor scripting related wishes (a generic thread)

Posted: 17 May 2016 15:32
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.)

Re: Minor scripting related wishes (a generic thread)

Posted: 17 May 2016 15:46
by bdeshi
Yes, wishing for the operator only.

Re: Minor scripting related wishes (a generic thread)

Posted: 18 May 2016 08:00
by admin
I read about it but failed to find convincing real world examples for the use of it.

Re: Minor scripting related wishes (a generic thread)

Posted: 18 May 2016 08:55
by bdeshi
It's the SPACESHIP operator, you don't need real-world examples! :P

Re: Minor scripting related wishes (a generic thread)

Posted: 18 May 2016 08:57
by admin
:lol: :tup:

Re: Minor scripting related wishes (a generic thread)

Posted: 21 Jul 2016 18:11
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.

Re: Minor scripting related wishes (a generic thread)

Posted: 11 Aug 2016 10:26
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.

Re: Minor scripting related wishes (a generic thread)

Posted: 12 Sep 2016 10:17
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?

Re: Minor scripting related wishes (a generic thread)

Posted: 12 Sep 2016 12:48
by admin
Got a screenshot of what you mean? Not sure what menu you are talking about.

Re: Minor scripting related wishes (a generic thread)

Posted: 17 Sep 2016 18:45
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

Re: Minor scripting related wishes (a generic thread)

Posted: 17 Sep 2016 22:55
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.

Re: Minor scripting related wishes (a generic thread)

Posted: 17 Sep 2016 23:14
by highend
viewtopic.php?p=121180#p121180

Code: Select all

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

Re: Minor scripting related wishes (a generic thread)

Posted: 17 Sep 2016 23:25
by sheeeple
highend wrote:viewtopic.php?p=121180#p121180

Code: Select all

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

Re: Minor scripting related wishes (a generic thread)

Posted: 18 Sep 2016 09:45
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?

Re: Minor scripting related wishes (a generic thread)

Posted: 18 Sep 2016 16:11
by zer0
admin wrote:Where does this menu come from?
From a custom "Run Script" UDC.