Scott's PT Spotter misfires upon attempting to open Spot dialogue
Title
Scott's PT Spotter misfires upon attempting to open Spot dialogue
What do you expect to happen when you run the script/macro?
The first step is to create a mouse click relative to the selected track (the region)
Are you seeing an error?
!! Command Error: Spot To Orig. TC [user:default:cm5evqm1g00000l10cscstoga]: @Error invoking mouse.clickElement (Spot To Orig. TC: Line 9) MouseClickAction requires valid UIElement Couldn't get item #0 as the array length was 0 - sf.ui.app('com.avid.ProTools')..buttons.whoseTitle.is('OK').first (AxElementArrayIndexedItem)
This is the full error
What happens when you run this script?
Only the error message pops up when I hit the macro. If I already have the "Spot dialogue" open by clicking the region myself, it completes the rest of the cycle, so the problem seems to be with clicking on the selected region in order to bring up the spot dialogue automatically.
How were you running this script?
I used a Stream Deck button
How important is this issue to you?
5
Details
{ "inputExpected": "The first step is to create a mouse click relative to the selected track (the region)\n", "inputIsError": true, "inputError": "!! Command Error: Spot To Orig. TC [user:default:cm5evqm1g00000l10cscstoga]:\n@Error invoking mouse.clickElement (Spot To Orig. TC: Line 9)\n MouseClickAction requires valid UIElement\n Couldn't get item #0 as the array length was 0 - sf.ui.app('com.avid.ProTools')..buttons.whoseTitle.is('OK').first (AxElementArrayIndexedItem)\n\nThis is the full error", "inputWhatHappens": "Only the error message pops up when I hit the macro. If I already have the \"Spot dialogue\" open by clicking the region myself, it completes the rest of the cycle, so the problem seems to be with clicking on the selected region in order to bring up the spot dialogue automatically.", "inputHowRun": { "key": "-MpfwmPg-2Sb-HxHQAff", "title": "I used a Stream Deck button" }, "inputImportance": 5, "inputTitle": "Scott's PT Spotter misfires upon attempting to open Spot dialogue" }
Source
//Macro converted to script
sf.ui.proTools.selectedTrack.mouseClickElement({
relativePosition: {"x":21,"y":0},
anchor: "MidRight",
});
/* sf.ui.proTools.selectedTrack.groups.whoseTitle.is("Audio IO").first.mouseClickElement({
relativePosition: {"x":65,"y":23},
anchor: "MidRight",
}); */
sf.wait({
intervalMs: 20,
});
sf.ui.proTools.focusedWindow.buttons.whoseTitle.is("OK").first.mouseClickElement({
relativePosition: {"x":-18,"y":-55},
anchor: "TopRight",
});
sf.keyboard.press({
keys: "numpad enter, semicolon, cmd+a",
fast: false,
});
Links
User UID: ToNEzlPzjsawhCxwcp0ZUZQVEX93
Feedback Key: sffeedback:ToNEzlPzjsawhCxwcp0ZUZQVEX93:-OF_Ul-nxF8ZLk1FhXQT
Feedback ZIP: bib+VDWiNAFDPABFWeh48vuScZTWUvX//qlOZXmraMVb5e3AYELSF416cGMXSPKOt2T7J/hDCJOILtUaHv1gE8hjHIfTD+V+PZuiuF0rNreiO1jFtkoQjUYAWhY7MVwvx6LVwgWrF+RUMbtOdcWtpH228QgwijcPcnsClkj7Kdy/L9KPoQ4IBEU98V2iplffOU66NnIEG2iP0xQwumBcerGCGP8mpF9n2uh0AhiKk1RyJGaO8fNQNztgn2L87CG3TgKOZHM2s6GRPovnYlodb6ZXXaUU+o9ivKV2kDytPYwuqmfL5pVbmQIi16HQSAB0bUSFfeYc4tAPJoz2evYCglc4U/UP6xUBNUehigpb4T0=
- In reply toBrandon_Paddock2⬆:Scott Stevens @Scott_Stevens
Hi Brandon,
Just confirming I've seen this. I've not the bandwidth to tuck in just now, but you may find some helpful code in the thread linked below. Seems this function has been a bit ticklish for some time. Thanks for upping the issue.