I would like to read either the contents of the clipboard or the contents of a locally saved text file directly into a variable in a FileMaker script. I realize that there is a script step called Paste() which will read from the clipboard and load the contents into a field. However, I am writing a script that will be used in many different databases and I will not be able to modify the structure of these databases in order to have access to a specific field.
I have FileMaker 11, but tips for any version of FileMaker could be helpful.
Thanks for any ideas!
I would like to read either the contents of the clipboard or the contents of a locally saved text file directly into a variable in a FileMaker script.
Neither is possible using purely native FileMaker tools. Not directly.
Indirectly, you could paste the contents of the clipboard into a global text field, then set a variable to the contents of the global field. And a text file could be imported.
Note that a global field can be in any table and still be accessible from anywhere in your solution.
Alternatively, you could utilize a plugin. e.g. the (free) Base Elements plugin. Or perhaps use OS-level scripting to accomplish either one of the two described tasks (though I don't know of a way to pass a value from AppleScript directly into a variable).