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.

Featured Replies

  • Newbies

I have this script that works ok when Ii run it from Applesript editor.

It brings ne the pdf box I´m after.

I want to run this script inide Filemaker, but can´t get it to work..

What am I missing here.. ??

Thanks for any tips on how i can make script like this work.

------------

on run

set fs to choose file of type "com.adobe.pdf" with prompt "Select one or more PDF files to process:" with multiple selections allowed

my process_files_(fs)

end run

on open fs

my process_files_(fs)

end open

on process_files_(fs)

repeat with f in fs

tell application "System Events" to set finfo to the properties of f

if kind of finfo is "Folder" then

tell application "Finder" to set dirList to (items in f) as alias list

do shell script "echo Directory: " & name of finfo & " >> $HOME/Desktop/List.txt"

process_files_(dirList) -- recurse directories

else if tolower(«class extn» of finfo) is not equal to "pdf" then

tell me to activate

tell me to display dialog (name of finfo & " is not a PDF file") with icon caution giving up after 2

else

my process_PDF_(f)

end if

end repeat

end process_files_

on process_PDF_(f)

do shell script "echo " & space & trimbox_(quoted form of POSIX path of f) & return

end process_PDF_

on tolower(theText)

try

set newText to do shell script "echo" & space & theText & space & "| tr \"[:upper:]\" \"[:lower:]\""

end try

return newText

end tolower

on trimbox_(f)

set tb to do shell script "export VERSIONER_PYTHON_PREFER_32_BIT=yes;

/usr/bin/env python -c 'import os, sys, glob, Quartz

this_pdf = Quartz.CGPDFDocumentCreateWithProvider( Quartz.CGDataProviderCreateWithFilename('\"" & f & "\"') )

page = Quartz.CGPDFDocumentGetPage(this_pdf, 1)

r = Quartz.CGPDFPageGetBoxRect(page, Quartz.kCGPDFTrimBox)

print \"%.2f x %.2f\" % (round (r.size.width*0.352777778) , round(r.size.height*0.352777778))

Quartz.CGPDFContextClose(this_pdf)' "

set trimboks to tb

display dialog "TrimBox= " & trimboks & " mm"

end trimbox_

-----------------------

What do i have to do to get this to work in Filemaker ?

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.