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

Search the Community

Showing results for tags 'event'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • OpenComputers
    • Announcements
    • Feedback
    • IRC
  • Code Central
    • Support
    • Showcase
    • Tutorials
  • Addons & More
    • Addons Mods
    • Architectures
    • OpenEngineering Task Force
  • General
    • Lounge
    • Forum Games
    • Showcase
    • Servers
  • Archives
    • Public Archives

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Minecraft


GitHub


IRC


Fediverse ID


Location


Interests

Found 12 results

  1. Hi, I am new to writing background processes in oc and need some advice. I want to write a small service that reads an energy storage and sends its data on the network. To do this, should I use a detached thread or a timer event? How do i stop a background process? Thank you in advance : )
  2. i want to make a timer call some function after a little bit of time i use event.timer local event = require'timer' event.timer(2,function() print("do something"),3) that is my code and i get an unexpectet symbol error at ')' wheres the unexpectet symbol how do i need to make that
  3. ghost1257

    Event

    Hey I am writing a program and has of right now I am using event.pullMultiple because it is used to control my fluid nuclear reactors. It can shut them off and turn them on and also out puts data but I am having trouble getting it to update automatic without hitting a button on the keyboard. Without losing function of the program I can get code on here later if need be. Thanks
  4. I'm working on a small bit of code that reads from a IC2 power storage block and displays it's current and maximum storage. I also want it to toggle a Reactor based on either a keypress or a CLI menu option. As the code has to refresh a LOT, I think a keypress option is the easiest way, but I can't, for the life of me, figure it out. Here's what I have so far... os.execute("cls") -- Hook the component local component = require("component") local term = require("term") local side = require("sides") local keyboard = require("keyboard") local event = require("event") local rs = componen
  5. Is there an event fired when a computer is shutting down? I ask because I am working on a user roles system for SecureOS (using @payonel 's updated fork) and want to save the databases I use when the computer shuts down (they will also be saved on a timer).
  6. novotd00

    key event

    Hi there, I have this problem with key press event. For some random reason it works just kind of, well, it works, but my code doesn't. I am using multiple functions to du stuff that depends in certain keys pressed, but that is some sort of weird random error there in between 'keypress' and 'menuselect' function. Could someone take a look please? (I will definitly send some online cookie for ya) ---init component=require('component') gpu=component.gpu gpu.setDepth(8) term=require('term') term.clear() event=require('event') unicode=require('unicode') colors=require('colors') key=
  7. Is it possible to create and send custom events? I would like to do so in my proximity door daemon so that people can act on allowed or denied entities (like triggering a lockdown and alarm for an intruder).
  8. Hello! I am trying to create my own keyboard library, but I have hit a problem in that some of the keys on my keyboard always return 0 when they are pressed. These keys are the "\" and "#" key on my UK layout keyboard. Here is my test code: while true do local _, _, _, key = event.pull("key_down") print(key) end This always returns 0 when backslash or hash is pressed. If anybody knows why / how I can distinguish between those two keys that would be awesome.
  9. I'm putting together an autorun for a program that lives on a floppy. It started like this: local fs = require "filesystem" local os = require "os" local proxy = ... fs.mount(proxy, "/mst") os.execute("/mst/portal.lua")Unfortunately, this doesn't work; the first few lines from the program show up, and then the OpenOS banner suddenly tramples over it to present me the shell prompt, because that's obviously what I wanted to have happen when I ran os.execute.This thread seems to describe exactly my problem, and I attempted the suggested solution like so: local fs = require "filesystem" loc
  10. So, I've written my own menu API in CC, called 'Jenisis' named after what I called my software company on me and a few friends servers, (did quite well actually seeing as how I'm the only one who could code) and I ported it over to OpenComputers and then continued development on this, seeing as how IMO OC is better. Which brings me to my problem. I've been trying to add a feature where the API takes a table full of functions to run whenever an event is triggered, like for receiving modem messages whilst still in the menu's loop. I can't quite get it working and just need some new ideas on how.
  11. Is there any posibilities to run program inside OpenOS listening events on background and still using shell? I try to write program that can recieve message from another computer through network and send response back on background. Thanks for your idea and sorry for my English. ;-)
  12. I've spent a few hours now trying to figure this one out, I need another pair of eyes, if you please. In learning about how events work, I wrote a simple program: http://pastebin.com/HfBtgxhz With a little play, I got it working so pressing the space bar will exit. Yeah! So I used the same set up in my current program (which will be posted when this last problem is fixed). And nada, testing shows it does not run QuittingTime() when any key is pressed. I don't see a difference in the code. Why does the first program work but the second program does not?
×
×
  • Create New...

Important Information

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