September 18, 200619 yr I have an applescript that extracts some file info from a file, and sets a variable with it. Now I want to enter that variable value into a filemaker field. How can I do this?? Here's the code: set this_file to choose file try tell application "Image Events" launch -- open the image file set this_image to open this_file -- extract the property value copy the dimensions of this_image to {xres, yres} copy the name of this_file to originalname -- purge the open image data close this_image end tell display dialog "The file " & (originalname as string) & " Resolution is " & (((xres as string) & " by " & yres as string) & " pixels") on error error_message display dialog error_message end try I want to enter "originalname" and "xres" and "yres" values into filemaker fields. How can I do this? Thanks.
September 18, 200619 yr Author I figured it out! The key is the applescript must communicate to Filemaker via Applescript! Here's the code that works: set this_file to choose file try tell application "Image Events" launch -- open the image file set this_image to open this_file -- extract the property value copy the dimensions of this_image to {xres, yres} copy the name of this_file to originalname -- purge the open image data close this_image end tell tell application "FileMaker Pro" activate set field "Original Filename" in current record to originalname as string end tell on error error_message display dialog error_message end try Hope this helps someone!
Create an account or sign in to comment