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. 

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`

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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