Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script getting stuck when playing soundfile

Featured Replies

Hi. I'm working on creating a script that basically performs the function of a photo slide show with music underneath it.

How I have it now when the script runs another version of the window is opened and the container field with the soundfile is triggered. The script is written then to go back the the original window and run through a series of records with pauses in between. When I trigger the soundfile (~30 sec) the script seems to stick at this step (Go To Field[select/perform]). I can hit Apple period and it unsticks and continues on its way, but I'm not sure how to get around this automatically. Any ideas?

You could play the sound file with something outside of FileMaker. If this is all on Macs, I can think of a couple of tools to do that with AppleScript, and there are probably others. The first most obvious choice is to use iTunes, and control its interface (show a small window, etc.). There are web sites with lots of AppleScripts for iTunes.

But a simpler method is to use a command line player. One I know of is Play.

http://www.hieper.nl/html/play.html

Its use is pretty simple. Give it a Unix path of a sound file, and play it. It supports setting a maximum time to play. Example, choosing a file:


set sound_file to quoted form of POSIX path of (choose file without invisibles)



do shell script "play -t 30 " & sound_file

You would need to Export Field Contents to get the sound file out of the container into a file. I don't know how large your sound files are, so this may take a second or two. You could send them to a temporary folder, which you can do with either FileMaker's Get (TemporaryPath) function, or use AppleScript's path to temporary items command to find the user's.

P.S. FileMaker's Get (TemporaryPath) requires 9, but really only works properly in 10, in my opinion. The one in 9 does not seem to actually remove the items. Which can be a problem with lots of large files like this. At least, that's my experience. They fixed this in FileMaker 10.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.