How to paste code

For discussion directly related to ConwayLife.com, such as requesting changes to how the forums or home page function.
Post Reply
benzrf
Posts: 2
Joined: October 22nd, 2009, 11:41 am

How to paste code

Post by benzrf » October 23rd, 2009, 12:12 pm

How can I share patterns, and how can I look at patterns that other people have posted? Is there an option in the Conway life applet?

Axaj
Posts: 232
Joined: September 26th, 2009, 12:23 am

Re: How to paste code

Post by Axaj » October 23rd, 2009, 10:23 pm

In Golly, patterns copy (with ctrl-v) directly in the rle format, so you can paste it into a text box.
Image

benzrf
Posts: 2
Joined: October 22nd, 2009, 11:41 am

Re: How to paste code

Post by benzrf » October 26th, 2009, 9:28 am

That's what I initially thought, but when I paste things into Golly from a codebox, they don't appear in the way they were described. That is to say, pasting doesn't seem to work. Help!

User avatar
Macbi
Posts: 903
Joined: March 29th, 2009, 4:58 am

Re: How to paste code

Post by Macbi » October 26th, 2009, 10:06 am

I have the same problem. Spaces creep in somehow at the start of each line, causing Golly to read the copied code as text rather than as an rle file. I've resorted to copy-pasting to Word and then copying back to Golly.

Axaj
Posts: 232
Joined: September 26th, 2009, 12:23 am

Re: How to paste code

Post by Axaj » October 26th, 2009, 10:27 am

You have to not use the "select all" button.
Image

wintersolstice
Posts: 21
Joined: August 25th, 2010, 3:42 pm

Re: How to paste code

Post by wintersolstice » August 30th, 2010, 4:34 pm

I thought it might be easier to post this here rather than create a new thread, I'm new to this forum and have never studied the game of life in detail and a lot of the board has codes on it that I can't use.

I have "Golly" now but don't know how to use it. Do you have to set the rules for which CA (there's a myriad of instructions)
ands how do you paste a code into it?

Batmanifestdestiny
Posts: 54
Joined: June 9th, 2010, 3:53 pm

Re: How to paste code

Post by Batmanifestdestiny » August 30th, 2010, 5:23 pm

by default, it should be set to "Life" as the rule. If not, you can change it by going to Controls>Set Rule, and then there's a dropdown box of predefined rules. You can add more rules in the "rules" folder, and then type their name in the box above the dropdown.

If you just want to use Life for now, then just set it with the dropdown box if it's not already set. To paste the code that other people posted, then manually highlight it and paste it into Golly the same way you would paste normal text (Ctrl+V for Windows users, mac button+I have no idea for Mac users, generally a variation of ctrl+V for Linux Users).

wintersolstice
Posts: 21
Joined: August 25th, 2010, 3:42 pm

Re: How to paste code

Post by wintersolstice » August 31st, 2010, 9:23 am

Thanks for the info but my question about pasting was where abouts in Golly do you paste it? Sorry i should have worded it better

Paul Tooke
Posts: 111
Joined: May 19th, 2010, 7:35 am
Location: Cambridge, UK

Re: How to paste code

Post by Paul Tooke » August 31st, 2010, 10:28 am

wintersolstice wrote:
Thanks for the info but my question about pasting was where abouts in Golly do you paste it?
Wherever you want! Most of the Golly screen is taken up with the space used to display patterns. When you have selected paste (either from the Edit menu or by using your OS-specific key combination) move the cursor into the display area. It should change to a cross at the top left of a red box. The pattern will be shown in the box, although if the pattern is really large you might only see red lines extending to the right and bottom of the display area. If you move the cursor the pattern will move with it. When you are happy with the position of the pattern, click the left mouse button once. The pattern will then be pasted in. You may then want Golly to fit the pattern into the display area. In Windows the key combination for this is Control-F, or you can select "Fit pattern" from the View menu. This tells Golly to resize/move the display so that all of the pattern is visible.

If you subsequently want to view another pattern, select "New pattern" from the File menu or type the shortkey combination for it (Control-N in Windows). This clears the pattern display.

User avatar
Andrew
Moderator
Posts: 919
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: How to paste code

Post by Andrew » August 31st, 2010, 10:36 am

Rather than paste in a clipboard pattern, you might find it easier just to select "Open Clipboard" from the File menu.
Use Glu to explore CA rules on non-periodic tilings: DominoLife and HatLife

wintersolstice
Posts: 21
Joined: August 25th, 2010, 3:42 pm

Re: How to paste code

Post by wintersolstice » September 5th, 2010, 4:30 pm

Now how do you find the code for a pattern to post it in this forum? I can't seem to work it out.

User avatar
ssaamm
Posts: 125
Joined: June 4th, 2010, 9:43 pm

Re: How to paste code

Post by ssaamm » September 5th, 2010, 5:08 pm

copy it out of golly, and it will paste as text

tod222
Posts: 21
Joined: August 23rd, 2010, 12:43 am

Select All corrupts RLE in Firefox

Post by tod222 » October 4th, 2010, 10:55 am

Confirming the report from Ajax that "Select All" on Firefox adds leading spaces to the copied RLE text which then does not correctly paste into Golly.

I patched my version of Golly to remove the spaces, but that's not practical for most users. If the Firefox addon Copy Plain Text hadn't been abandoned it would be a handy workaround, but it no longer works on current versions of Firefox.

I hear that there's a possible fix coming for the "Select All" issue. That would be great, both to keep new users from getting confused and to assist those of us who can't remember not to click "Select All".
Catagolue: @th222 • Twitter: @th222

Post Reply