@chrscheuer is there a way to adapt the code and have the fader number be variable?
thanks!!
- SSoundFlow Bot @soundflowbot
Thanks for posting a question or an issue related to the 'EuControl' package.
This package is made by @chrscheuer. We're auto-tagging them here so that they will hopefully be able to help you.Please note, that the best way to get help with a script, macro or other content installed from the Store is to select the script you installed, then click the red Need help button, and then click "Get help with this script or macro".
By using this workflow, the developer of the package will get access to more information so they'll be able to help you quicker.
You can read more about how to best get help in this article: bit.ly/sfscripthelp - In reply torandy_matuszewski⬆:Christian Scheuer @chrscheuer2023-01-27 18:34:31.372Z
Hi Randy,
I'm not sure I understand - could you elaborate a bit on this?
- Rrandy matuszewski @randy_matuszewski
i'm currently using your script to assign selected tracks in PT to my S1. i'm curious if it could be adapted to say, select a track in PT, and then have a script to assign it to fader 3 or fader 6 or assign it to any fader number of my choice.
my goal would be to create buttons on my streamdeck that would be like "assign to fader 1", "assign to fader 2", "assign to fader 3", etc and then i can select the track i want in PT and then run the code to assign to the fader number i want.
Christian Scheuer @chrscheuer2023-01-27 18:47:55.173Z
Oh, I see! That would be a nice workflow indeed.
That should be fairly easy to implement.- Rrandy matuszewski @randy_matuszewski
i'm curious if this is still planned to be added or if there is any progress on this?
thanks so much!!
Christian Scheuer @chrscheuer2023-02-09 19:03:34.440Z
I don't have a EUCON device here to test with, but try this:
function assignSelectedTrackToFader(faderNum) { var faderIndex = faderNum - 1; var eucon = sf.ui.app('com.Euphonix.EuControl'); eucon.appActivate(); eucon.getMenuItem("Window", "EuControl Settings").elementClick(); var win = eucon.windows.whoseTitle.is('EuControl Settings').first; win.elementWaitFor(); //Switch to Assign tab win.tabGroups.first.radioButtons.whoseTitle.is('Assign').first.elementClick(); win.tabGroups.first.checkBoxes.whoseTitle.is('Display Application\'s Track Numbers').first.elementWaitFor(); //Clear existing assignments win.tabGroups.first.buttons.whoseTitle.is('Clear All Assignments').first.elementClick(); //Init var table = win.tabGroups.first.scrollAreas.first.tables.first; var rows = table.childrenByRole("AXRow").allItems; var selectedTrackName = sf.ui.proTools.selectedTrackNames[0]; //Assign tracks var row = rows[faderIndex]; if (!row || !row.exists) throw `Couldn't find fader ${faderNum}`; //Select row var cells = row.children.allItems; cells[cells.length - 1].popupMenuSelect({ menuPath: [selectedTrackName] }); } assignSelectedTrackToFader(1);
You can change the fader number to assign the selected track to in the last line.
- Rrandy matuszewski @randy_matuszewski
this works PERFECTLY!! thanks so much!
- In reply tochrscheuer⬆:Rrandy matuszewski @randy_matuszewski
i've tried to add a close window to the end of this. any chance you can help me with that add-on?
i REALLY appreciate your time and effort.
Christian Scheuer @chrscheuer2023-02-11 20:41:33.181Z
Something like this should do it (not tested though):
function assignSelectedTrackToFader(faderNum) { var faderIndex = faderNum - 1; var eucon = sf.ui.app('com.Euphonix.EuControl'); eucon.appActivate(); eucon.getMenuItem("Window", "EuControl Settings").elementClick(); var win = eucon.windows.whoseTitle.is('EuControl Settings').first; win.elementWaitFor(); //Switch to Assign tab win.tabGroups.first.radioButtons.whoseTitle.is('Assign').first.elementClick(); win.tabGroups.first.checkBoxes.whoseTitle.is('Display Application\'s Track Numbers').first.elementWaitFor(); //Clear existing assignments win.tabGroups.first.buttons.whoseTitle.is('Clear All Assignments').first.elementClick(); //Init var table = win.tabGroups.first.scrollAreas.first.tables.first; var rows = table.childrenByRole("AXRow").allItems; var selectedTrackName = sf.ui.proTools.selectedTrackNames[0]; //Assign tracks var row = rows[faderIndex]; if (!row || !row.exists) throw `Couldn't find fader ${faderNum}`; //Select row var cells = row.children.allItems; cells[cells.length - 1].popupMenuSelect({ menuPath: [selectedTrackName] }); win.windowClose(); } assignSelectedTrackToFader(1);
- Rrandy matuszewski @randy_matuszewski
perfect!! TYSM
- SIn reply torandy_matuszewski⬆:SoundFlow Bot @soundflowbot
This issue is now tracked internally by SoundFlow as SF-750