1

I am working on a Ruby Script (using MacRuby with Scripting Bridge) to do some processing on a FileMaker Pro database (FMP Advanced 10.) I am able to read databases, tables, and records by creating a FileMakerProAdvancedApplication object:

framework 'scriptingbridge'
fm = SBApplication.applicationWithBundleIdentifier('com.filemaker.client.advanced')

the resulting object works great for reading values out of FileMaker databases, but I am confused about how to create new objects. The FileMaker scripting dictionary provides a "create" command, but it does not show up in the header generated by sdef /Applications/FileMaker\ Pro\ 10\ Advanced/Filero\ Advanced.app/ | sdp -fh --basename FilemakerProAdvanced (command taken from Apple's Scripting Bridge Docs.) Is it possible to create new elements with FMP's script support? What am I missing?

jars
  • 145
  • 2
  • 8

2 Answers2

0

Not sure I know to much about the scripting bridge, but assume that it must be using AppleScript behind the scenes. When you say create new objects, to you mean records or tables?

I'm fairly certain you can't create tables (or fields) in FileMaker via AppleScript.

You can create (and delete) records within existing tables. I would fire up a copy of the AppleScript Editor, and have a look at the FileMaker script dictionary from that end.

Dycey
  • 4,767
  • 5
  • 47
  • 86
  • the scripting bridge doesnt use applescript behind the scenes, rather they both use apple events (AppleScript is just a scripting language.) So this is a scripting bridge specific question. And yes, I have spent awhile looking at the scripting dictionary, but I am in need of scripting bridge specific help here. – jars Jun 08 '13 at 00:38
  • Well, yes ;-) But if it ain't in the dictionary, then that's a good indicator that the wires aren't in the back end to allow you to create a table via an apple event. – Dycey Aug 22 '13 at 16:21
0

The generated header files rarely duplicate the Dictionary as seen via Applescript for an application. There are sometimes duplicate function calls and/or some objects and functions that are available via Applescript are not available vis Scripting Bridge. As far as I know, there is nothing to indicate why this change would be in place and there is no way to get around this limitation.

Philip Regan
  • 5,005
  • 2
  • 25
  • 39