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

The Leading Filemaker Developer Tools

Quick tip: Detect OS X Yosemite dark mode from FileMaker – FileMaker Today

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

How to detect if OS X Yosemite is in “Dark Mode” from FileMaker?

Dark mode is stored in a defaults entry:  AppleInterfaceStyle

It’s either “Dark” or no value.

So we just basically check if we get an error if we try to read this value.

If we get a value, we are in “Dark mode”, else we’re using “Normal mode”.

Basic steps:

If [Abs (Get(SystemPlatform)) = 1]   //Running on OS X

Perform AppleScript[“do shell script “defaults read -g AppleInterfaceStyle””]  –  Native

If [Get(LastError) = 0]

Show Custom Dialog [“Dark mode!”]


Show Custom Dialog[“Normal mode!”]

End if

End if

That’s all.

You may use this to switch to a different themed layout, or to change your background color.

Get More Tips from Adam at:

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