May 9, 201213 yr I am sorry if this has been posted already. But the search system would not let me use those words. I am trying to enclose double quotes in a "send apple script", script. Here is my script. "¶tell application "& """ & "Finder" & """ & "¶set myTest to do shell script "& """ &"md5 -q "& """ & "/Volumes/Extended/tmp/" & Duplicates::Filename & """ &"¶end tell ¶tell application "& """ &"FileMaker Pro Advanced"& """ &"¶set cell "& """ &"Duplicates::MD5"& """ &" of current record to myTest¶end tell" "Duplicates::Filename" contains single quotes within the field, so I am unsure how to get that across to the terminal app.
May 9, 201213 yr Please update your profile to show what version of FileMaker, platform, and OS you are using, by clicking on this link http://fmforums.com/forum/index.php?app=core&module=usercp&tab=core&area=profileinfo Lee
May 9, 201213 yr Quoting problems are exactly why I don't suggest ever using that approach. Use a script to move the data to global fields and then use Perform applescript command instead, something like this. The purpose of using global fields is that you can use a table reference, you do not need to refer to a layout or current record. Also, the "herestring" operator "<<<" means you don't have to actually write out the data to a file on disk. set cellname1 to "zASData" set cellname2 to "zASResult" set tableName1 to "Gtest" get data cell cellname1 of table tableName1 set mydata to result set cmd to "md5 -q <<< " & quoted form of myData do shell script cmd copy result to cell cellname2 of table tableName1
May 13, 201213 yr Author BruceR, Okay, I had a chance to implement the new applescript, but I noticed a problem... The here-string is generating the md5 for the actual text within myData, but myData refers to a file location and name that needs to be evaluated by md5. for example myData = /Volumes/Extended/tmp/_Alice's Restaurant Original Version.mp3 I want to evaluate that file not the text. Could you please help? Thanks again.
May 13, 201213 yr Author I figured it out. I have never used the here-string before and looked it up. I just removed it from the calculation and that solved the problem. Thanks again!!! Thomas
Create an account or sign in to comment