In this script, we are going to learn how to add a file to the timeline. To add the file to the timeline, we first ask the user to select the file. To determine where on the timeline to add the file, we determine the timeline cursor location and add the file there. It will be added on the first video track in the sequence. The script does assume a sequence with at least one video and audio track exists.
This script will fully complete the process of adding a file to the timeline. However, we are going to modify this script further in the next video to learn how to break scripts into smaller pieces called subroutines.
This script uses a new feature we have not used before – importing files into the Premiere bin. This requires using the app.project.importFiles command which has multiple parameters. These four parameters are:
importFiles(files to import array, suppress warning flag, Bin to import the files, Image sequence flag)
In a future video we will look at how we can determine the available parameters for standard API calls.
Please sign up here and leave comments with suggestions of tasks you would like to see automated. You can help guide the direction of these videos. Also, please subscribe to my YouTube channel.