This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Jan's profile picture

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

Started by Jan, 24 August 2012 - 09:32 AM
Jan #1
Posted 24 August 2012 - 11:32 AM
I am not updating this program anymore. You may modify it freely. If you have any questions about the source/multitasking I will try to answer them.
The good news is that I made a successor called Taskforce, basicly the same functionality, but with better code and color support!

Old post:
SpoilerFrames Beta 1.3 - Run multiple progs at the same time! Works with any prog!

Simply press TAB to go to the next virtual terminal! (Look at the taskbar below the screen)


Well, there is nothing more to explain! Just download it.
Download Frames Beta 1.3
http://pastebin.com/gBDN9Axv

From Beta 1.2 to Beta 1.3
- Changed project name: it is now Frames instead of Windows

From Beta 1.1 to Beta 1.2:
- Made taskbar automaticly choose the right width
(More programs; smaller taskbar items)
- Fixed the 'edit' problem, because 'edit' uses negative x-pos
- Made a 'preloop' hook, which runs before starting the mainloop.
- Made the 'shared' variable: should be used for windows-things.
- Frames only updates screen when something in the GUI had changed
There must be at least 0.04 seconds between screen updates.
The 0.04 value is changable, and called the frame_limiter.
- Started with Frames update. Type 'update' to see if there is a new version


From Beta 1.0 to Beta 1.1:
- removed titlebar, for more application space
- code cleanup
- made newMod(..): see sourcecode for examples
- Made program loop really small by using Hooks at 4 point.


A special thanks to ardera who made this screen capture program.

Current Bugs:
The 'edit' program doesnt work with text with long lines. FIXED!


Upcoming features
- API for easy modifying of the program, and supporting multiple modifications (PRIORITY)
- Working taskbar
- Start-window, where you can launch a new window

Later
- API for a CRTL menu. With tasks like: Terminate, Freeze etc
- Catching error messages and displaying them
- Wireless access to a window via Rednet
- Virtual filesystem
- Sandboxing windows: By storing and restoring the global variables via G_[]
- Tray Icons with notifications
- Frames Update (via http, via rednet, and via floppy)
- A bunch of high-quality utilities
- FloppyComputer, window with /disk# as the highest-level folder.
Jan #2
Posted 26 August 2012 - 11:27 PM
Updated to Beta 1.2 :D/>/>
makerimages #3
Posted 27 August 2012 - 07:49 AM
the windows name is heavily copyrighted-you know!
Jan #4
Posted 27 August 2012 - 12:08 PM
the windows name is heavily copyrighted-you know!
Hmm I heard other people warning me tooo…
Gonna rename it to Frames
rickydaan #5
Posted 27 August 2012 - 05:04 PM
the windows name is heavily copyrighted-you know!
Hmm I heard other people warning me tooo…
Gonna rename it to Frames

"Other people"… A.K.A. Rickydaan :3

EDIT:
Sorry, ofc lets stay On-Topic.
A Awesome program. Its no basic program like most make. this is a Easy to use, not hard to learn, and VERY handy system, Expecially making a OS this is handy. (Tab one, two three for editing, tab four for the OS E.G.)
Awesome sause
Dia to u
wilcomega #6
Posted 27 August 2012 - 08:45 PM
good job, is this your own api/program or did you use mine?
Jan #7
Posted 27 August 2012 - 08:59 PM
good job, is this your own api/program or did you use mine?
Thanks :D/>/>
No, the idea came when I wanted to figure out how to use 'coroutine'.
Then I found out that 2 GUI programs at the same time would cause problems.
When I found ardera's screen capture program on the forums, I decided to use that to save multiple 'virtual' terminals as tables.
wilcomega #8
Posted 28 August 2012 - 07:50 PM
wow that is really smart. i would like to help. i have some great ideas. i will tell you more about those over skype when i help. btw if i join you( or you us ( "working" at a CC company called BlueTide ) ) then it could be called BlueTide OS if you like. anyways contact me :D/>/>
wilcomega #9
Posted 28 August 2012 - 08:11 PM
are you dutch? i just saw your location under your name, i am dutch too :D/>/>, ook nederlands
Jan #10
Posted 29 August 2012 - 12:40 PM
wow that is really smart. i would like to help. i have some great ideas. i will tell you more about those over skype when i help. btw if i join you( or you us ( "working" at a CC company called BlueTide ) ) then it could be called BlueTide OS if you like. anyways contact me :)/>/>
(Dutch)
Ja ik ben eigelijk al lid van BlueTide, maar ik heb nog niet actief met ze gewerkt.
Misschien is het een idee om 'BlueFrames' te maken? Een soort Frames, maar dan met een heel service pack aan utilities!
En ook een login scherm, en een ander start menu, misschien een file browser erbij.
Dan laat ik Frames gewoon een simpel 'run and play' programmaatje zonder te veel poespas, en BlueFrames wordt dan met vanalles erop.
wilcomega #11
Posted 29 August 2012 - 03:05 PM
perfect idee. laten we door praten over skype. voor het geval dat mensen mee luisteren. wat is je skype naam en zit je al in de blueTide Programs INC groep? gevonden
justync7 #12
Posted 06 October 2012 - 07:19 AM
Would you mind if i made a modified version of this for personal use? its pretty much impossible to load mods and windows without doing it manually.
Sebra #13
Posted 06 October 2012 - 07:52 AM
I want to remake this for myself too. I do not want to "install OS" to use this.
wilcomega #14
Posted 07 October 2012 - 07:27 PM
this thread is not active anymore. a newer version of this os is released called blueframes if you have any questions or comments please leave it there and not here
Jan #15
Posted 16 October 2012 - 06:51 PM
Would you mind if i made a modified version of this for personal use? its pretty much impossible to load mods and windows without doing it manually.
I want to remake this for myself too. I do not want to "install OS" to use this.

Yes, you may freely modify it if you want.
Sebra #16
Posted 17 October 2012 - 07:16 PM
Thanks, Jan!
casr144 #17
Posted 28 October 2012 - 10:36 PM
This is pretty damn cool !
i_am_th0r #18
Posted 11 December 2012 - 03:30 PM
looks cool for this im going to test it and use it. ;)/> Good Job
PrinzJuliano #19
Posted 05 January 2013 - 09:05 AM
This is epic, one time I had exactly the same idea, makin' a multi window program. I love this program. You'r awesome ;)/>
Exerro #20
Posted 05 January 2013 - 09:48 AM
how does the multitasking work…i want to add an easy multitasking library into something im making but im not sure how to :l
Jan #21
Posted 06 January 2013 - 08:40 AM
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
Exerro #22
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