The Original FileMaker Community
Business Templates - Demo Apps - Video Tutorials -Samples - Help - 46000 Member Forum

The Leading Filemaker Developer Tools

Grab CSS From FileMaker 12 Layout Objects – FileMaker Today

Get real time updates directly on you device, subscribe now.

There’s been plenty of discussion on FileMaker’s developer forums about the implications of using CSS to style layouts in FileMaker 12. In case you weren’t aware, FileMaker 12 introduced a new layout design surface whose styling is based on CSS. It’s a powerful new feature that hints at an exciting roadmap for the FileMaker product line. I’m not going to indulge in any details on this topic, however, because FileMaker has yet to officially expose the CSS styling to developers.

But say you were curious, for educational purposes, about what that styling looks like…

Here’s an AppleScript for all of you on Mac OS X that will extract FileMaker’s clipboard contents as text. It works with any FileMaker object – scripts, custom functions, fields, layout objects, etc. Just copy the object, then run this script. It will get the FileMaker object as XML, save it to a temp file, then open the file using your default text editor. I personally like to store the script in my scripts folder (~/Library/Scripts) and call it using Quicksilver.

The following screenshots show what it looks like to use this script on a button.

Copying the button… 

Copying the button

Text output from the AppleScript… 

Text output from AppleScript

Output text pretty printed using TextMate command… 

Output text pretty-printed

Here’s the AppleScript:

This functionality is already built in to the TextMate Bundle for FileMaker, but I haven’t released the update to that yet. Stay tuned for an update on the bundle.


Update 2012-05-18 – New download: No longer sends clipboard event to FileMaker ; enhanced error handling when writing initial temp file.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More