simple text bg color

59 views
Skip to first unread message

Kalman Tarr

unread,
Aug 24, 2022, 10:28:42 AM8/24/22
to QLab
Hi every one,
I am here again with a new problem.
It is the first occasion to use in my scripts the tell application text edit  phrase.

I give a copy of my code:

    tell application "TextEdit"
        activate
        set nDocu to make new document at the front
        tell nDocu
            set its text to "text to text and text or any"
            set font of paragraph 1 to "HelveticaNeue-Bold"
            set size of every paragraph to 16
            set size of last paragraph to 12
            set size of paragraph 1 to 20
            set color of paragraph 1 to {65535, 0, 0} -- red
--- the above code is working good ---
-- But I don't find any solution for the next, to set background color in script.
-- It satisfies my needs to set the background of the entire document, not the lines itself.
        end tell
    end tell

The problem is, I don't like to read text with black text color on white BG.
I would like to change the seeing of document. Black BG and white or yellow Text.

Any suggestion .... Thanks in advance
It is possible at all? I read several pages in connection of this problem, somewhere they write down it is Not possible. Why not? I don't believe in.

Best
Kalman

Joe Wilson

unread,
Aug 24, 2022, 10:29:05 PM8/24/22
to ql...@googlegroups.com
I'm pretty certain that TextEdit takes its background color from MacOS's window manager.

Try setting your Mac to "Dark Mode" (Preferences -> General -> Choose [DARK] in the "Appearance" category")

It will make that change system-wide, but it's the only way I know to control the background color of TextEdit.

Cheers!
~joe

--
Contact support anytime: sup...@figure53.com
Follow QLab on Twitter: https://twitter.com/QLabApp
User Group Code of Conduct: https://qlab.app/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/f2a89604-63bf-4923-a463-036c019d6922n%40googlegroups.com.


--
_________________________
Joe Wilson, ATD/Sound
Indian River State College

Adding one more "me too" to the
collective internet consciousness.

Kalman Tarr

unread,
Aug 25, 2022, 2:56:20 AM8/25/22
to QLab

You have truth Joe,
I am using Macos High Sierra in this time. 
The question is related to the use of this system, unfortunately I did not mention it earlier.
When I bootup to the os Catalina, yes, the result is the same you mentioned mainly I’m using dark mode. 
Thx
Best,
Kalman
Reply all
Reply to author
Forward
0 new messages