Jump to content

Play external audio file through script in FM


This topic is 3632 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I have a database which has records of audio files which live on our network. One of the fields in the database is the filepath for each audio file. I would like to create a script which will play the audio file which is named in the filepath field.

I do not want to put the the actual audio into a container field as this database has over 40k records and will only get larger.

I have tried the Send Event script step and i have gotten that to open VLC media player or Quicktime (although even that doesnt' seem to want to happen now), but I then have to go back to filemaker and copy the path from the filepath field. Is there a way to automate this whole process without having to go back and manually copy the file path?

It was suggested that I use "Store by reference" when inserting the file into the container field, but I can't get anything to play from that (either by a script or clicking on it).

Another person suggested creating a calculation field which returned the name of the file which had been inserted into the container field, again -- didn't work.

With the Send Event script step, I can get it to open text documents or spreadsheets with no problem. It doesn't seem to work the same for an audio file.

I know i'm probably just missing a few steps. At this point, i'm just at a loss as to what.

A typical path in the filepath field would be something like: d:\library\audio\nature sounds\AP01_01_01.wav

The filepath field is set up as a text field.

Link to comment
Share on other sites

It was suggested that I use "Store by reference" when inserting the file into the container field, but I can't get anything to play from that (either by a script or clicking on it).

What happens when you do that - then double-click the container field?

Link to comment
Share on other sites

i have a similar thing happening for my sound library. works ok. i play the audio file through a script, attach to a button, it's elaborate, but the essential line says:

Go to Field [select/perform, ContainerField]

make sure that the 'Select/perform' option is checked.

hth,

stefan

Link to comment
Share on other sites

  • 4 weeks later...
  • Newbies

When i double click on a container field (after saving the file as a reference), nothing happens. The container field doesn't seem to be the way to go. I have over 40K audio files with which I need to set up a way to play them but not include them in the database.

I have gotten VLC to play through a Send Event script step, but this is iffy. Every time I log off, when i log back on, it doesn't recognize the vlc command anymore and i have to play around with it to get it to work again. Obviously, that's not a good solution either.

When I do get it to play through a Send Event script step, I have used the following calucation: "vlc "&filepath (where filepath is the field name which contains the full length of the path where the audio file is actually located). This is what has worked. But, like I said, if i log out, it may not work again next time.

If I use a command like "cmd /c vlc.exe"&filepath, there is a black flash of the dos prompt box opening and closing and that is it.

Link to comment
Share on other sites

When i double click on a container field (after saving the file as a reference), nothing happens.

Then you have a problem - and I am not sure of the nature of the problem. Double-clicking the container field should open the referenced file in its native application. Perhaps you should try this with other types of file to see if it matters.

Link to comment
Share on other sites

  • 2 years later...

This topic is 3632 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.