thank you both so much, i tested trout's code first and i'm satisfied with it enough. i used the second code for the left part, because the first one was leaving the "-" in front of a number, when the song was queued only 1 time. but thank you MacStew anyway, much appreciated.
now it looks like this:
$puts(track.textQR,$substr(%queue_indexes%,$add($strrchr(%queue_indexes%,','),1),$len(%queue_indexes%)))
$puts(track.textQL,$left(%queue_indexes%,$sub($strchr(%queue_indexes%,','),1)))
as for the "action" script, i basically just compared the right number with the left, so when the numbers are the same (so the song has been queued only 1 time), the %queue_indexes% is shown (could be %queue_index% too). if someone wants to use the script, here it is:
$ifgreater(
$get(track.textQR),
$get(track.textQL),
$drawtextex(['['$get(track.textQL)'-'$get(track.textQR)']'],
$sub(%el_width%,$get(L.width),$get(text.right),30),$get(text.top),$get(L.width),%el_height%,$get(text.color),vcenter right),
$drawtextex(['['%queue_indexes%']'],
$sub(%el_width%,$get(L.width),$get(text.right),30),$get(text.top),$get(L.width),%el_height%,$get(text.color),vcenter right)
)
the only problem is, if you queue song1 multiple times, then queue song2 and after that queue song1 again, you will get the wrong numbers. for example "1,2,3,5" will turn into "1-5", which is wrong. but i don't think i will ever queue the songs like that, just so you know. thanks everyone involved!