Scripting Bugs
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Scripting Bugs
Check your templates, maybe they start with "(2)"?
FAQ | XY News RSS | XY Twitter
Re: Scripting Bugs
Yes, they start with " (2)", but it should be used only on collisions.
If only one item is copied, it doesn't use the template. Similarly, if two items are copied and an item with the name doesn't exist, only one should be copied with the template
i.e.; Bold is unexpected behavior
if Funky.txt does not exist in D:\Demo\Fun
CopyAs "Funky.txt", "D:\Demo\Fun", "D:\Demo\New.txt" --Copies as Funky.txt - Good
CopyAs "Funky.txt", "D:\Demo\Fun", "D:\Demo\New.txt|D:\Demo\Old.txt" --Copies as Funky (2).txt and Funky (3).txt -- Wrong --Should be copied as Funky.txt and Funky (2).txt
if Funky.txt already exists in D:\Demo\Fun
CopyAs "Funky.txt", "D:\Demo\Fun", "D:\Demo\New.txt" --Gives me a collision prompt - OK
CopyAs "Funky.txt", "D:\Demo\Fun", "D:\Demo\New.txt|D:\Demo\Old.txt" --Copies as Funky (2).txt and Funky (3).txt -- Good
If only one item is copied, it doesn't use the template. Similarly, if two items are copied and an item with the name doesn't exist, only one should be copied with the template
i.e.; Bold is unexpected behavior
if Funky.txt does not exist in D:\Demo\Fun
CopyAs "Funky.txt", "D:\Demo\Fun", "D:\Demo\New.txt" --Copies as Funky.txt - Good
CopyAs "Funky.txt", "D:\Demo\Fun", "D:\Demo\New.txt|D:\Demo\Old.txt" --Copies as Funky (2).txt and Funky (3).txt -- Wrong --Should be copied as Funky.txt and Funky (2).txt
if Funky.txt already exists in D:\Demo\Fun
CopyAs "Funky.txt", "D:\Demo\Fun", "D:\Demo\New.txt" --Gives me a collision prompt - OK
CopyAs "Funky.txt", "D:\Demo\Fun", "D:\Demo\New.txt|D:\Demo\Old.txt" --Copies as Funky (2).txt and Funky (3).txt -- Good
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Scripting Bugs
This is by design. The resulting names are more consistent like this, and this is IMO preferable.
FAQ | XY News RSS | XY Twitter
Re: Scripting Bugs
It gives a feeling that one file was deleted
Re: Scripting Bugs
Code: Select all
::Echo InputSelect(,'A|B|C',,16);
2) Select C and hit OK.
3) It echos B instead of C.
It should return token 2 from the re-ordered list not the original list - just like it does if do the same but use:
Code: Select all
::Echo InputSelect(,'A|B|C',,2+16);
Re: Scripting Bugs
Not sure if it's a bug or not, but it's definitely undesired behaviour.
Description: when having a multi-line piece of text -- not word wrap -- copied to clipboard, in-line rename pastes the whole thing joining the parts together (good), but the following scripting command fails with an error (bad).
Description: when having a multi-line piece of text -- not word wrap -- copied to clipboard, in-line rename pastes the whole thing joining the parts together (good), but the following scripting command fails with an error (bad).
Code: Select all
rename b, "<clipboard>";
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
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Scripting Bugs
Well, it might be a desired behavior. It's questionable whether this special feature of inline rename should be extended to scripting. Whatever, this is certainly not a bug.
FAQ | XY News RSS | XY Twitter
Re: Scripting Bugs
OK, it's not a bug. But in what situation could be the desired behaviour? If I copy a bunch of text to clipboard, I would expect that all of it is pasted wherever I designate. When needing to rename a bunch of files with different extensions to have the same base, the scripting command is very handy.admin wrote:Well, it might be a desired behavior. It's questionable whether this special feature of inline rename should be extended to scripting. Whatever, this is certainly not a bug.
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
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Scripting Bugs
Ah, works already! Simply use flag 16:
PS: Next beta will slightly improve the functionality of flag=16 so that it's 100% identical to pasting into the inline box.
Code: Select all
rename b, "<clipboard>",,,16;
FAQ | XY News RSS | XY Twitter
Re: Scripting Bugs
Yes, indeedadmin wrote:Ah, works already! Simply use flag 16:
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: Scripting Bugs
SC folderreport wrongly adds an CR/LF after the last entry when parameter separator is left empty.
Just compare the two flavors
Cheers,
FH
Just compare the two flavors
Code: Select all
text(folderreport("items:{name}","r",aPath,,,));
text(folderreport("items:{name}","r",aPath,,,"<crlf>"));
FH
Re: Scripting Bugs
For a pure list it might be helpful to terminate *all* lines by crlf?
While the separator-operand explicitly states that separator is *between* the items. (I don't use the word 'lines' here )
So it might work as designed?
(I still hate IBM for this expression )
While the separator-operand explicitly states that separator is *between* the items. (I don't use the word 'lines' here )
So it might work as designed?
(I still hate IBM for this expression )
W7(x64) SP1 German
( +WXP SP3 )
( +WXP SP3 )
Re: Scripting Bugs
Hi Peter,
all formalisms aside, a loop over the resulting list should, nope, must have the same number of iterations, no matter wether default separation is used or not.
FH
all formalisms aside, a loop over the resulting list should, nope, must have the same number of iterations, no matter wether default separation is used or not.
FH
Re: Scripting Bugs
Maybe, if I didn't understand you wrong, you should just use separator <crlf>?
Again: I think it might have sense if both versions exist - and you con choose.
And then the version without sep are wrong for you
(To say: my interpretation )
Again: I think it might have sense if both versions exist - and you con choose.
And then the version without sep are wrong for you
(To say: my interpretation )
W7(x64) SP1 German
( +WXP SP3 )
( +WXP SP3 )