osx - How to dynamically target the different FileMaker applications -
i'm writing system-wide service accept selected text , various searches in our internal filemaker database.
i've written works fine on dev machine, filemaker exists "filemaker pro advanced". can't work on others machines non-developer version of filemaker ("filemaker pro") installed.
the issue when script runs in 1 of client machines, "where foo" dialog (i'd say) because of "using terms" line, , don't want that. possible target filemaker can compile script , run on clients ?
here's have :
on run {input, parameters} set _target null try tell application "finder" name of application "filemaker pro advanced" set _target application "filemaker pro advanced" end try if _target null try tell application "finder" name of application "filemaker pro" set _target application "filemaker pro" end try end if if _target null display alert "filemaker cannot found" return end if using terms of "filemaker pro advanced" tell _target -- script goes here end tell end using terms of end run
if can expect end user's installation of filemaker in standard place, following should work:
set _fmpa "/applications/filemaker/filemaker pro advanced.app" set _fmp "/applications/filemaker/filemaker pro.app" try tell application _fmpa launch set _target _fmpa end try try tell application _fmp launch set _target _fmp end try tell application _target ... end tell
Comments
Post a Comment