Page 2 of 2

Re: Having script editor with a black background...

Posted: Tue Jan 17, 2017 6:19 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

Textwranger is also the way I used on Mac. Perhaps you could try the option to replace the file while being asked for your admin password (this may block Gatekeeper)?

BTW, there is also a feature request:
http://quality.livecode.com/show_bug.cgi?id=19109

Hope you have soon your dark themes ...
Meanwhile you could use Andy's Themer.
Or use Mark's front script as dark theme by first converting each color value (a,b,c) to (255-a,255-b,255-c).

Re: Having script editor with a black background...

Posted: Tue Jan 17, 2017 6:31 pm
by Mag
Thank you for summarise the available options. First, I will try again with your hack.

PS
Being the pakage signed, I think that Gatekeeper don't allow any change on it, I guess. Maybe there is the possibility to run the app unsigned, I will try it.

Re: Having script editor with a black background...

Posted: Sun Jan 22, 2017 3:32 pm
by [-hh]
I found now a much simpler one-click solution:
No frontscript no backscript, no engine file editing.
Simply a button that sets directly the ink. And this takes NO additional time for colorization.

See "RaspberryPi stack" #89 (runs also on Mac/Win/Linux with LC 6/7/8/9)
or see below: http://forums.livecode.com/viewtopic.ph ... 26#p150426

Re: Having script editor with a black background...

Posted: Sun Jan 22, 2017 3:57 pm
by richmond62
I found now a much simpler one-click solution
Do tell, please.

Re: Having script editor with a black background...

Posted: Sun Jan 22, 2017 9:28 pm
by [-hh]
It's (more comfortable than below) all in here
http://forums.livecode.com/viewtopic.ph ... 02#p150402
  • Main script for Theme switching is in button "Lights" (sets the ink).
  • How to get the currently active script editor field -- > card script
OR here, in case you are afraid of my stacks:
Make a pop-up menu button and script it as follows (19 lines).

Code: Select all

local currentField

on menuPick pLine
   if pLine is "Dark Theme" then
      set ink of currentField to "notSrcCopy"
   else set ink of currentField to "srcCopy"
end menuPick

on mouseDown
   put activeField() into currentField
   if currentField is -1 then put empty into me
   else put "Dark Theme" &cr& "Light Theme" into me
end mouseDown

function activeField
  put the windows into w
  put lineOffset ("revNewScriptEditor",w) into o
  if o > 0 then 
    return the long id of \
          fld "Script" of card "Main" of stack (line o of w)
  else return -1
end activeField
Of course, the scripteditor has to be open for this to work.

Re: Having script editor with a black background...

Posted: Tue May 16, 2017 1:09 pm
by [-hh]
Here is the update to 'modern times' ("blend modes" instead of bitmap modes).
[ A tiny stack usable as plugin is attached to Raspi stack #89 ]

Make a pop-up menu button and script it as follows (19 lines).

Code: Select all

local currentField

on menuPick pLine
   if pLine is "Dark Theme" then
      set ink of currentField to "blendDifference"
   else set ink of currentField to "blendSrcOver"
end menuPick

on mouseDown
   put activeField() into currentField
   if currentField is -1 then put empty into me
   else put "Dark Theme" &cr& "Light Theme" into me
end mouseDown

function activeField
  put the windows into w
  put lineOffset ("revNewScriptEditor",w) into o
  if o > 0 then 
    return the long id of \
          fld "Script" of card "Main" of stack (line o of w)
  else return -1
end activeField
Of course, the scripteditor has to be open for this to work.