August 30, 200124 yr I have a scriptmaker script to enter find mode which my Applescript calls. I then want the applescript to set a field in the find request to a string variable held in my applescript at which point the applescript will call another two scriptmaker scripts that performs the find and deletes found records respectively. I tried doing this all in applescript but I am not yet up to scratch on FM language keywords and syntax for applescript. Where I am going wrong is in the following code when I try to set the "MACAddress" field. I keep getting an error saying "Can't get or set "MACAddress" to "VariableContents" tell application "Finder" activate my GetMACAddressFromName(the_item) move the_item to folder DPImportFolder tell document FMLaunchFileName of application "FileMaker Pro" activate do script FileMaker script "Open ASP Desktop Printers Database" set theRequests to the_item_MACAddress as string tell document "ASP Desktop Printers" of application "FileMaker Pro" activate do script FileMaker script "Enter Find Mode" set contents of field "MACAddress" of current record to theRequests do script FileMaker script "Perform Find" do script FileMaker script "Delete Found Records" end tell end tell my DPImport(the_item) end tell
September 6, 200124 yr To perform a find in FileMaker using AppleScript, I'm using someting like this : tell application "FileMaker Pro" delete every request set newrequest to create request set cell "Name" of newrequest to "Hoornaert" find end tell You can create multiple requests tell application "FileMaker Pro" delete every request set newrequest to create request set cell "Name" of newrequest to "Hoornaert" set newrequest to create request set cell "First Name" of newrequest to "Rapha
September 7, 200124 yr Not sure if this will do it but here's the usual syntax: tell application "FileMaker Pro" activate open file "SomeHardDrive:SomeFolder:SomeDB" show (every record of database "SomeDB" whose cell "SomeField" = SomeVariable) end tell
Create an account or sign in to comment