Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6835 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

From within my FM app as part of a script, I do a 'Perform AppleScript' command. The AppleScript sets a variable, 'set x to 5', let's say. How can I then use the value of that x variable in the FM script that follows the 'Perform AppleScript'? Did a search in the forum on this topic, but did not quite find what I needed. Thanks.

Posted

Your applescript would set a field in FM to the value of the variable. Check out the FM AppleScript Dictionary.

It would be much better if you could do:

return x

in the applescript and the Perform Applescript would give you that returned result. If you like that idea, go to the FM product suggestion page and put it in:

http://www.filemaker.com/company/product/feature_request.html

Posted

Your applescript would set a field in FM to the value of the variable. Check out the FM AppleScript Dictionary.

How do you set a field in FM to the value of the AppleScript variable? (Yes, I am aware of the Dictionaries but am too new to make much sense of them.)

Posted

Try this:

Create a new database with 2 fields

"theGreeting" and "theYear"

Then copy the following script into your script editor:

set theYEAR to 2006

set Greeting to {"Happy New Year", "Prosit Neujahr", "Bonne Annee", "Gelukkig Nieuwjaar!", "Bliain nua fe mhaise dhuit", "Felice anno nuovo"}

tell application "FileMaker Developer"

tell front database

repeat with i from 1 to count of Greeting

create new record

tell record i

set cell "theGreeting" to item i of Greeting

set cell "theYear" to theYEAR

end tell

end repeat

end tell

end tell

Posted

Great sample code, thanks. I can now do what I want using the 'tell front database' 'tell record #' and 'set cell' statements you presented.

  • 1 month later...
Posted

Hi, I just read your post. Wuuld you mind telling me how to pass data from Filemaker to an Applescript. I am trying to pass the contents of a field to an Applescript that prints a barcode label using that data using my Dymo label software.

Posted

If you are trying to print bar codes from Filemaker you don't necessarily need applescript. There are filemaker plug-ins for the mac which will let you display a bar-code format like a font.

Posted

tell application "FileMaker Pro"

set myVariable to cell "Name" of current record of document "DatabaseName"

end tell

tell application "SomeOtherApplication"

activate

--some steps to pass "myVariable" to the programme "SomeOtherApplication"

end tell

So the script above takes whatever is in the field called "Name" and puts it into a variable called "myVariable". The 2nd part activates the other programme you are working with. Then you have to figure out what the AppleScript steps are to pass the value in "myVariable" to that application. I'd help but I don't know what the other application is that you are working with.

Posted

Note that you don't have to use the Dymo software, you can set up a Filemaker layout and use applescript to select the label printer, print, and reselect the default printer.

This topic is 6835 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.