Jump to content




Frames Beta 1.3 - Run multiple progs at the same time! Works with any prog!


21 replies to this topic

#21 Jan

  • Members
  • 141 posts
  • Locationthe Netherlands

Posted 06 January 2013 - 08:40 AM

View Postawsumben13, on 05 January 2013 - 09:48 AM, said:

how does the multitasking work...i want to add an easy multitasking library into something im making but im not sure how to :l

You can use code of my Taskforce program for multitasking:
Copy the api called 'grab'
local task = grab.createProcessor()
-- Makes a new 'eventprocessor'.
task.execute = function(...)
-- Do stuff
rs.setOutput("left",true)
end
-- Define function
-- Execute is called on every event
-- The argument is the event
-- You can make multiple task by making more task via grab.createProcessor()

-- Call go to start pulling events. Press CRTL+T for one second to stop.
grab.go()

You can also use grabroutine.run(function() print("herpaderp") end).
That allows you to use os.pullEvent as normal.
I havent tested the code so far, so there could be errors in it.
If you have questions just ask them :)
EDIT: I have added 'grab' to the API documentation of Taskforce

#22 Exerro

  • Members
  • 801 posts

Posted 06 January 2013 - 09:08 AM

i kinda have to make my own one tbh (just because there are so many changed things in my library) i just need to know how the displaying works and how you tell the screen to display the windows and only the one thats running





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users