Page 21 of 41
Re: Scripting Bugs
Posted: 13 Mar 2014 17:14
by SkyFrontier
admin wrote:Confirmed! You have a good run today...
Cool. But please, what about this?
http://www.xyplorer.com/xyfc/viewtopic. ... 60#p101274
I can't pass standard itemlists to report() other than 0 or 1.
Re: Scripting Bugs
Posted: 13 Mar 2014 19:48
by admin
SkyFrontier wrote:Code: Select all
step;
$inp = folderreport("files:{fullname}", "r", , "", , "|");
$input = trim("$inp", "|");
$input = report("{custom 2} = {fullname}|", "$input"); // custom 2 won't be caught
$a = report("{custom 2} = {fullname}|", 0); // correct
beta 0113.
Yes, there is a problem. Fix comes.
Re: Scripting Bugs
Posted: 19 Mar 2014 20:31
by TheQwerty
Floor and Ceiling do not like negative numbers...
Code: Select all
echo floor(-3.7); //Docs say it should be -4; I get -5.
echo ceil(-3.2); //Docs say it should be -3; I get -4.
Various Info wrote:XYplorer: 13.80.0124 (Pro Edition - Lifetime License Pro)
Loaded in: 819 ms at 3/19/2014 2:20:32 PM
Uptime: 1 hr, 9 mins, 23 secs
Memory Usage: 36,252 KB, Virtual Memory Size: 16,528 KB
OS: Windows 7 Professional (Service Pack 1), 64-bit (6.1)
OS Uptime: 42 days, 2 hrs, 14 mins, 15 secs
UTC Offset: --04:00
User Role: User
Themes: Yes (Aero) RealSystem32: Yes
System Locale ID: 1033 (en-US)
Thread Locale ID: 1033 (en-US)
Default ANSI Code Page: 1252 (ANSI - Latin I)
Active Code Page: 1252 (ANSI - Latin I)
DBCS Code Page: No
Re: Scripting Bugs
Posted: 20 Mar 2014 18:41
by admin
Indeed!
Re: Scripting Bugs
Posted: 26 Mar 2014 23:43
by zer0
Code: Select all
rename b, "<clipboard>", , , 4, "";
The above does not work as intended if clipboard text contains "/" illegal character. What happens in reality is that the file selected is renamed with clipboard content to the left of the forward slash with loss of extension even when "Exclude extension on rename" is checked. The correct approach, as you would hopefully agree, is to rename the file and replace the illegal char with nothing. renameitem() doesn't do the trick here either, because it complains about an illegal char.
Re: Scripting Bugs
Posted: 27 Mar 2014 08:39
by admin
This is because "/" is the character that marks switches. So there is an unsolvable ambiguity. I don't see what I could do. Apart from a new function RenameCleanName() that would clean the input before passing it to rename.
Code: Select all
rename b, RenameCleanName("<clipboard>"), , , 4, "";
Or, more comfortable, a new flag for this:
Code: Select all
rename b, "<clipboard>", , , 16, "";
Re: Scripting Bugs
Posted: 27 Mar 2014 11:34
by zer0
admin wrote:Or, more comfortable, a new flag for this:
Code: Select all
rename b, "<clipboard>", , , 16, "";
This one looks good to me: keeping it simple should reduce chances of error make it easier to document.
Re: Scripting Bugs
Posted: 31 Mar 2014 15:09
by eil
didn't want to create a thread, maybe i'm stupid.. updated to 13.90 and wanted to add a button for tree:
Code: Select all
Snip: CTB 1
XYplorer 13.90.0000, 31.03.2014 16:07:28
Action
NewUserButton
Name
Tree
Icon
:maxitree
ScriptL
#249;
ScriptR
#583;
FireClick
0
but it keeps saying "Command ID #249 does not exist!" and same for other../
Re: Scripting Bugs
Posted: 31 Mar 2014 21:05
by TheQwerty
eil wrote:didn't want to create a thread, maybe i'm stupid.. updated to 13.90 and wanted to add a button for tree:
Code: Select all
Snip: CTB 1
XYplorer 13.90.0000, 31.03.2014 16:07:28
Action
NewUserButton
Name
Tree
Icon
:maxitree
ScriptL
#249;
ScriptR
#583;
FireClick
0
but it keeps saying "Command ID #249 does not exist!" and same for other../
XY speaks the truth, I do not see commands #249 or #583.
Where did you find these ID numbers?
What commands are you actually trying to trigger?
Re: Scripting Bugs
Posted: 31 Mar 2014 21:27
by bdeshi
@Eli, perhaps you're using the command order number in the list instead of of it's ID:
The #numbers are id
Re: Scripting Bugs
Posted: 31 Mar 2014 21:36
by TheQwerty
SammaySarkar wrote:@Eli, perhaps you're using the command order number in the list instead of of it's ID:
The #numbers are id
Good thought!
The list of all commands was recently changed to no longer show the command IDs by default.
To make them visible you have three options:
- Hold Ctrl while selecting List All Commands...
- Use the Jump... list from the Customize Keyboard Shortcuts dialog instead.
- Set the new INI tweak, HelpListOfCommandsWithIDs to 1 to restore the old behavior.
Re: Scripting Bugs
Posted: 31 Mar 2014 22:46
by eil
oh, i missed this change..

i really was trying to use # from grey collumn(marked with red).
SammaySarkar,
TheQwerty, thank you for clearance and salvation options.
add: what was the reason for such change? and why it's not really marked as a tweak in ini?..
Re: Scripting Bugs
Posted: 31 Mar 2014 23:59
by TheQwerty
eil wrote:add: what was the reason for such change? and why it's not really marked as a tweak in ini?..
It originated
here and the tweak was requested
here.
Boils down to reducing clutter - especially in the free edition where scripting is not available, rendering command IDs useless.
Re: Scripting Bugs
Posted: 26 Apr 2014 13:14
by zer0
Today, I came across some unwanted behaviour: it turns out that using the below scripting command would cause all subsequent queued XYcopy operations to remain queued until "Close" was clicked on the progress dialogue final status window.
Code: Select all
backupto "<location1>", "<location2>", 3;
This poses a problem for several reasons:
1. There is no scripted way to auto-click close on completion (if you just wanted to see the progress dialogue while a copy was taking place).
2. This happens even if backupto was completely successful (understandable if there were failures, since you may want to have users explicitly acknowledge that they saw errors).
3. It imposes inconvenience of having to plan one's sequence of XYcopy operation so that backupto happens last in order to avoid holding things up.
Granted, this may not be a scripting issue a 100%, but it involves a scripting operation and resolution will probably be easier via an additional scripting flag.
Re: Scripting Bugs
Posted: 26 Apr 2014 13:19
by admin
It might be unwanted by you, but IMO it is what one would expect (and, for hypothetic other users, also want) to happen.