Applescript to open FileMaker files with account details

Discussion in 'Mac Programming' started by VickyN, Apr 14, 2011.

  1. VickyN, Apr 14, 2011
    Last edited: Apr 19, 2011

    VickyN macrumors newbie

    Apr 14, 2011

    I need a script that will open all the FileMaker files in a specified folder logging in with specific credentials. I've written the Applescript shown below however I'm still being prompted for a username and password despite explicitly scripting it in and I get no errors from the script...

    Script is below:

    set thefolder to choose folder
    tell application "Finder"
    	set numberoffiles to count every file in folder thefolder
    	set thefiles to the files of folder thefolder whose name contains ".fp7"
    	set accountdetails to "passwordgoeshere"
    	repeat with thisfile in thefiles
    		tell application "FileMaker Pro Advanced"
    			open thisfile with passwords accountdetails for Accounts accountdetails
    		end tell
    	end repeat
    end tell
    You might ask why I want to open these files like this - there's a good reason! We're converting our fp5 databases to fp7 and to get the freshest set of data into our newly tweaked and fixed fp7 files we convert the fp5 files into fp7 format and import the data across...

    Thanks All!


Share This Page