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.

Attempting something simple proving to be very difficult

Featured Replies

  • Newbies

Greetings all, long time reader, first time caller, etc.

I've been thinking of the best forum to put this post and it seemed like this is the one for my problem, since it involves extensive use of AppleScript. Perhaps I would get better visibility elsewhere on the board, but I figured why not start here and work from there.

In plain english, I'm trying to do the following:

1) select a special text file defined by user input

2) run a perl script that generates an .svg graphic based on that text file

3) insert the .svg into a filemaker image container (not as reference)

4) insert the text file path into a filemaker text field

5) delete the .svg

I recognize that this is a little tricky for multiple reasons. Here is the approach I've worked out so far.

tell application "FileMaker Pro"

set plasmidfile to (choose file with prompt "Select your plasmid:") as string

set "Map location" of current record to plasmidfile

end tell

tell application "Terminal"

perl /Users/joel_r/Documents/Scripts/ape2svg.pl -i plasmidfile

# this perl script generates an .svg file with the input file name at the beginning and .svg appended at the end

set picturefile to plasmidfile & ".svg"

end tell

tell application "FileMaker Pro" 

# i want filemaker to put the .svg into the container field (not as reference!)

# i want filemaker to put the path into the text field

end tell

# then i will ask applescript to delete the .svg 

As you can see, I'm having problems. Chasing around the internet hasn't helped me that much (some information is obsolete, some too technical for my understanding). So here I am, hat in hand, asking for assistance. Thanks in advance!!

  • 6 months later...
  • Newbies

Briefly and without testing but should get you on the right track

 

set plasmidfile to (choose file with prompt "Select your plasmid:") as string

tell application "FileMaker Pro"

go to yourdatabase

go to yourlayout

set cell "Map location" of current record to plasmidfile

end tell

tell application "Terminal"

 

perl /Users/joel_r/Documents/Scripts/ape2svg.pl -i plasmidfile
# this perl script generates an .svg file with the input file name at the beginning and .svg appended at the end
set picturefile to (plasmidfile & ".svg" as string)

end tell

tell application "FileMaker Pro"

go to yourdatabase

go to your layout

--create a filemaker script and reference it from applescript 

do script "your import picture into field script with store as reference unchecked"

set cell "path ref" of current record to picturefile

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.