Drew Sanderson Posted March 13, 2009 Share Posted March 13, 2009 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. Link to comment Share on other sites More sharing options...
Fenton Posted March 13, 2009 Share Posted March 13, 2009 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. Link to comment Share on other sites More sharing options...
Drew Sanderson Posted March 13, 2009 Author Share Posted March 13, 2009 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. Link to comment Share on other sites More sharing options...
Fenton Posted March 13, 2009 Share Posted March 13, 2009 There's always global fields, or a 1-record table. Link to comment Share on other sites More sharing options...
Drew Sanderson Posted March 13, 2009 Author Share Posted March 13, 2009 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?:? Link to comment Share on other sites More sharing options...
Fenton Posted March 14, 2009 Share Posted March 14, 2009 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 Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5526 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 accountSign in
Already have an account? Sign in here.
Sign In Now