登录:     


Forum: General Discussion

Topic: Script Question
automix ? nothing : deck 1 play ? browser_scroll +1 & deck 2 load & deck 2 volume 0 & .......

is there an action / verb that would load the next song in a list regardless of where my curser is?

I have this part in my script, ( i didn't put the rest in as it does as intended) and am pleased with the script except for this portion. I works fine if I have my curser highlighted over the previous song. If my curser is anywhere else, it loads the song highlighted after where the curser is or the first song in the list. I have tried other verbs such as load_next to no avail. Not sure if what i am after is possible. Thanks.
 

发表时间 Thu 23 Jul 26 @ 11:36 am
What's wrong with load_next?
 

Adion wrote :
What's wrong with load_next?


It appears to only load the next song depending on where my curser is. I was wondering if i could load the next song in the list regardless of where my curser is.

 

tricky, save song on deck's position in list, save current browser_scroll position, do some math to get scroll to the correct position and load, revert the math to get where browser_scroll was

All kind of falls apart on a lot of if cases; loaded on deck isn't in list browser focus not where expected
 

`browser_scroll +1` moves from wherever the browser cursor is, so it won’t always pick the song after the one playing.

The easiest fix is to use the Sidelist as your queue:


 automix ? nothing : deck 1 play ? (deck 2 volume 0 & deck 2 sidelist_load_and_remove) : nothing 


That loads the first song from the Sidelist onto Deck 2 and removes it from the list, no matter where the browser cursor is. Let me know if the solution can work for you.