Jump 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.

Folder action to trigger FP5 script

Featured Replies

I hope someone has the answer for this. I want to create a watched folder by writing an Applescript that is attached to a folder with folder actions. The script will tell Filemaker Pro to run a a particular script.

When I write a script that simply says:

tell application "FileMaker Pro"

do script "import_textfile"

end tell

it works if I just run the script manually, but when I make it a folder action and drop the file "textfile" into the folder, nothing happens.

Help, please. thanks in advance.

Two things: be careful about you syntax and keep the folder open. Experiment with example scripts (available from Apple). Something like this

on adding folder items to this_folder after receiving the_items

--Your script here

end adding folder items

handler.

Folder actions will only work if the folder is open. (You can add a keep open subroutine to your folder script, also found in the Apple sample scripts.)

  • 2 weeks later...
  • Newbies

Here is part of a folder action script that I wrote to import a tab-delimited file into a FileMaker Pro 5.0 database. On adding a new file to a folder, the script will make sure FileMaker Pro is running, then open the database that I've hard-coded, and run the script.

tell application "Finder"

activate

set the selection to the added_items

repeat with i from 1 to the number of items in the added_items

set this_item to (item i of the added_items)

try

select file "CCS.Jackson.fmp" of desktop -- CHANGE THIS TO MATCH THE FILEMAKER DATABASE NAME OF YOUR CHOICE

open selection

tell application "FileMaker Pro"

activate

do menu menu item "Import Records" of menu "Scripts" --THIS CALLS THE FILEMAKER SCRIPT THAT YOU CREATE

end tell

on error

display dialog "Something bad happened, and I'm not happy about it!!"

end try

end tell

end repeat

end tell

Create an account or sign in to comment

Important Information

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

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.