Question #164015 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/164015

Description changed to:
Very beginning Python student who is using Sikuli to automate Video
editing in Final Cut Pro on Mac (SL 10.6.7). I record psychiatric
sessions of patients, and give them a copy of the video so I can get
their release to use it for training. I typically create a final cut
project for each client, add a quick title, import my video paths into
the project, and dump those videos onto a timeline and export the
timeline as a video into the source folder that the original videos came
from.

So far, I have successfully started final Cut Pro, created a project,
created a title and added it to the timeline, and saved the project to
the desktop using an assigned variable from the start of the script. I
am relying on keyboard shortcuts in FCP to do this, as FCP has no
applescript or Automator functionality.

However, I'm stuck after that. If I try to import video into the
project, how do I tell Finder where to go? The File paths to the raw
videos is different for each client, and I am only aware of screen caps
or using Tab and arrow keys to help Sikuli navigate through finder.
However, that would require me redoing the script for each patient. I
know I can do better.


I would like to be able to just create a small configuration text file with 1) 
the patient name, 2)the title for the video, 3)the file paths to the video 
resources,  4)the destination for the FCP project to be saved, 5)as well as the 
destination for the final exported video. 

So, my questions are:
1) should I only use Sikuli for this?
2) How do I instruct Sikuli to navigate the finder window?
3) What is the best way for me to import my variables into my Sikuli project? 
Is that done with a .csv file? XML? add python based "input" dialogues and set 
each one to a variable? Or something less elegant?

Any help (or just tell me the names of the areas that I need to read
about) in order to accomplish this would be ever so appreciated.

This is my script as is: 
client = "Henry3";
Title = client + "\n Demo with therapist \nLocation, State\nMonth Year"
#def initFCP(client, Title); Not using this currently. 
        switchApp ("Final Cut Pro.app");
#Unused currently, but I will create a if/else command to see if final cut is 
open already
#       openApp ("Final Cut Pro.app");
#       wait (15);
        type("4", KEY_CMD); #Special command)
        type("w", KEY_CTRL); #Close any other open project
        type("n", KEY_CMD+KEY_SHIFT); #New Project
        wait(1);
        type("s", KEY_CMD+KEY_SHIFT); #"Save As"
        wait( );#"Save window" image
        type(client + Key.ENTER);
        type("x", KEY_CTRL); #brings up title editor
        type("]",KEY_SHIFT+KEY_CMD);#FCP command to get to input field
        type(Key.TAB);#drops cursor into edit field"
        type(Title);
        type(Key.TAB);
        type(Key.F9);#adds title to timeline
        type("s", KEY_CMD)
        type("e", KEY_SHIFT+KEY_CMD) #export video

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to