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


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!”]

Else

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: http://fmtechniques.blogspot.com/2014/08/quick-tip-detect-os-x-yosemite-dark.html

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

Privacy & Cookies Policy