Is this a bug? - $a doesn't get currentbase after selfilter

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
xyka
Posts: 22
Joined: 21 Oct 2010 22:17

Is this a bug? - $a doesn't get currentbase after selfilter

Post 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
Last edited by xyka on 05 Nov 2010 23:50, edited 1 time in total.

zer0
Posts: 2676
Joined: 19 Jan 2009 20:11

Re: Is this a bug? - $a doesn't get current base name

Post by zer0 »

It's not. Select any file and run this script

Code: Select all

$a = "<curbase>"; msg $a;
You will get the base name of that selected file.
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

xyka
Posts: 22
Joined: 21 Oct 2010 22:17

Re: Is this a bug? - $a doesn't get current base name

Post by xyka »

zer0 wrote:It's not. Select any file and run this script

Code: Select all

$a = "<curbase>"; msg $a;
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



-
Last edited by xyka on 06 Nov 2010 00:01, edited 2 times in total.

xyka
Posts: 22
Joined: 21 Oct 2010 22:17

Re: Is this a bug? - $a doesn't get current base name

Post by xyka »

BUT

Changing "<curbase>" to "<curpath>"

Code: Select all

Selfilter "*.txt", f; $a = "<curpath>"; msg $a;
is working in both cases.

zer0
Posts: 2676
Joined: 19 Jan 2009 20:11

Re: Is this a bug? - $a doesn't get currentbase after selfilter

Post 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.
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

admin
Site Admin
Posts: 66249
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Is this a bug? - $a doesn't get currentbase after selfilter

Post by admin »

Yep, by design.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Is this a bug? - $a doesn't get current base name

Post 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.

Post Reply