Apple has no official way to detect when an app is in Dark Mode. There’s a way using defaults that most people use, however we have one report that suggests it’s failing under Mojave. So I’d appreciate anyone running Mojave taking a minute or two to run the following code in Script Debugger 8 in both Lite Mode and Dark Mode, and adding the resulting strings to this topic.
use framework "Foundation"
use framework "AppKit"
set theVers to current application's NSProcessInfo's processInfo()'s operatingSystemVersionString()
set theName to current application's NSApp's effectiveAppearance()'s |name|()
set theString to current application's NSUserDefaults's standardUserDefaults()'s objectForKey:"AppleInterfaceStyle"
tell application id "com.apple.systemevents" -- System Events.app
tell appearance preferences
set isDark to dark mode
end tell
end tell
return current application's NSString's stringWithFormat_("%@, appearance name: %@, interface style: %@, isDark: %@", theVers, theName, theString, isDark) as text
After switching to SD8’s “Default Dark” theme while in Dark Mode, running the script again caused SD8 to quit suddenly. Now it’s forgotten my AS formatting preferences. (Edit: Fixed by switching to the “My Snapshot” theme. )
I’m not able to run anything in Dark mode in current version Script Debugger 8.0 (8A16)
Ps.
It could be a bad experience to use highlight color for select text in text editor.
Script Debugger use highlight color that is darker and ex. TextEdit in Dark mode.
Dark mode in Mojave - when I open SD8 and select AppleScript Applet as the kind of script I want to create, SD8 crashes. However, when I launch it from this web page (clicking on Open in Script Debugger), I can run the script and I get this result:
First time open Script Debugger in Dark mode was possible, I was in dictionary view.
I open system preference and change to Light mode, I change back to Dark mode and
Script Debugger crashed. Now its only possible to start Script Debugger in Dark mode to
Choose a template for your new script dialog. If I press choose it will crash.
So that is wha I mean I couldn’t use Script Debugger 8 in Dark mode in Mojave.
In Light mode its possible to start Script Debugger 8 without any issue in that regard.
Thanks — we’re looking for feedback on what users think the default Dark Mode colors.
Let me explain what you see now. The default light settings is Apple’s default format styles, plus Script Debugger 7’s default values for the other colors. To build the dark modes, we essentially took the light values, changed to a dark background, and then manually tweaked to make things more readable, but still bearing a relationship to the lite version where possible.
It was inherently subjective, and the expectation was that the dark colors would change before shipping, based in feedback.
So what we’d love is for people to suggest not just which colors they find hard, but also to suggest alternative values that work.
@ShaneStanley - I tried again opening SD8 in Mojave dark mode and selected AppleScript/AppleScript as a template, and got a crash as before. Crash report submitted.