Having script editor with a black background...

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

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

Post by [-hh] » Tue Jan 17, 2017 6:19 pm

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).
Last edited by [-hh] on Fri Jan 27, 2017 4:44 am, edited 1 time in total.
shiftLock happens

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

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

Post by Mag » Tue Jan 17, 2017 6:31 pm

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.

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

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

Post by [-hh] » Sun Jan 22, 2017 3:32 pm

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
Last edited by [-hh] on Fri Jan 27, 2017 4:45 am, edited 1 time in total.
shiftLock happens

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

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

Post by richmond62 » Sun Jan 22, 2017 3:57 pm

I found now a much simpler one-click solution
Do tell, please.

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

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

Post by [-hh] » Sun Jan 22, 2017 9:28 pm

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.
shiftLock happens

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

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

Post by [-hh] » Tue May 16, 2017 1:09 pm

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.
shiftLock happens

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”