How to save Lua scripts?
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
How to save Lua scripts?
How to save text files as Lua scripts? For example, when I tried to save PHPBB12345's rotate 60 degrees script, I couldn't save it as a Lua file. What to do?
I was so socially awkward in the past and it will haunt me for the rest of my life.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
Re: How to save Lua scripts?
My guess is you're you're using Windows, maybe on a machine where that awful default is set that hides file extensions? In that situation, even if you rename a file to "filename.lua", its true name ends up being "filename.lua.txt". In that case, the icon will keep looking like a text-file icon. Look for a way to see the true name of the file -- right-click/Properties maybe -- and then right-click again to rename it and change the file extension to ".lua".gameoflifemaniac wrote:How to save text files as Lua scripts? For example, when I tried to save PHPBB12345's rotate 60 degrees script, I couldn't save it as a Lua file. What to do?
If you're using something like Notepad to save the file, you might have to change the drop-down in the Save As dialog to "All Files", to keep it from appending ".txt" to your filename. Notepad is pretty awful that way; most other text editors are much more polite.
Workaround: just copy the script file text and use File > Run From Clipboard in Golly.
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: How to save Lua scripts?
But I can't change the extension!dvgrn wrote:My guess is you're you're using Windows, maybe on a machine where that awful default is set that hides file extensions? In that situation, even if you rename a file to "filename.lua", its true name ends up being "filename.lua.txt". In that case, the icon will keep looking like a text-file icon. Look for a way to see the true name of the file -- right-click/Properties maybe -- and then right-click again to rename it and change the file extension to ".lua".gameoflifemaniac wrote:How to save text files as Lua scripts? For example, when I tried to save PHPBB12345's rotate 60 degrees script, I couldn't save it as a Lua file. What to do?
If you're using something like Notepad to save the file, you might have to change the drop-down in the Save As dialog to "All Files", to keep it from appending ".txt" to your filename. Notepad is pretty awful that way; most other text editors are much more polite.
Workaround: just copy the script file text and use File > Run From Clipboard in Golly.
I was so socially awkward in the past and it will haunt me for the rest of my life.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
Re: How to save Lua scripts?
Please explain. Are you in fact using Windows? What is the name of the text editor you're using? And more important, what happens when you right-click on an already-saved text file using Windows Explorer, and choose "Rename"? You should be able to change the extension to whatever you want, though Windows will annoy you with a silly warning that "file may become unusable".dvgrn wrote:But I can't change the extension!gameoflifemaniac wrote:Workaround: just copy the script file text and use File > Run From Clipboard in Golly.
Also, my recommendation above doesn't involve file extensions anyway. Does File > Run From Clipboard work for you?