Focusing on named device

1.64K viewsCSS Community ScriptsDevices
0

Hello gurus,

I can’t figure out how to focus on a named device regardless his position in group/chain or not.

Any clue ?

Tutorial somewhere ?

Thx

Glenn V. Answered question
0

I’ll try to help think of a solution. It might take a bit of work to get what you’re looking after. Here’s some ideas off the top of my head:

The Visible Tracks list has a variable number of Tracks in it, depending on what Tracks are visible. This means that Track positions might change if you fold/unfold a group. It also means Tracks within a group that’s folded won’t be included in this list.

If you want to use a track number that’s always the same no matter if it’s visible or not, then you should use the Tracks list. You’ll still run into trouble when you reposition Tracks or when you add or delete a Track.

You could set up code that searches through all tracks, their chains (if they have them) and their devices until it finds the device you’re looking for. Then save those index numbers (for track, chain and device). Whenever you fire the code again it could then first try to use the saved indices but if it doesn’t find the correct device, then you let the code search through everything again. If it still doesn’t find the device you’re looking for you can let the code show you an error message.

Fabrice Planquette Posted new comment

Don’t worry, I can live with what I have for now. If I move the device, I’ll just reload the script by changing track, or mode, and back.

You are viewing 1 out of 4 answers, click here to view all answers.