This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
jakejakey's profile picture

Painting program for normal computers

Started by jakejakey, 07 April 2015 - 06:47 PM
jakejakey #1
Posted 07 April 2015 - 08:47 PM
Okay for the installer:
pastebin get Pzu9jc29 paint

Controls:

Up Arrow - Move Cursor Up
Down Arrow - Move Cursor Down
Left Arrow - Move Cursor Left
RIght Arrow - Move Cursor Right
Back Space - Delete Current Pixel
Space - Paint Current Pixel white
Grave ~ - Exit

Note: Yes you can now save the paint!!!!!!!!!!!!!!!!!!!! you cannot edit it after you edit the program.
to show the picture just run the program that you painted..

Thank you for you're interest
Edited on 09 April 2015 - 02:22 PM
AlexDevs #2
Posted 07 April 2015 - 08:50 PM
Nice program! But add a saving system
jakejakey #3
Posted 07 April 2015 - 08:51 PM
how………………….
Lupus590 #4
Posted 07 April 2015 - 08:54 PM
fs api
jakejakey #5
Posted 07 April 2015 - 08:58 PM
I do not know how i will go about doing this. so until someone else takes this topic it is not going to be able to save.
Lupus590 #6
Posted 07 April 2015 - 09:04 PM
files store strings, if you put all your in a table, and serialise the table, you can store it in the file with the variable names
TheOddByte #7
Posted 07 April 2015 - 09:13 PM
If you're storing everything in a table then you can do this

local t = {} --# This would be your table instead
local f = fs.open( "somefile", "w" ) --# Open file for writing
f.write( textutils.serialize( t ) ) --# Write the serialized table in the file
f.close() --# Close the files, this is very important
Then you could load it like this

local t
local f = fs.open( "somefile", "r" ) --# Open the file for reading
t = textutils.unserialize( f.readAll() ) --# Read everything in the file and get the unserialized version of the table
f.close() --# Again, close the file
oeed #8
Posted 08 April 2015 - 04:29 AM
I do not know how i will go about doing this. so until someone else takes this topic it is not going to be able to save.
My number 1 tip is if you don't know how, learn how.
jakejakey #9
Posted 08 April 2015 - 09:53 PM
thanks oeed xD
Geforce Fan #10
Posted 08 April 2015 - 11:18 PM
I recommend clearing the screen.
jakejakey #11
Posted 09 April 2015 - 03:56 PM
adding save feature.