2 Replies Latest reply on Feb 5, 2011 8:57 AM by johnp1

    Insert Object command in script with variable file name?

    johnp1

      Title

      Insert Object command in script with variable file name?

      Post

      I'm organizing and managing sound files with FM Pro 10.0 in Windows.  I have tens of thousands of audio files in .mp3 format, created with Adobe Audition and other products.   

      Currently, in a text file if a file name (.mp3) is placed within {curly brackets}, the layouts can identify that as a reference to a sound file.  I have created container files in which to embed the audio files.

      Manually I am able to simply drag and drop an mp3 file into a container field, which then acts like a button: double click on the container in browse, and Windows Media Player opens and plays the file.  FANTASTIC!  (more on that in a minute)

      Problem One: I'd like to automate the process.  I have calculated text fields that include the name of the file and the filepath. But the script command "Insert Object" doesn't allow me to use that field as a variable in the command line.  I'd like to "insert" each sound file on as as-needed basis, via button and script, and keep the larger file archives separate, so programming the variable into the script is essential.

      Is there a way to automate the "insert object" process with a variable for a file name/file path? 

      I've tried several "Send  Event" scripts using a variable, but that doesn't seem to work either.

      (Also: please note that currently the file folders have spaces in their names.  Is that still a problem with FM?  I can add plusses + to the string if needed.)

      Now comes Problem Two (3?):  when I have several mp3s successfully loaded into containers in a layout, I can double click on anyone one of them and Media Player opens and plays the sound file.  But if I leave MP open and double click on another file, MP says it "can't find" the file in question.  It's consistent: if you close MP before moving to the next file, it plays.  If you leave MP open, it does not. 

      No, I have not moved, renamed or deleted the files in question, obviously, since I can close MP and then double click and everything is fine.

      screen_shot_of_windows_media_Player_error_message_in_FM_pro.JPG