Minor scripting related wishes (a generic thread)

Features wanted...
zer0
Posts: 2673
Joined: 19 Jan 2009 20:11

Re: Minor scripting related wishes (a generic thread)

Post by zer0 »

I use TeraCopy as my handler, but it doesn't support files with paths greater than 260 chars. Therefore, would it be possible to add a command that would allow ad-hoc usage of XYcopy.exe? In my code, I would simply use strlen() to get the path length and have an if{} clause to determine which copy handler to use based on value returned.
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

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

Re: Minor scripting related wishes (a generic thread)

Post by SammaySarkar »

Code: Select all

::help "idh_scripting_comref.htm#idh_sc_copier";
as the note says, don;t forget to enable custom copy (::setting 'UseCustomCopy', 1;)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

eil
Posts: 1207
Joined: 13 Jan 2011 19:44

Re: Minor scripting related wishes (a generic thread)

Post by eil »

1. Get is quite potent about drive letters and types, but i see no way to check type by path/letter = for ex, if current/specified path is on fixed or removable drive. so i hope get("drives") can acquire some parameter to make such check.

2. Break and Continue kinda miss optional support(flag) of all condition structures(If, Foreach).

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

Re: Minor scripting related wishes (a generic thread)

Post by SammaySarkar »

1. a likely unacceptable alternative:

Code: Select all

INCLUDE "inc\gpc.xyi";
INCLUDE "inc\in.xyi";
echo 'is current drive removable? '. ( in(gpc(<curpath>,'drive').':\', get('drives',2)) ? 'yes' : 'no' );
2. Eh? In my experilience, break and continue do support them all. Elaborate? [corrected]
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

eil
Posts: 1207
Joined: 13 Jan 2011 19:44

Re: Minor scripting related wishes (a generic thread)

Post by eil »

SammaySarkar wrote:1. a likely unacceptable alternative:

Code: Select all

INCLUDE "inc\gpc.xyi";
INCLUDE "inc\in.xyi";
echo 'is current drive removable? '. ( in(gpc(<curpath>,'drive').':\', get('drives',2)) ? 'yes' : 'no' );
2. Eh? In my experilience, break and continue do support them all. Elaborate?
1. em.. what are the files gpc and in? i presume it's libraries?. than it's really not convenient, sorry./
2. The argument ignores IF blocks. this line in descriptions of both commands made me think they don't support. :eh:

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

Re: Minor scripting related wishes (a generic thread)

Post by SammaySarkar »

1. yes. Here's a list http://www.xyplorer.com/xyfc/viewtopic. ... 22#p122093 . now that XY supports including files (libraries), you might be seeing more like these. :ugeek:
2.1. continue doesn't make sense in if/else blocks.
2.2. break seems to work with if, but only if the if is not in a loop. (then the break affects the parent loop)

Code: Select all

 $a = 1;
 if ($a == 1) { $a = 2; echo 'I am in an IF before break'; if ($a == 2){break;}; echo 'I am broke!'; }
 if ($a == 2) { echo 'I am in an IF before break'; break; echo 'break prevents me from running! bwah!'; }
 echo 'I am out of the IFs';
So I see. If/else could use a breaker from time to time. +1 here.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Minor scripting related wishes (a generic thread)

Post by PeterH »

If code (inside an If) is to be execute conditionally: use an imbedded If :-)

And don't misuse Break - it is for loops!
W7(x64) SP1 German
( +WXP SP3 )

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

Re: Minor scripting related wishes (a generic thread)

Post by zer0 »

SammaySarkar wrote:

Code: Select all

::help "idh_scripting_comref.htm#idh_sc_copier";
as the note says, don;t forget to enable custom copy (::setting 'UseCustomCopy', 1;)
Thanks, but toggling it back and forth doesn't appeal to me very much. I would rather there be an SC called xycopy() to which I can pass files in a similar fashion to how copy/copyto/backupto/moveto work at the moment.
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

eil
Posts: 1207
Joined: 13 Jan 2011 19:44

Re: Minor scripting related wishes (a generic thread)

Post by eil »

SammaySarkar wrote:1. a likely unacceptable alternative:

Code: Select all

INCLUDE "inc\gpc.xyi";
INCLUDE "inc\in.xyi";
echo 'is current drive removable? '. ( in(gpc(<curpath>,'drive').':\', get('drives',2)) ? 'yes' : 'no' );
can this be modified somehow to work in Search?(multiple drives are in scope) actually i need to get lists of fixed and non-fixed drives in vars. :oops:

add: i still think get("drivetype",<path>) would be very useful and wish it to appear. :ninja:

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

Re: Minor scripting related wishes (a generic thread)

Post by SammaySarkar »

can UDF's have static variables?
That is, a variable local to the function, and it's value is remembered across calls.

plus: I don't about others, but I use xyi as include file extension. So Don, can you add xyi and inc to uploadable filetypes list?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Minor scripting related wishes (a generic thread)

Post by admin »

SammaySarkar wrote:can UDF's have static variables?
That is, a variable local to the function, and it's value is remembered across calls.

plus: I don't about others, but I use xyi as include file extension. So Don, can you add xyi and inc to uploadable filetypes list?
1) Maybe 2018...

2) OK
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

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

Re: Minor scripting related wishes (a generic thread)

Post by SammaySarkar »

2) thanks.
1) month and date? :titter:
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Minor scripting related wishes (a generic thread)

Post by SammaySarkar »

http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=15011
how about a property that returns an item's list position (index) ?

Code: Select all

::prop('#ListIndex');
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

nerdweed
Posts: 593
Joined: 25 Feb 2012 07:47

Re: Minor scripting related wishes (a generic thread)

Post by nerdweed »

Not exactly for XY scripting - but require for remote control.

Currently, if the Floating Preview is Full Screen, the title bar of the floating preview (which isn't visible) doesn't change. Could you please update it regardless.

Its only as a workaround, since ahk_class for Floating Preview is same as the main XY window and you cannot change it.

Edit: very minor wish :D

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

Re: Minor scripting related wishes (a generic thread)

Post by admin »

Good point! Change coming...
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

Post Reply