Page 23 of 28

Re: Minor scripting related wishes (a generic thread)

Posted: 17 Jul 2015 12:37
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.

Re: Minor scripting related wishes (a generic thread)

Posted: 17 Jul 2015 13:41
by bdeshi

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

Re: Minor scripting related wishes (a generic thread)

Posted: 18 Jul 2015 17:49
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).

Re: Minor scripting related wishes (a generic thread)

Posted: 18 Jul 2015 18:56
by bdeshi
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]

Re: Minor scripting related wishes (a generic thread)

Posted: 18 Jul 2015 20:33
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:

Re: Minor scripting related wishes (a generic thread)

Posted: 19 Jul 2015 08:14
by bdeshi
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.

Re: Minor scripting related wishes (a generic thread)

Posted: 19 Jul 2015 10:49
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!

Re: Minor scripting related wishes (a generic thread)

Posted: 19 Jul 2015 14:40
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.

Re: Minor scripting related wishes (a generic thread)

Posted: 20 Jul 2015 12:27
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:

Re: Minor scripting related wishes (a generic thread)

Posted: 14 Aug 2015 12:43
by bdeshi
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?

Re: Minor scripting related wishes (a generic thread)

Posted: 14 Aug 2015 14:46
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

Re: Minor scripting related wishes (a generic thread)

Posted: 14 Aug 2015 14:53
by bdeshi
2) thanks.
1) month and date? :titter:

Re: Minor scripting related wishes (a generic thread)

Posted: 19 Nov 2015 09:27
by bdeshi
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');

Re: Minor scripting related wishes (a generic thread)

Posted: 21 Nov 2015 19:14
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

Re: Minor scripting related wishes (a generic thread)

Posted: 22 Nov 2015 14:20
by admin
Good point! Change coming...