Page 1 of 1
Is this a bug? - $a doesn't get currentbase after selfilter
Posted: 05 Nov 2010 22:57
by xyka
$a doesn't get current base name
Code: Select all
http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=5777&p=54297#p54297
Re: Is this a bug? - $a doesn't get current base name
Posted: 05 Nov 2010 23:03
by zer0
It's not. Select any file and run this script
You will get the base name of that selected file.
Re: Is this a bug? - $a doesn't get current base name
Posted: 05 Nov 2010 23:33
by xyka
zer0 wrote:It's not. Select any file and run this script
You will get the base name of that selected file.
Yes, but you select file manually.
So it might be a bug.
Try this: put a
New Textfile.txt file and a .rar file into a folder and select .rar file and run this script:
Code: Select all
Selfilter "*.txt", f; $a = "<curbase>"; msg $a;
result = NOTHING
select .txt file and run this same script:
Code: Select all
Selfilter "*.txt", f; $a = "<curbase>"; msg $a;
result =
New Textfile
<curext>
<curname>
does the same too
-
Re: Is this a bug? - $a doesn't get current base name
Posted: 05 Nov 2010 23:48
by xyka
BUT
Changing "<curbase>" to "<curpath>"
Code: Select all
Selfilter "*.txt", f; $a = "<curpath>"; msg $a;
is working in both cases.
Re: Is this a bug? - $a doesn't get currentbase after selfilter
Posted: 06 Nov 2010 00:48
by zer0
It seems that selfilter doesn't transfer focus to an item that is being selected. In addition, calling <curbase> when one item is selected and another is focused gets neither.
Re: Is this a bug? - $a doesn't get currentbase after selfilter
Posted: 06 Nov 2010 09:57
by admin
Yep, by design.
Re: Is this a bug? - $a doesn't get current base name
Posted: 06 Nov 2010 15:44
by serendipity
xyka wrote:BUT
Changing "<curbase>" to "<curpath>"
Code: Select all
Selfilter "*.txt", f; $a = "<curpath>"; msg $a;
is working in both cases.
Thats because <curpath> is the same for all items in the list so it does not matter if you select an item or not, while <curbase> differs from item to item, thats why XY needs to know which item you are requesting <curbase> info for.