I think this can be done, but im struggling.
In my AE UI, if a button is clicked, I want to launch a QT file that is located in a directory on a server. I dont want it imported, i just want it to open in QT.
Im thinking if it like a help tutorial for people using my UI.
File system access > File object functions:
Opens this file using the appropriate application, as if it had been double-clicked in a file browser. You can use this method to run scripts, launch applications, and so on. Returns true immediately if the application launch was successful.
var theFile = File.openDialog("Choose the file to open");
// and rather than an openDialog you'll probably be hardcoding it in? although you'll probably have to tailor the path to the user's machine by deriving it from some file location your know
// theFile = File(<your file path here>);
if (theFile != null) theFile.execute();
Hello, thank you.
Still no luck. I am hardcoding it, so i removed the "if"
var theFile = File("\\server\Folder\Folder\MyVideo.m4v");
Is that the file path you got when using my version and seeing what the alert said when you selected that file?
You could also try this which will give you an alternate kind of path:
lol. figured it out. I needed all the "\" to be changed to "/"
Tht did it. Thank you.
Also note that the constant for the string \\server\Folder\Folder is "\\\\server\\Folder\\Folder", since \ symbols in string constants need to be escaped.
What @Paul Tuersley suggests it definitely the best and easiest option.
If you need more control and don't want to open the file with the operating systems default program for this type of file, launching a program using the system.callSystem() command is also an option, but more complicated: https://ae-scripting.docsforadobe.dev/general/system/#system-callsystem