Import Session Data UI Issues - Here Is My Script
I've gotten this to work so far but all it does it selects the track I want and just sits there. It does not find the target track which is OMNI. I tried to do this with the mouse UI where you get the location of the mouse. It was hell and it changed constantly. I spent an entire 2 days programming all of my temp in sections. Started to open other sessions and the script would work only half the time. And on many it started selecting the wrong tracks and importing them! Really a pain in the ass. I am about to give up on this.
sf.keyboard.press({
keys: "alt+shift+i",
});
sf.wait({
intervalMs: 500,
});
sf.keyboard.type({
text: "c",
});
sf.keyboard.press({
keys: "cmd+down",
});
setTimeout(() => {
startElement.elementClick();
}, 1000); // 1 second delay
// Find the initial element to be clicked (K IN_m (Stereo))
const startElement = sf.ui.proTools.windows.whoseTitle.is("Import Session Data")
.first.tables.whoseTitle.is("Source Destination")
.first.children.whoseRole.is("AXRow")
.allItems[2].children.whoseRole.is("AXCell")
.first.children.whoseRole.is("AXStaticText")
.whoseTitle.is("K IN_m (Stereo)")
.first;
// Click the initial element
startElement.elementClick();
// Find the target element to drag to (OMNI (Stereo))
const targetElement = sf.ui.proTools.windows.whoseTitle.is("Import Session Data")
.first.tables.whoseTitle.is("Source Destination")
.first.children.whoseRole.is("AXRow")
.allItems.find(item =>
item.children.whoseRole.is("AXCell")
.first.children.whoseRole.is("AXStaticText")
.whoseTitle.is("OMNI (Stereo)").exists()
);
// Now simulate the drag action
const actions = new Actions(driver); // Assuming driver is your WebDriver instance
actions.moveToElement(startElement) // Move to the starting element
.clickAndHold() // Click and hold to start dragging
.moveToElement(targetElement) // Drag to the target element
.release() // Release the mouse button
.perform(); // Perform the action sequence
sf.keyboard.press({
keys: "return",
});
- Christian Scheuer @chrscheuer2024-08-12 11:42:55.793Z
Hi Clay,
The script you've shared appears to contain some contents that were written by ChatGPT or copied from something that has nothing to do with SoundFlow (more like WebDriver, which isn't used in SoundFlow).
To get better help, it's much easier for the community to contribute if you can describe exactly what you'd like the script to do.
For this reason, we typically recommend getting script help by following this guide, as it asks you questions that are designed to make it easier for the community to help you:
https://soundflow.org/docs/help#script-helpNote, you can see here how to quote code in the forum so it's more readable:
https://www.youtube.com/watch?v=FRLCp6Sf9AI- CClay Blair @Clay_Blair
Hey Christian,
Thank you. Well i tried posting a UI script I had made previously but there were no reponses.
I want to be able to import session data from the same template for mixing. It takes a bit of time to do and to be able to make it happen quickly is the idea.
Previously i had code that was written using Macros. It was mostly all mouse moves and key commands. But what would happen is the mouse drag would change. It would import the wrong tracks after a couple tries or not work at all in some cases. Nothing had changed in the code or Macros either. This was frustrating. I want to be able to use this everytime and not have an issue.
Thank you.
Christian Scheuer @chrscheuer2024-08-15 09:50:02.234Z
I want to be able to import session data from the same template for mixing
Try to be more specific than this.
The best way to get help with a macro is to list the exact steps you would follow as a user that you want automated.
For example:
- Open the Import Session Data process
- Select a specific file based on a path name you've predefined
- Select track X, Y, Z, A, B, C
- do blabla
Without this information, it would be close to impossible to help with the script as we can't guess what it's trying to do. The more specific your request, the easier it is for everybody to help. If you're not seeing replies, it's most likely that the question wasn't easy to answer with the context we had.
- CClay Blair @Clay_Blair
Ok I will explain better then.
- Open Import Session Data
- Open the correct template folder ie: x_cb mix temps
- Type "c" (to higlight my mix template session)
- Hit Enter
- Select the first 15 items in the UI list in the import session data window
- Hit Enter
So that would be just to import (DRUMS) on my mix template.
Bass would be this:
- Open Import Session Data
- Open the correct template folder ie: x_cb mix temps
- Type "c" (to higlight my mix template session)
- Hit Enter
- Select the items in the UI list "BASS 1, BASS 2, BASS_m" in the import session data window
- Hit Enter
The issue is it does not perform this every time with the macros i have. The mouse UI macros are really unreliable. I get errors often or it does not highlight the correct tracks. Ive spent about 40 hours on these scripts and macros. And i am currently using none of them in my daily workflow because of unreliability.
Christian Scheuer @chrscheuer2024-08-24 16:55:59.478Z
Hi Clay,
That's a much better start - thank you!
And yes, you should not use mouse clicks to automate this, that would always be unreliable. I'd recommend checking out these videos to learn more about how to build this type of stuff:
That being said, for the Import Session Data dialog, to do everything you asked for, you'll likely need to build a script.
Many users have already built scripts for this though, so, hopefully they can give you some help.
Here's one example:
Import session data #post-2