Page 1 of 2
Having script editor with a black background...
Posted: Fri Jan 13, 2017 10:58 pm
by Mag
...and be a le to see the text. It's not possible right?

Re: Having script editor with a black background...
Posted: Fri Jan 13, 2017 11:10 pm
by jmburnod
Hi Mag,
What about menu livecode->Preferences->script editor
Best
Jean-Marc
Re: Having script editor with a black background...
Posted: Fri Jan 13, 2017 11:17 pm
by Mag
Hi Jean-Marc, I tried but then I can't see some parts of the text. Is there a way to change the text color? In my preferences I see only two variants in the Colorization pop up menu: Default and Revolution Classic...

Re: Having script editor with a black background...
Posted: Sat Jan 14, 2017 9:11 am
by richmond62
I've just spent a fruitless 30 minutes trying to mess around with the "
revPreferencesGUI" stack in LiveCode 8.1.2:
trying to give the
Colorization dropDown button a fourth item ('White'), but, as
LiveCode is now made in a "different way"
to get that hack to stick is well-nigh impossible.
I was also unable to locate the script that would activate on the
menuPick from that button.
Certainly a white/grey/pale yellow/pale blue schema on a black background would seem a good option.
Probably the best way to get this sort of thing is to go "cap in hand" to the
LiveCode people themselves.
It does seem odd that the preferences GUI allows us to choose a black background for the script editor but no
textColor that will sit nicely with that.
Here's my personal fantasy:
Unfortunately this is only a fantasy knocked together using GIMP.
Re: Having script editor with a black background...
Posted: Sat Jan 14, 2017 11:22 am
by Mag
Hi Richmond, I like so much your schema. I would use it all day!
And for comments maybe green...
Re: Having script editor with a black background...
Posted: Sat Jan 14, 2017 11:27 am
by AndyP
Hi Richmond .. you can have your fantasy come true
http://2108.co.uk/script-editor-themer/
Re: Having script editor with a black background...
Posted: Sat Jan 14, 2017 11:52 am
by Mag
Very interesting, I wonder if it works with macOS Sierra and LiveCode 8.1.2
Re: Having script editor with a black background...
Posted: Sat Jan 14, 2017 2:11 pm
by Mikey
SET is ok, glx2 works (but is slow), but I've taken to using atom when I have something long to work on, and I use the dark theme when I do.
Re: Having script editor with a black background...
Posted: Sun Jan 15, 2017 12:00 am
by [-hh]
EDIT: There is a simpler one-click-solution for that technique that doesn't touch any system file, see below:
http://forums.livecode.com/viewtopic.ph ... 26#p150426
This is of course not comparable with the possibilities of Andy's utility, but you can have kind of that in LC 8/9 by one line:
[1] Go in the contents of your LC 8/9 application to (*)
Tools/Toolset/palettes/script editor/behaviors
[2] Open file
revseeditorbehavior.livecodescript with a text editor
[3] Make the file writable (**) and insert as line 159:
set the ink of field "Script" of me to "notSrcCopy"
[4] Save the file and restart LiveCode
And similar in LC 6/7:
[1] Go in the contents of your LC 6/7 application to (*)
Tools/Toolset/palettes/
[2] Copy
revscripteditor.rev to Desktop or Documents and
open the stack with LC 6.7.11 (7.1.4)
[3] Edit script of btn "Template Editor"
Sort handlers by order "order-of-appearance" (in preferences).
[4] In command initialize insert as line 120:
set the ink of field "Script" of me to "notSrcCopy"
[5] Save the stack and replace the original with it
(you will probably asked for your admin password to allow that)
and restart LiveCode
----------------
(*) On MacOS rightClick the app's icon and choose show Contents.
On Win rightClick the app's icon and choose show location.
On Linux it's in ~/.runrev/components/<app folder>
(**) Option A: On MacOS use TextWrangler, on Win Notepad++, on Linux the default textEditor. Change the file and save. The textEditor will save without asking or ask if you wish to make the file writable (if it isn't). Option B: Drag the file to the desktop, change it and drag it back. You will be asked for your admin password for replacing if the file isn't writable. Option C: Use the commandLine (chmod +w ...)
----------------
Use moreover Preferences/ScriptEditor:
You can still set the colorization (Richmond's example is at about Revolution classic).
And you can set the backgroundColor, but remember: it becomes "_not_ the color".
(As a system selection color I use with Richmond's example then cyan ("0,255,255"). This yields with that ink a bright red for the script editor textselection.
Another option that works here for both color themes and also black on white in other apps: Choose as system selection color "skyblue" ("118,212,255") what yields a kind of "cayenne" for the script editor.)
Re: Having script editor with a black background...
Posted: Mon Jan 16, 2017 1:09 pm
by AndyP
A new version (2.2) of Script Editor Themer has been released.
Release notes can be viewed here.
http://2108.co.uk/script-editor-themer/ ... ase-notes/
Now works with
Community and
Commercial versions of LiveCode
This version fixes the problems with V8 onwards.
Existing customers should receive an email with update instructions.
Re: Having script editor with a black background...
Posted: Tue Jan 17, 2017 3:30 pm
by [-hh]
EDIT: There is a simpler one-click-solution for that technique that doesn't touch any system file, see below:
http://forums.livecode.com/viewtopic.ph ... 26#p150426
Let me change the one-liner from above to a three-liner, that yields a simple theme-switcher for this simplest solution.
This works (tested) on Mac/Win/Linux in LC 8/9. You don't have to restart LiveCode for a switch, just close and reopen the script editor.
In "script editor/behaviors/revseeditorbehavior.livecodescript"
insert at line 159:
Code: Select all
if 254 is among the items of sePrefGet("editor,backgroundcolor")
then set the ink of field "Script" of me to "notSrcCopy"
else set the ink of field "Script" of me to "srcCopy"
This "generates" dark themes simply by choosing a backgroundColor with one of the values is 254 (dec 254 = hex FE), for example "254,255,255" or "#FEFEFE".
This yields then, by the ink, a black background (visible as "1,0,0") and everything has fine contrast on that black.
White and "custard yellow" are not one of these 254-switches. So choosing one of these in the preferences takes one back to the light theme.
Re: Having script editor with a black background...
Posted: Tue Jan 17, 2017 3:39 pm
by Mag
Hi hh, unfortunately, when I try your hack in LC under the Mac, I get a Gatekeeper error: the app can't open because it's damaged.

Re: Having script editor with a black background...
Posted: Tue Jan 17, 2017 5:13 pm
by [-hh]
Hi Mag,
I have no problems on MacOS 10.12. How did you change the file?
hh
Re: Having script editor with a black background...
Posted: Tue Jan 17, 2017 5:59 pm
by Mag
I tested with LiveCode Beta 4,opened the pakaged and located the file, opened the file with Text Wrangler, it asked me if I want make the file unlocked, pasted the lines and then saved the file.
Re: Having script editor with a black background...
Posted: Tue Jan 17, 2017 6:02 pm
by Mag
BTW, this bug report about colorization of the script editor, has also new info:
http://quality.livecode.com/show_bug.cgi?id=7901