I tried to search it online but I don't even know what's the name for this format, and all the information I can find is about RLE or other Golly specific formats.
allanwindmill wrote: March 13th, 2024, 12:10 pm
I know you can Ctrl+C to copy as RLE, but is there a way to copy cells directly as the formats shown in Life Lexicon?
Save the following as copy-plaintext.lua then use Preferences > Keyboard to assign a key combination like Alt+C to run that script (use the "Choose File" button to select the script).
-- Copy the current selection as plaintext.
-- Author: Andrew Trevorrow (andrew@trevorrow.com), Mar 2024.
local g = golly()
local gp = require "gplus"
local r = gp.rect(g.getselrect())
if r.empty then g.exit("There is no selection.") end
if g.numstates() > 2 then g.exit("Plaintext is only for two-state rules.") end
local text = ""
for row = r.top, r.bottom do
for col = r.left, r.right do
if g.getcell(col, row) > 0 then
text = text.."O"
else
text = text.."."
end
end
text = text.."\n"
end
g.setclipstr(text)
g.show("Clipboard contains plaintext version of selection.")
Thanks for both replies! Good to know Golly doesn't have this out of the box and it's not that I am missing something; And @Andrew your lua script is magic! Works very well!
~ Haycat Durnak, a hard-working editor
Also, support Conway and Friends story mode!
I mean no harm to those who have tested me. But do not take this for granted.