October 5, 20187 yr How do I get a value from FileMaker Pro Advance 17 variable as ( $$NAME ) into an Applescript that looks like; tell application "Leitz Icon Software" -- Store path to this script folder. set pathToScriptFolder to POSIX path of ((path to me as rich text) & "::") -- Open blank label. open label pathToScriptFolder & "LabelWithAddress.LeitzLbl" -- Delete all objects to make sure the label is blank. delete label objects -- Create new address object. make new address object with properties {x position:0.3, y position:0.3, width:8.2, height:3} -- Change address object properties. tell first address object -- Setting content. set content to $$NAME -- Setting content alignment set horizontal alignment to Center set vertical alignment to Bottom -- Set the object scaling to auto fit. set scaling mode to AutoFit end tell save label in pathToScriptFolder & "LabelWithAddress.LeitzLbl" end tell
October 5, 20187 yr Did this work in an older version of FileMaker. If so, you may need change these setting.
October 5, 20187 yr 2 hours ago, Lee Smith said: Did this work in an older version of FileMaker. Too bad that didn't work. I'm not knowledgeable in AS, so someone else will need to jump in. Lee
October 5, 20187 yr What do you mean get it "into an AppleScript"? Does the script get invoked outside of FileMaker (which is what Lee's suggestion is for)? Or does it start from a FileMaker script?
October 5, 20187 yr 7 hours ago, LarsM said: How do I get a value from FileMaker Pro Advance 17 variable as ( $$NAME ) into an Applescript You need to select the Calculated AppleScript option and construct a calculation formula that returns the desired script as text, with the variable's value inserted into it - for example: "set content to " & Quote ( $$NAME ) Alternatively, place the value in a field and have your (native) AppleScript read it from there. Edited October 6, 20187 yr by comment
October 6, 20187 yr Author Help can anybody help a novice to tell how I should write an FileMaker Pro Advanced Calculated Applescript if I have an Applescript that looks like this.... tell application "Leitz Icon Software" set pathToScriptFolder to POSIX path of ((path to me as rich text) & "::") open label pathToScriptFolder & "BlankLabel.LeitzLbl" delete label objects make new address object with properties {x position:0.3, y position:0.3, width:8.2, height:3} tell first address object set content to "Alex Smith Smith inc. NY 12345-4568" set horizontal alignment to Center set vertical alignment to Bottom set scaling mode to AutoFit end tell save label in pathToScriptFolder & "LabelWithAddress.LeitzLbl" end tell
October 7, 20187 yr 15 hours ago, LarsM said: Fitch! It start from a FileMaker script? That's what I'm asking. Does it?
October 7, 20187 yr This seems to be a continuation of your earlier thread, and should have been posted as a follow-up there. Anyway, here's a nifty way to turn a native AppleScript into a calculated one: paste it into a Filemaker text field, then copy the result of the following calculation: Quote ( YourTextField ) and paste it into the Calculated AppleScript's Specify Calculation window. Edited October 7, 20187 yr by comment
Create an account or sign in to comment