Over 46,000+ Business Solution Developers Find answers, ask questions, and connect with our community of business solutions developers, business owners and partners.
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