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

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

Recommended Posts

Posted

Is there anyway to set a filemaker variable from applescript.

Example:

If I run:

set Original_Printer to do shell script "lpstat -d"

I want to output Original_Printer to a filemaker variable.

Posted

I don't think so. AppleScript cannot write to script Variables. It cannot read them either, unless global variable is ensconced within a calculation field, in which case AppleScript would just be reading the field, which ain't really a variable.

Posted

That was what I thought since I could not find anything in the applescript dictionary for FileMaker. The only other solution I came up with was writing a small text file and then reading it later. As you said though... that is too is not a variable.

Posted

i know but then the field has to be on the layout. I am building a printer selection script. I will call it as a sub-script. I want it to work anywhere in the solution and not worry about if a field is on a layout. FMI... are you listening?:?

Posted

The field does not have to be on the layout if you can specify it via "table" in AppleScript (actually a FileMaker table occurrence name, ie., on the relationship graph). This is especially true for global fields (or a 1-record table), ie., where you do not need to know a particular record. Experiment.

I do not have much hope that FileMaker's AppleScript implementation is going to be updated any time soon. I recently complained to them that the AppleScript documentation file, Apple Events Reference was no longer installed with the application. They let me know where I could get it:

http://fmdl.filemaker.com/MISC/fmp10/fp/apple_events_reference_wwe.zip

But not very encouraging. Apple itself seems to have a kind schizophrenic attitude toward AppleScript.

Here's a little test file I made for myself, to see what does and doesn't work for setting a field.

AS_Tests.zip

This topic is 5732 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.