Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
MacWhinny

I'm a noob and i know it

Question

Ok so, i've setup a lvl 1 system and i've installed and rebooted. What i'm trying to do after that is display a message on a long screen above a shop. Can someone please tell me the steps after i've rebooted opencomputers to do this and have it one save and popup on screen after a reboot. 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Here is basically everything you would ever want to know about startup scripts and such: https://ocdoc.cil.li/tutorial:autorun_options

For your needs, I would write a script in my home dir that cleared the screen, set the resolution how I wanted it, and wrote the message, and then waited for user input or something to keep it from closing the program and returning to the shell:

local term = require("term")
local gpu = require("component").gpu

term.clear()
gpu.setResolution(20, 5)
term.setCursor(5, 3)
term.write("Hello World")
term.read()

When you execute this script, it'll probably do something like what you want. To have this script when your machine is booting, just specify this script's filename in your /home/.shrc

So Let's say this script was `/home/billboard-message.lua`

I would edit `/home/.shrc`, and just write that script path in

`echo /home/billboard-message.lua > /home/.shrc`

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.