Welcome Guest

Pages: 1
Action: Add to List and padded sequential integer ?
PchPostJuly 1, 2025, 11:04
Newbie
Posts: 4
Registered:
July 1, 2025, 13:49
Normal topicAction: Add to List and padded sequential integer ?

Hi there 🙂

I'm very much a newbie to Yate and more precisely writing actions ^^... and I'm currently trying to write an action to export a "summary" of a multi-disks album to a markdown file...

In that "summary", I would like to have a tracklist where the track number is not the one the open tracks are currently tagged with (which would be: Disc: w of x, Track: y of z) but the number representing the visual position of a track in the open/selected list of tracks, with a padding of 2 (so the first 9th tracks in the list should look like: 01 ... , 02 ..., etc...).

I've tried my best to look at the extensive documentation (Thank you for writing it 😀 ) and found a way to do almost what I want to using an "Add to List" statement in which I summon the "Insert sequential integer" (\1) where it's needed ...

Following the info I found here https://2manyrobots.com/YateResources/InAppHelp/InsertSeqInt.html, I should be able to pad it ... but however I write the \1 in the "Add" box of the Add to List, I get the sequence of number, but not the padding...

The full "Add" is actually this:

\1 \[Title] (\!Time (hh:mm:ss)!)

... It's added at the end, and enumerate all files is checked/true...

Maybe, as a total noob to Yate's actions, I'm just doing something wrong or didn't choose the right approach 🙂

I can live without the padding of the sequential number (as, well, the action so far works) but I would like to know if there's a way to get the padding working for \1 ?

Thank you very much in advance for any tips/help 😀

2MR2PostJuly 1, 2025, 11:21
Avatar photo
Administrator
Posts: 2362
Registered:
August 23, 2012, 19:27
Normal topicAction: Add to List and padded sequential integer ?

If I understand correctly what you want, (and I'm a little fuzzy today), it's easy.

You can find help for all escape sequences via Help>Quick Reference>Escape Sequences

To summarize, the \1 sequence reads and writes a named variable called Integer to Insert.

The format is next{,pad{,increment}}.

next can be any integer value and is the next integer to be inserted.

pad is optional and defaults to 0. A pad of 2, 3 or 4 can be specified.

increment is optional and defaults to 1. After the next integer is inserted it is incremented by the increment value and is written back to the Integer to Insert named variable. If the named variable is initially empty, 1,0,1 is assumed.

You should set the named variable (initialize it) before you use \1 as follows:

Set named variable 'Integer To Insert' to "1,2"

You can find all special purpose named variables by right clicking in a text field and selecting Insert Special Named Variable. Unfortunately, Integer to Insert is under Miscellaneous 🙁

PchPostJuly 1, 2025, 11:39
Newbie
Posts: 4
Registered:
July 1, 2025, 13:49
Normal topicAction: Add to List and padded sequential integer ?

Oh my... 😀 !!!

Thank you so so so very much 😀 !
For the more than fast answer and solving my tiny padding issue 😀 )

I was missing that step ^^...

Set named variable 'Integer To Insert' to "1,2"

My action now does exactly what I wanted it to do 😀 !

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.025 seconds.