Posted 08 May 2012 - 04:55 AM
(second time posting this year in ask a pro :)/>/>)
If i'm making a program and it contains code like:
How can I split up the program and replace echo "Hello world!" with:
Like this:
If i'm making a program and it contains code like:
echo "Hello world!"
pause
How can I split up the program and replace echo "Hello world!" with:
print("Hello world!")
And pause with:
print("Press any key to continue.")
os.pullEvent("key")
Like this:
file = fs.open("example", "r")
code = file.readAll()
file.close()
--search for "pause" and "echo" in "code"
execute = fs.open("executer", "w")
execute.write(code)
execute.close()
shell.run("executer")
fs.delete("executer")