I've been trying to write a script which send a selected clip from PT to RX 7, I don't want it to be clip by clip.
All I can do is open the RX7 connect window,
sf.ui.proTools.audioSuiteOpenPlugin({
category: "Noise Reduction",
name: "RX 7 Connect",
});
I can't get anything to click on the 'send' button. When I
try to make a script which clicks on the ui region 'send' it says its called 'analyse' and fails.
I also can't get anything to click on the 'Render' button.
In playing about with this I've found that the 'click relative to a UI element' shortcut, does not allow me to increment the X and Y parameters.
Is this a bug?
Thanks
Martin
- Christian Scheuer @chrscheuer2019-09-11 22:06:24.909Z
I can't get anything to click on the 'send' button. When I
try to make a script which clicks on the ui region 'send' it says its called 'analyse' and fails.Yes, interestingly Pro Tools internally calls the "Send" button "Analyze", so that's not a bug just a curiosity of Pro Tools.
It should be pretty easy to just send the audio without selecting Clip by Clip though. Let me check.I've found that the 'click relative to a UI element' shortcut, does not allow me to increment the X and Y parameters.
Yea I've noticed this myself, it appears to be a bug. I'll have to investigate next week when I'm back at our main office. It should be a quick fix.
Christian Scheuer @chrscheuer2019-09-11 22:07:27.828Z
Something like this should work for RX7:
var win = sf.ui.proTools.getAudioSuiteWindow('RX 7 Connect'); if (!win || !win.exists) { win = sf.ui.proTools.audioSuiteOpenPlugin({ category: 'Noise Reduction', name: 'RX 7 Connect' }).window; } win.getFirstWithTitle("Analyze").elementClick();
- In reply tochrscheuer⬆:JJonathan Grossman @Jonathan_Grossman
I'm getting this to work perfectly except...
After rendering in ProTools how do I have it automatically close the RX7 Connect window?Christian Scheuer @chrscheuer2020-04-20 20:13:26.549Z
If you have a
win
variable from something like this: https://forum.soundflow.org/-970#post-3then you just call:
win.windowClose();
- JJonathan Grossman @Jonathan_Grossman
Here's my code but still not working. I think I have that - win.windowClose(); - code at the bottom
var shuttleBtn = sf.ui.izotope.mainWindow.children.whoseDescription.endsWith('Main Window').first.children.whoseDescription.is("Shuttle").first; shuttleBtn.elementClick({}, "Could not click Send Back button"); sf.wait({ intervalMs: 500 }); sf.ui.proTools.appActivateMainWindow({}, "Could not activate Pro Tools"); var win = sf.ui.proTools.floatingWindows.filter(function(w){ var t = w.title.value; return t.indexOf("Audio Suite: RX") == 0 && t.indexOf("Connect") >= 0 })[0]; if (!win || !win.exists) throw "Could not find iZotope RX Connect AudioSuite window"; win.buttons.whoseTitle.is("Render").first.elementClick({}, "Could not click Render"); /* Uncomment to close when done sf.wait({ intervalMs: 100 }); sf.ui.proTools.waitForNoModals(); win.windowClose(); */
Christian Scheuer @chrscheuer2020-04-21 00:58:46.120Z
How is it not working? :) Try to be more descriptive - your code looks fine from a first glance, except of course for the fact that the 3 last lines are in a comment and so won't be run - I'm assuming you put that comment there because it wasn't working?
- JJonathan Grossman @Jonathan_Grossman
It won't close the window. And I didn't know the bottom part was a comment. That was copied from prior code.
Christian Scheuer @chrscheuer2020-04-21 11:03:39.680Z
I formatted your code now in your post - this also makes it more visible that the last few lines that are part of the comment are not in fact being executed (they turn grey here, probably green in the editor).
Anything between
/*
and*/
in Javascript is considered a multi-line comment and as such won't be executed. Anything after//
on the same line is considered a single-line comment and also won't be executed.To fix this, uncomment the lines in question:
var shuttleBtn = sf.ui.izotope.mainWindow.children.whoseDescription.endsWith('Main Window').first.children.whoseDescription.is("Shuttle").first; shuttleBtn.elementClick({}, "Could not click Send Back button"); sf.wait({ intervalMs: 500 }); sf.ui.proTools.appActivateMainWindow({}, "Could not activate Pro Tools"); var win = sf.ui.proTools.floatingWindows.filter(function(w){ var t = w.title.value; return t.indexOf("Audio Suite: RX") == 0 && t.indexOf("Connect") >= 0 })[0]; if (!win || !win.exists) throw "Could not find iZotope RX Connect AudioSuite window"; win.buttons.whoseTitle.is("Render").first.elementClick({}, "Could not click Render"); // Uncomment to close when done sf.wait({ intervalMs: 100 }); sf.ui.proTools.waitForNoModals(); win.windowClose();
Christian Scheuer @chrscheuer2020-04-21 11:04:27.373Z
To correctly format your code in the forum, create a line with three back ticks
```
and nothing else, one line before and one line after your script block.
I've edited your post so if you edit it you can see how it works.
- MIn reply toMartin_Pavey⬆:Martin Pavey @Martin_Pavey
That works Christian, thanks.
Now predictably I'm trying to send it back and render the highlighted clip.
I've got as far as sending it back with command return from RX7, but I can't get the audiosuite plugin
to render.- MMartin Pavey @Martin_Pavey
I've got it to work with this:
sf.keyboard.press({
keys: "cmd+return",
});
sf.wait(1000);
sf.ui.proTools.audioSuiteRenderCurrent();But maybe there's a better way?
Christian Scheuer @chrscheuer2019-09-12 01:35:54.767Z
This is how it's done in the official Dialog Editing iZotope package (for RX6):
var shuttleBtn = sf.ui.izotope.mainWindow.children.whoseDescription.contains('Main Window').first.getFirstWithDescription("Shuttle"); shuttleBtn.elementClick(); sf.wait({ intervalMs: 500 }); sf.ui.proTools.appActivateMainWindow(); var win = sf.ui.proTools.getFloatingWindowWithTitleStartingWith("Audio Suite: RX 6 Connect"); var renderBtn = win.getFirstWithTitle("Render"); renderBtn.elementClick();
If you want to check these things out yourself, you can click "View Source" on the command if you have installed the Dialog Editing iZotope package from the store. This was taken from the "iZotope RX - Render & Spot" command.
Christian Scheuer @chrscheuer2019-09-12 01:36:34.343Z
I like yours actually, it uses some newer actions. Both solutions I assume work pretty smoothly.
- MMartin Pavey @Martin_Pavey
The RX6 one doesn't work in 7, at least not on my setup.
I"m not sure what it does, but it doesn't achieve the send back and render.
Anyhow, I'm happy with mine.
Thanks- JJohn Rammelt @John_Rammelt
Hi Martin,
I'm also on RX 7 and this is "my"(actually just copied stuff) 'Send back to Pro Tools and Render' script:
var shuttleBtn = sf.ui.izotope.mainWindow.getFirstWithDescription('RX7 Main Window').getFirstWithDescription("Shuttle"); shuttleBtn.elementClick(); sf.wait({ intervalMs: 500 }); sf.ui.proTools.appActivateMainWindow(); var win = sf.ui.proTools.getFloatingWindowWithTitleStartingWith("Audio Suite: RX 7 Connect"); var renderBtn = win.getFirstWithTitle("Render"); renderBtn.elementClick();
- MMartin Pavey @Martin_Pavey
Thanks John,
I'll give it a try.
I'm pretty happy with the one I made to be honest, it seems to do the job.
Cheers
Martin
- In reply toMartin_Pavey⬆:Christian Scheuer @chrscheuer2019-09-18 05:17:11.884Z
Clicking +/- on the "Mouse Click Relative to UI Element" action will be fixed in v3.0.1
- MMartin Pavey @Martin_Pavey
That's great!
Thanks Christian.