Minor scripting related wishes (a generic thread)
Re: Minor scripting related wishes (a generic thread)
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
Windows 7/10
Always using the latest stable two-decimal build
Re: Minor scripting related wishes (a generic thread)
Code: Select all
::help "idh_scripting_comref.htm#idh_sc_copier";
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Minor scripting related wishes (a generic thread)
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).
2. Break and Continue kinda miss optional support(flag) of all condition structures(If, Foreach).
Win 7 SP1 x64 100% 1366x768
Re: Minor scripting related wishes (a generic thread)
1. a likely unacceptable alternative:
2. Eh? In my experilience, break and continue do support them all. Elaborate? [corrected]
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' );
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Minor scripting related wishes (a generic thread)
1. em.. what are the files gpc and in? i presume it's libraries?. than it's really not convenient, sorry./SammaySarkar wrote:1. a likely unacceptable alternative:2. Eh? In my experilience, break and continue do support them all. Elaborate?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. The argument ignores IF blocks. this line in descriptions of both commands made me think they don't support.
Win 7 SP1 x64 100% 1366x768
Re: Minor scripting related wishes (a generic thread)
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.
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)
So I see. If/else could use a breaker from time to time. +1 here.
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';
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Minor scripting related wishes (a generic thread)
If code (inside an If) is to be execute conditionally: use an imbedded If :-)
And don't misuse Break - it is for loops!
And don't misuse Break - it is for loops!
Win11 Pro 223H2 Gerrman
Re: Minor scripting related wishes (a generic thread)
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.SammaySarkar wrote:as the note says, don;t forget to enable custom copy (::setting 'UseCustomCopy', 1;)Code: Select all
::help "idh_scripting_comref.htm#idh_sc_copier";
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
Windows 7/10
Always using the latest stable two-decimal build
Re: Minor scripting related wishes (a generic thread)
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.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' );
add: i still think get("drivetype",<path>) would be very useful and wish it to appear.
Win 7 SP1 x64 100% 1366x768
Re: Minor scripting related wishes (a generic thread)
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?
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 ]
[ this user is asleep ]
-
- Site Admin
- Posts: 60541
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Minor scripting related wishes (a generic thread)
1) Maybe 2018...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?
2) OK
FAQ | XY News RSS | XY Twitter
Re: Minor scripting related wishes (a generic thread)
2) thanks.
1) month and date?
1) month and date?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Minor scripting related wishes (a generic thread)
http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=15011
how about a property that returns an item's list position (index) ?
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 ]
[ this user is asleep ]
Re: Minor scripting related wishes (a generic thread)
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
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
-
- Site Admin
- Posts: 60541
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Minor scripting related wishes (a generic thread)
Good point! Change coming...
FAQ | XY News RSS | XY Twitter