Page 1 of 1

User Button Not Working as Expected

Posted: 03 Aug 2026 15:33
by phred
Using XY 28.30.1600 on Win10 desktop.

I created a user button to toggle Read Only on or off. I select all the files in the list, click the button and only one file changes. I expected all selected files to change. This is the code I'm using. What do I need to change in order for it to work on all selected files?
attrstamp("r", 3, quicksearch("/f", <curitem>));

Re: User Button Not Working as Expected

Posted: 03 Aug 2026 15:36
by highend
If you've selected the files: attrstamp("r", 3);?

Re: User Button Not Working as Expected

Posted: 03 Aug 2026 15:57
by phred
Okay, this is now getting a little weird.

I tried your suggestion and it didn't change anything. Not with the entire list selected nor with one file selected. I went back to what I had originally and the attribute did not change with one or all files selected.

Re: User Button Not Working as Expected

Posted: 03 Aug 2026 16:14
by highend
Animation.gif

Re: User Button Not Working as Expected

Posted: 03 Aug 2026 16:42
by phred
Yes, I see that it works for you, but not for me.
2026-08-03_10-40-22.jpg
2026-08-03_10-40-44.jpg

Re: User Button Not Working as Expected

Posted: 03 Aug 2026 16:53
by highend
No clue what you want to say with these pictures...

Select one file, execute the script (from Scripting - Run Script...)
Post the result

Code: Select all

    $log    = <curitem> . <crlf>;
    $result = attrstamp("r", 3, <curitem>);
    $log   .= "Attributes before: " . $result . <crlf>;
    $result = attrstamp("r", 3, <curitem>);
    $log   .= "Attributes after: " . $result;
    text $log;

Re: User Button Not Working as Expected

Posted: 03 Aug 2026 17:22
by phred
The screenshots were my attempt to show you that the modified code you listed
attrstamp("r", 3);
didn't work.

One file selected, your script executed from Run Script. No attributes changed despite what this shows. 13 files in the directory; 2 are HS-A and 11 are R-A. Before and
Z:\Pending Audio\Chicago - Chicago Carnegie Hall Apr 5-10, 1971\CD3\04. Anxiety's Moment.mp3 Attributes before: 33 Attributes after: 32

Re: User Button Not Working as Expected

Posted: 03 Aug 2026 17:58
by highend
It obviously did work (at least that's what attrstamp says)
That file had the attribute +R before the script was executed
Then the script set it -R and again to +R

Re: User Button Not Working as Expected

Posted: 03 Aug 2026 21:10
by phred
Then might there be an issue with the attributes in the list not updating? Because that's what I'm basing my "it doesn't work" on.
The files show RA attributes. Before and after executing it.

EDIT: I found the problem. XY is not updating/refreshing the list after the script has run. I have view > auto-refresh enabled but it isn't auto-refreshing. Hitting F5 refreshes the list and updates the attribute.

I rolled back to 28.30.0702 and the issue is present. I toggles auto-refresh off and then on and XY is not refreshing the attributes. Looks like Don will have something to do when he returns. Do you think I should post this in the Bugs section?

Thanks, highend for helping me figure out what was going on.