Page 1 of 1

Selecting items in a filtered list

Posted: 14 Mar 2018 18:44
by DixieCup48
Am working hard to improve scripting skills. Have gotten better but frequently come up short.

Am trying to select all MP3's from a filtered list. Have tried both:

Code: Select all

     selectitems  ".mp3";
     selectitems  "*.mp3";
but neither does the job. Can some one help?

Re: Selecting items in a filtered list

Posted: 14 Mar 2018 19:59
by highend
selectitems requires an itemlist, not a pattern...

Code: Select all

selfilter "*.mp3";
But depending on if you want to do something with these items afterwards, I'd tend to use e.g.:

Code: Select all

$files = listpane(, "*.mp3");

Re: Selecting items in a filtered list

Posted: 15 Mar 2018 13:06
by DixieCup48
Thank you for the help and guidance. Your code has been inserted into the little script which now works!

It is sad though to this extent. Just when the learning curve was moving along hadn't even used the right scripting command. No wonder it wasn't working. :cry:

Re: Selecting items in a filtered list

Posted: 15 Mar 2018 13:08
by highend

Code: Select all

step; / unstep;
are your best friends (normally)...

or e.g. a question mark in front of a command (short version of step;)