Author Topic: jBasic OS  (Read 50924 times)

0 Members and 1 Guest are viewing this topic.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: jBasic OS
« Reply #90 on: June 21, 2010, 07:10:23 pm »
what about mac?

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: jBasic OS
« Reply #91 on: June 21, 2010, 07:33:53 pm »
I think the Linux one should work on mac, but I haven't been able to test it...my sister wont let me install ff on her mac and test it.
I am currently working on adding icon support for apps, but I haven't been able to add it yet to windows, just the launcher.

EDIT: actually new version, this one lets people toggle/hide/unhide the launcher. I also added a functon to allow someone to hide any object, same with unhiding it. randomInt(a,b) was added from the jBasic library, same with rand() which returns false or true randomly.
Icons are supported now, on both versions, if you make your own app you should make a icon.png that is square and 10x10 or bigger and place it in your apps main folder.
« Last Edit: June 21, 2010, 08:03:22 pm by Eeems »
/e

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: jBasic OS
« Reply #92 on: June 21, 2010, 10:38:45 pm »
New version:
      new commands:
          file_mkdir()
          file_rename()
          file_copy()
          file_move()
/e

_player1537

  • Guest
Re: jBasic OS
« Reply #93 on: June 21, 2010, 11:02:32 pm »
w00t made a program for this that lets you open/close the start menu by pressing `.  Not bad for never using java until now ;)
Code: [Select]
function KeyHook_open(){
KeyHook_hold = null;
if (TASKER_TASK_LIST.name.indexOf("KeyHook")!=-1){
event_notify('Task already exists');
}else{
tasker_create_task('KeyHook','KeyHook_hook()',null,2);
}
}
function KeyHook_hook(){
if ( keyboard_getKey(192) && KeyHook_hold == null ){
if (launcher.childNodes[1].style.visibility == 'hidden'){
desktop_launcher_open();
}else{
desktop_launcher_close();
}
setTimeout('KeyHook_Off();',10);
KeyHook_hold = 1;
}

}
function KeyHook_Off(){
if(!keyboard_getKey(192)){
  KeyHook_hold = null;
}else{
  setTimeout('KeyHook_Off();',100);
}
}

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: jBasic OS
« Reply #94 on: June 22, 2010, 12:16:56 am »
This has been integrated into the main code everybody :P
oh yeah, it's javascript not java, there is a difference :P
/e

_player1537

  • Guest
Re: jBasic OS
« Reply #95 on: June 22, 2010, 10:17:16 pm »
I wrote a few (1 or 2) more apps for this, and made the MouseHook automaticly loaded at startup.  I also added a feature where when you hover of the clock (or the launcher icon) it opens it (for the launcher icon, it toggles the menu being open).  Check it out if you have time ;)

note: this will not probably not work just taking the apps over, I added a lot of stuff to it (added, modded, same thing ;)

Edit: this is  the linux version btw, will not work in windows
« Last Edit: June 22, 2010, 10:30:44 pm by _player1537 »

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: jBasic OS
« Reply #96 on: June 22, 2010, 11:56:19 pm »
What are the apps you made?

Ok, new version that will update the core files automatically (unless you delete Updates.js) so enjoy :) I have not tested it on Windows yet, but it should work.

EDIT: oh yeah x.x
windos people you will need to run it and run the command updater_update() in the command app, Go to updates/ and rename updatesDB.xml to localDB.xml, sorry I forgot to x.x
« Last Edit: June 23, 2010, 12:01:25 am by Eeems »
/e

_player1537

  • Guest
Re: jBasic OS
« Reply #97 on: June 23, 2010, 12:13:23 am »
well...I've made:
AB-press Enter and it makes over 9000 buttons...well it continues to make buttons.
KeyHook-press ` to open/close the main menu
JBasicA-a demo of how to use JBasic with jBOS
gui-an app I was working on to make a gui similar to gedit
MouseHook-an app I made to where you hover over the main menu icon, and it opens it, closes it when you rehover it.  It also used to be incharge of the clock thing (where you hover over it and it shows the system time/date) but I've fixed that now because it was messing up on larger resolutions

I've also modded the kernal app (or maybe the window.js one) to include a startup routine, and threw a few folders for testing purposes in the root/home folder.  Oh and I changed the main menu icon, as well as the alert icon :)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: jBasic OS
« Reply #98 on: June 23, 2010, 12:30:49 am »
Nice to see this progressing :)

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: jBasic OS
« Reply #99 on: June 23, 2010, 10:00:48 am »
If you have left it running long enough, you will notice that it will have updated! you will have a system clock :)
/e

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: jBasic OS
« Reply #100 on: June 23, 2010, 11:01:43 am »
Tried it, nice. Only one suggestion would be to make the Start menu close when clicking a program in there, though, or make the programs appear in the middle of the screen.

_player1537

  • Guest
Re: jBasic OS
« Reply #101 on: June 23, 2010, 11:29:43 am »
I was thinking of going in and adding that.  Eeems, you want to get this one, or can I try it?

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: jBasic OS
« Reply #102 on: June 23, 2010, 12:13:26 pm »
Well I've been meaning to for a while, and it shouldn't be too hard, but it would require changing the jBKernel.js file which I would then have to release a new package. I'll work on it when I finish fixing the automatic update.

EDIT: Windows test for _player.
« Last Edit: June 23, 2010, 11:56:57 pm by Eeems »
/e

_player1537

  • Guest
Re: jBasic OS
« Reply #103 on: June 24, 2010, 12:54:25 pm »
here are some routines, file_wline and file_rline (write/read line).  They will write/read to a specific line in jBOS of a file.  Thanks to KermM for the main code for each :)  Now its time to write some programs to add in my mods to jBOS ;)   jk.  Anyways, here ya go.
Code: [Select]
function file_rline(path,line){
    file = file_read(path);
    lines = file.replace(/(\r\n|\r|\n)/g, '\n').split('\n');
    return lines[line];
}
Code: [Select]
function file_wline(path,line,content){
    file = file_read(path);
    lines = file.replace(/(\r\n|\r|\n)/g, '\n').split('\n');
    lines[line] = content;
    file = lines.join("\n");
    file_create(path,file);
}
(btw, I threw these in at the bottom of file.js)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: jBasic OS
« Reply #104 on: June 24, 2010, 01:36:32 pm »
Could you explain a bit more? Is it some sort of ability to use some sort of self-modifying code in jBasic or is it to install mods?