Omnimaga

General Discussion => Technology and Development => Computer Projects and Ideas => Topic started by: Binder News on December 23, 2010, 08:51:29 pm

Title: XConsole
Post by: Binder News on December 23, 2010, 08:51:29 pm
Okay, I am finally announcing my latest project, the XConsole. Due to my disgust and annoyance with the current terminal windows for the different OSs, I am developing my own, entirely cross platform command prompt. Written in Java.

It will feature:
  -support for the commands of Bash, windows CMD, and whatever Mac has
  -this means you will be able to run things like batch files on any platform
  -the ability to quit the current program without closing the XConsole window (I hate that in CMD)
  -a file chooser dialog to make it easier to change folders
  -etc.

Attached you will find the latest version in a JAR file. As a test, I suggest typing in "java". You can also resize the window.
This will be updated frequently, as I have a lot of time.
Title: Re: XConsole
Post by: jnesselr on December 23, 2010, 10:31:02 pm
A classic example of where Java will not work on all platforms because they assume it works on all platforms.  This will not work on Mac. I can get it to work on Mac, but will need the original project file, because I need to make sure that I just didn't disassemble it wrongly.

But in it's current state, this is using a different version than my current JRE will accept.  According to said manifest file:
Code: [Select]
Manifest-Version: 1.0
Created-By: 1.6.0_20 (Sun Microsystems Inc.)
Main-Class: XConsole
And according to my java:
Code: [Select]
java version "1.5.0_24"
Which is why your Java 6 will not work with my Java 5.
Title: Re: XConsole
Post by: Munchor on December 24, 2010, 06:27:34 am
It worked in my computer, I ran a 'tree' command, and got this:

Code: [Select]
³       ÃÄÄÄDocking
³       ³   ÃÄÄÄHelpers
³       ³   ÃÄÄÄResources
³       ³   ÀÄÄÄWin32
³       ÀÄÄÄProperties
ÃÄÄÄtilp-6.81
ÃÄÄÄtilp-6.81 (1)
ÃÄÄÄTokens
ÃÄÄÄTokens (3)
³   ÀÄÄÄRelease
ÃÄÄÄwabbitemu
ÀÄÄÄz80disassembler

Whatever the symbol is, change it :S


EDIT: Oh, help menu:

Code: [Select]
>help
Para mais informa‡äes sobre um comando espec¡fico, escreva HELP nome-do-comando
ASSOC          Mostra ou altera associa‡äes de extensäes de ficheiros.
ATTRIB         Mostra ou altera atributos de ficheiro.
BREAK          Define ou limpa a verifica‡Æo expandida de CTRL+C.
BCDEDIT        Define as propriedades na base de dados de arranque para
               controlar o arranque.
CACLS          Mostra ou modifica listas de controlo de acesso (ACLs)
               a ficheiros.
CALL           Invoca um programa de comandos a partir de um outro.
CD             Mostra o nome ou altera o direct¢rio actual.
CHCP           Mostra ou define o n£mero da p gina de c¢digos activa.
CHDIR          Mostra o nome ou alterar o direct¢rio actual.
CHKDSK         Verifica um disco e apresenta um relat¢rio de estado.
CHKNTFS        Mostra ou modifica a verifica‡Æo do disco no arranque.
CLS            Limpa o ecrÆ.
CMD            Inicia outra ocorrˆncia do interpretador de comandos do Windows.
COLOR          Define as cores predefinidas de primeiro e segundo plano
               da consola.
COMP           Compara o conte£do de dois ficheiros ou conjuntos de ficheiros.
COMPACT        Mostra ou altera a compressÆo de ficheiros em parti‡äes NTFS.
CONVERT        Converte volumes FAT em NTFS. NÆo pode converter
               a unidade actual.
COPY           Copia um ou mais ficheiros para outra localiza‡Æo.
DATE           Mostra ou ajusta a data.
DEL            Elimina um ou mais ficheiros.
DIR            Mostra uma lista de ficheiros e subdirect¢rios num direct¢rio.
DISKCOMP       Compara o conte£do de duas disquetes.
DISKCOPY       Copia o conte£do de uma disquete para outra.
DISKPART       Apresenta ou configura as propriedades da parti‡Æo do disco.
DOSKEY         Edita linhas de comandos, recupera comandos do Windows
               e cria macros.
DRIVERQUERY    Apresenta o estado e propriedades do controlador
               de dispositivo actual.
ECHO           Mostra mensagens e activa ou desactiva o eco de comandos.
ENDLOCAL       Termina a localiza‡Æo de altera‡äes de ambiente
               num ficheiro batch.
ERASE          Elimina um ou mais ficheiros.
EXIT           Encerra o programa CMD.EXE (interpretador de comandos).
FC             Compara dois ficheiros ou conjuntos de ficheiros e
               mostra as diferen‡as entre eles.
FIND           Procura uma cadeia de texto num ou mais ficheiros.
FINDSTR        Procura cadeias em ficheiros.
FOR            Executa um comando especificado para cada ficheiro
               de um conjunto.
FORMAT         Formata um disco para utiliza‡Æo com o Windows.
FSUTIL         Apresenta ou modifica as propriedades do sistema de ficheiros.
FTYPE          Apresenta ou modifica tipos de ficheiro utilizados
               em extensäes de ficheiros.
GOTO           Direcciona o interpretador de comandos do Windows para
               uma linha nomeada num programa batch.
GPRESULT       Apresenta as informa‡äes de 'Pol¡tica de grupo' para o
               computador ou utilizador.
GRAFTABL       Permite ao Windows mostrar um conjunto de caracteres
               expandidos em modo gr fico.
HELP           Fornece informa‡äes de ajuda sobre comandos do Windows.
ICACLS         Apresentar, modificar, fazer a c¢pia de seguran‡a ou restaurar
               ACLs de ficheiros e direct¢rios.
IF             Executa processamento condicional em programas batch.
LABEL          Cria, altera ou elimina a etiqueta do volume de um disco.
MD             Cria um direct¢rio.
MKDIR          Cria um direct¢rio.
MKLINK         Cria Liga‡äes Simb¢licas e Liga‡äes Fixas
MODE           Configura um dispositivo de sistema.
MORE           Mostra sa¡da de dados, um ecrÆ de cada vez.
MOVE           Move um ou mais ficheiros de um direct¢rio para outro.
OPENFILES      Apresenta os ficheiros abertos por utilizadores remotos
               para a partilha de ficheiros.
PATH           Mostra ou define um caminho de pesquisa
               para ficheiros execut veis.
PAUSE          Suspende o processamento de um ficheiro batch
               e mostra uma mensagem.
POPD           Restaura o valor anterior do direct¢rio actual
               guardado por PUSHD.
PRINT          Imprime um ficheiro de texto.
PROMPT         Altera a linha de comandos do Windows.
PUSHD          Guarda o direct¢rio actual e, em seguida, efectua as altera‡äes.
RD             Remove um direct¢rio.
RECOVER        Recupera informa‡Æo leg¡vel de um disco danificado ou
               defeituoso.
REM            Regista coment rios (observa‡äes) em ficheiros batch
               ou em CONFIG.SYS.
REN            Muda o nome de um ficheiro ou ficheiros.
RENAME         Muda o nome a um ficheiro ou ficheiros.
REPLACE        Substitui ficheiros.
RMDIR          Remove um direct¢rio.
ROBOCOPY       Utilit rio avan‡ado p/a copiar ficheiros e  rvores de direct¢rio
SET            Mostra, define ou remove vari veis de ambiente do Windows.
SETLOCAL       Inicia a localiza‡Æo de altera‡äes do ambiente
               num ficheiro batch.
SC             Apresenta ou configura servi‡os (processos em fundo).
SCHTASKS       Agenda comandos e programas para executar num computador.
SHIFT          Muda a posi‡Æo de parƒmetros substitu¡veis em ficheiros batch.
SHUTDOWN       Permite o encerramento correcto, local ou remoto, do computador.
SORT           Ordena a entrada.
START          Inicia uma janela separada para executar um programa
               ou comando especificado.
SUBST          Associa um caminho a uma letra de unidade.
SYSTEMINFO     Apresenta a configura‡Æo e propriedades espec¡ficas
               do computador.
TASKLIST       Apresenta todas as tarefas actualmente em execu‡Æo,
               incluindo os servi‡os.
TASKKILL       Elimina ou para um processo ou aplica‡Æo em execu‡Æo.
TIME           Mostra ou define a hora do sistema.
TITLE          Define o t¡tulo da janela para uma sessÆo do CMD.EXE.
TREE           Mostra graficamente a estrutura de direct¢rios de uma
               unidade ou caminho.
TYPE           Mostra o conte£do de um ficheiro de texto.
VER            Mostra a versÆo do Windows.
VERIFY         Indica ao Windows se deve verificar se os ficheiros
               foram escritos correctamente num disco.
VOL            Mostra uma etiqueta e o n£mero de s‚rie de um volume do disco.
XCOPY          Copia ficheiros e  rvores de direct¢rios.
WMIC           Apresenta informa‡Æo WMI dentro duma shell de comandos
               interactiva.

(Portuguese version)

A classic example of where Java will not work on all platforms because they assume it works on all platforms.  This will not work on Mac. I can get it to work on Mac, but will need the original project file, because I need to make sure that I just didn't disassemble it wrongly.

But in it's current state, this is using a different version than my current JRE will accept.  According to said manifest file:
Code: [Select]
Manifest-Version: 1.0
Created-By: 1.6.0_20 (Sun Microsystems Inc.)
Main-Class: XConsole
And according to my java:
Code: [Select]
java version "1.5.0_24"
Which is why your Java 6 will not work with my Java 5.

I use Java 6, Windows 7 64 bit, it worked.
Title: Re: XConsole
Post by: jnesselr on December 24, 2010, 09:35:00 am
Yeah, i know java 6 will work. But his jdk needs to compile to 1.5 and jre nees to run 1.5 or 1.6.  It's tricky to set up to say the least.
Title: Re: XConsole
Post by: Binder News on December 24, 2010, 09:37:34 am
Thanks guys. First, from now on I will be compiling for Java 5. I'll upload a new JAR soon. Second, as of right now it only executes programs, no commands, though I am working on it. Third, if anyone wants to help, PM me.
Title: Re: XConsole
Post by: jnesselr on December 24, 2010, 10:05:38 am
I can help with making it work on mac and other systems. But I don't really want to help per se. I guess if you want me to test something, PM me.
Title: Re: XConsole
Post by: Munchor on December 24, 2010, 10:07:45 am
If you need help on anythin specific I can give it a try :)
Title: Re: XConsole
Post by: Binder News on December 24, 2010, 10:32:36 am
I need someone to make an actual tokenizer. I need it to find strings, so it doesn't split stuff at spaces if they are inside quotes. It needs to return a string array.

EDIT: How do you like using Python? Do you think Python or Java would be easier to learn as a first language?
Title: Re: XConsole
Post by: Munchor on December 24, 2010, 10:50:48 am
I need someone to make an actual tokenizer. I need it to find strings, so it doesn't split stuff at spaces if they are inside quotes. It needs to return a string array.

EDIT: How do you like using Python? Do you think Python or Java would be easier to learn as a first language?

Tokenizers are hard job, I tried making one in both Python and C# with no luck.

Python would be easier as a first language, it's the easiest one and very useful for scripting, believe me!
Title: Re: XConsole
Post by: Binder News on December 24, 2010, 10:56:42 am
I was thinking about using the StreamTokenizer class. java.io package. http://download.oracle.com/javase/1.5.0/docs/api/java/io/StreamTokenizer.html
Documentation link.
Title: Re: XConsole
Post by: Munchor on December 24, 2010, 10:57:42 am
I was thinking about using the StreamTokenizer class. java.io package. http://download.oracle.com/javase/1.5.0/docs/api/java/io/StreamTokenizer.html
Documentation link.

Yes, there are a few online, easy to copy and paste code, but if you wanna make, for example, a TI-Basic one it gets harder :S
Title: Re: XConsole
Post by: jnesselr on December 24, 2010, 10:59:24 am
Yeah, StreamTokenizer is kinda the way to go with spaces.  Use QuoteChar method for strings.
Title: Re: XConsole
Post by: Binder News on December 24, 2010, 11:08:27 am
KK. I'm still hoping I can get someone else to do it so I can get the CD command working and the FileChooser added as a menu option.
Title: Re: XConsole
Post by: jnesselr on December 24, 2010, 11:20:42 am
If you want me to take a look at it, send me your code. I can do file directories pretty well.
Title: Re: XConsole
Post by: Binder News on December 24, 2010, 11:47:27 am
Check your PM inbox, graphmastur.
Title: Re: XConsole
Post by: Binder News on December 24, 2010, 01:56:29 pm
UPDATES: check my first post and re-download the JAR. It should also work with java 5
Title: Re: XConsole
Post by: jnesselr on December 24, 2010, 02:10:56 pm
Okay, using the source from earlier, I found that using PATHEXT is an environment variable only for windows. It will not work on mac, and will return null. Make sure you check null on ever little thing you do, unless you know it will never ever return null.
Title: Re: XConsole
Post by: Munchor on December 24, 2010, 02:11:49 pm
UPDATES: check my first post and re-download the JAR. It should also work with java 5

It's the only update? (working both in Java5 and Java 6?)
Title: Re: XConsole
Post by: jnesselr on December 24, 2010, 02:12:49 pm
UPDATES: check my first post and re-download the JAR. It should also work with java 5

It's the only update? (working both in Java5 and Java 6?)
Yeah, and I do believe it will work with Java 5 now. Although the version still shows 1.6.
Title: Re: XConsole
Post by: Binder News on December 24, 2010, 03:51:01 pm
No, there are some other updates as well. Also, Graph, what environment var should be used for Mac?
Title: Re: XConsole
Post by: cooliojazz on December 24, 2010, 04:20:07 pm
If you still need the tokenizer thing... you could use regex ;)
Code: ("Java!") [Select]
Pattern Splitter = Pattern.compile("(\"[^\"]*\"|[^\"][\\S]*)\\S?");
Matcher m;
int end = -1;
int x = 0;
String[] args = new String[100]; //Or whatever you think the max amount of arguments might be
while (end + 1 < msg.length()) {
    (m = Splitter.matcher(msg)).find(end + 1);
    end = m.end();
    args[x] = m.group();
    x++;
}
Title: Re: XConsole
Post by: jnesselr on December 24, 2010, 04:31:16 pm
No, there are some other updates as well. Also, Graph, what environment var should be used for Mac?
Actually, for mac a executable file doesn't necessarily have an extension. To have it run in a mac terminal, you would do "./<program name here>" or just the program name if you have it set up correctly.
Title: Re: XConsole
Post by: nemo on December 24, 2010, 04:48:19 pm
If you still need the tokenizer thing... you could use regex ;)
Code: ("Java!") [Select]
Pattern Splitter = Pattern.compile("(\"[^\"]*\"|[^\"][\\S]*)\\S?");
Matcher m;
int end = -1;
int x = 0;
String[] args = new String[100]; //Or whatever you think the max amount of arguments might be
while (end + 1 < msg.length()) {
    (m = Splitter.matcher(msg)).find(end + 1);
    end = m.end();
    args[x] = m.group();
    x++;
}


or you could use the split() method, or a StringTokenizer object if you don't need as much power as regular expressions provide.
Title: Re: XConsole
Post by: Binder News on December 24, 2010, 11:11:27 pm
Thanks for all your ideas. Graphmastur, could you tell me what environment var I should substitute on Mac for the PATH var?
Thx.
Title: Re: XConsole
Post by: jnesselr on December 24, 2010, 11:13:41 pm
Thanks for all your ideas. Graphmastur, could you tell me what environment var I should substitute on Mac for the PATH var?
Thx.
PATH. The environment variable should be defined to /usr/local/bin and a few other places. note that they are ":" separated.
Title: Re: XConsole
Post by: Binder News on December 24, 2010, 11:21:43 pm
Thanks. Updated source attached.
EDIT: to get it to compile remove the part that initializes cdir.
Title: Re: XConsole
Post by: Binder News on December 25, 2010, 12:05:00 am
A few more updates. the current directory is now correctly found. It's all working, but javac oddly crashes it...
Any ideas?
Title: Re: XConsole
Post by: Binder News on December 25, 2010, 10:21:36 am
Yay! +4 Respect! More updates. The end process thing in the menu now correctly ends javac as well.

I apologize for double-posting.
Title: Re: XConsole
Post by: Ashbad on December 25, 2010, 10:23:06 am
eh, more like triple posting, but it's fine, since you have updates for XConsole ;)
Title: Re: XConsole
Post by: Binder News on December 25, 2010, 10:28:15 am
Cool. Also, anyone want to make the help menu?
Title: Re: XConsole
Post by: jnesselr on December 25, 2010, 11:00:00 am
Whatever line 8 is returns null. Please fix that by ALWAYS making sure that you don't have null values.
Title: Re: XConsole
Post by: Binder News on December 25, 2010, 11:24:54 am
Oh yea. I forgot about that. What would that var be on a Mac?
Title: Re: XConsole
Post by: Binder News on December 25, 2010, 04:41:39 pm
More updates:
-CD,MD,MKDIR commands work
-will add in-program command list soon...
-working on sidebar, need icons of a folder (like a load icon), and a red box with a white x in the middle, another button
-please reply
Title: Re: XConsole
Post by: Munchor on December 25, 2010, 04:43:55 pm
cd works? Great!
Title: Re: XConsole
Post by: Binder News on December 25, 2010, 04:44:53 pm
yup. I will be adding more commands soon. Probably more updates later today.
What commands should I work on next?
Title: Re: XConsole
Post by: Munchor on December 25, 2010, 04:46:56 pm
yup. I will be adding more commands soon. Probably more updates later today.
What commands should I work on next?

Can you give us a print screen of 'cd' command please? I couldn't get it working :S
Title: Re: XConsole
Post by: Binder News on December 25, 2010, 04:49:52 pm
just type "cd .." in the input bar (minus the quotes), then press enter
Title: Re: XConsole
Post by: jnesselr on December 25, 2010, 05:08:57 pm
There is no equivalent in mac world to PATHEXT.  You will have to comment it out. Google "change mac file into executable" or something of that nature. There are permissions associated with it.
Title: Re: XConsole
Post by: Binder News on December 25, 2010, 05:10:30 pm
Thanks. By the way, will you check out the latest version? Test the commands plase
Title: Re: XConsole
Post by: jnesselr on December 25, 2010, 05:12:20 pm
I can't run it at all while you keep not checking for all your path vars to be null or not. I cannot run it if a single version is null. In other words, if there is some null version, just make it something like ".app;.exe" or something. If you don't fix this, I cannot test it.
Title: Re: XConsole
Post by: Binder News on December 25, 2010, 05:16:48 pm
Crap. Well, I'll try to fix it after dinner.
Title: Re: XConsole
Post by: jnesselr on December 25, 2010, 06:05:59 pm
Crap. Well, I'll try to fix it after dinner.
okay, thanks. I'm sure it will be a nice project.
Title: Re: XConsole
Post by: Binder News on December 25, 2010, 07:54:55 pm
Okay, I THINK it will work on Macs now. If there are any more errors, please reply. I will continue working on commands.
I know ScoutDavid had problems with the CD command, but I couldn't replicate it. It could be related to the Mac problem.
Title: Re: XConsole
Post by: jnesselr on December 25, 2010, 08:07:48 pm
Okay, you fixed your one pac problem. I got an error with CD as well.
Title: Re: XConsole
Post by: Binder News on December 25, 2010, 09:19:39 pm
what did it say?
Title: Re: XConsole
Post by: Binder News on December 25, 2010, 10:04:01 pm
More updates. Added rename command and fixed more bugs.
Please run it from the command line (sorry), to get better error reporting.
Title: Re: XConsole
Post by: jnesselr on December 25, 2010, 11:08:27 pm
Remember to check your null values. ;-)
Code: [Select]
Exception in thread "main" java.lang.NullPointerException
at XConsole.main(XConsole.java:19)
Title: Re: XConsole
Post by: Binder News on December 25, 2010, 11:20:19 pm
Oi vay!!!!! I'm in the middle of rewriting the command processor completely so I don't have to waste so much space repeating code.
Expect another update midday tomorrow.
Title: Re: XConsole
Post by: jnesselr on December 25, 2010, 11:27:11 pm
Oi vay!!!!! I'm in the middle of rewriting the command processor completely so I don't have to waste so much space repeating code.
Expect another update midday tomorrow.
Alright. Posting this so you don't have to double post. I look forward to it.  Although might I suggest having it more graphical with themes, and where you can type on the command line instead of a box under it. ;-)
Title: Re: XConsole
Post by: DJ Omnimaga on December 26, 2010, 02:54:01 am
Interesting, it's nice to see some sort of alternative to command prompt but for all platforms.
Title: Re: XConsole
Post by: jnesselr on December 26, 2010, 04:44:21 pm
Interesting, it's nice to see some sort of alternative to command prompt but for all platforms.
True, but it's going to be difficult. I hope it turns out well. I've noticed a few projects now have taken interest in being cross-platform.
Title: Re: XConsole
Post by: DJ Omnimaga on December 26, 2010, 04:45:32 pm
Yeah true, I wish him good luck. I hope it is possible. X.x
Title: Re: XConsole
Post by: Binder News on December 27, 2010, 05:23:14 pm
Thanks both of you. Unfortunately, with midterms/finals coming up, everything is on hold for me until they are over (about 2 weeks).
I am in the middle of rewriting the instruction processor to remove a lot of redundant code, and make adding instructions easier.

EDIT: 100th post!!!!!
Title: Re: XConsole
Post by: Binder News on December 27, 2010, 06:51:08 pm
I know I said I wasn't going to work on it, but I did. The attached .exe was produced by a program that I made.
Anyways, I rewrote the processing mechanism, and am in the process of adding more commands. It will take probably half as long now. ;D
Also, I know the console window is annoying, but please be patient. It is for debugging. If XConsole crashes, just close the console window.
It also serves as the error stream, and so will allow you to see and report any uncaught exceptions.
Title: Re: XConsole
Post by: Binder News on December 27, 2010, 09:35:21 pm
Just some more routine updates:
 -Added "exit" command
 -Finished rewriting the command mechanism
 -ADDED A PROGRAM ICON!!!!!! ;D ;D ;D ;D ;D ;D ;D :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t:
 -added the thing where you press <UP> and it copies your previous command (you know what I mean)

Next up:
 -Just for fun, some "interesting" music, available via a command
 -better icon
 -releasing the source for my command executor
 -sidebar with icons
Title: Re: XConsole
Post by: jnesselr on December 27, 2010, 11:01:13 pm
I can't test this anymore, btw. Especially when you compile it as a .exe. Just make it for windows, I'm sure it will be good.
Title: Re: XConsole
Post by: Binder News on December 28, 2010, 12:34:10 pm
It's still a JAR. Here is the source to compile so you can test it. I'm doing this more for source protection.
I made a program to generate this file, don't worry, I didn't copy it by hand.
EDIT: btw, when compiled, it is now 16 class files. YIKES!
Title: Re: XConsole
Post by: Munchor on December 28, 2010, 03:29:33 pm
Your last upload, it looks better, but I really need some sort of GIF or Video, or detailedly explained tutorial on how to use this. It can be my deficiency to understand this program or errors.

EDIT:

Also, 'tree' command is still giving lots of 'ÂÂÂÂÂÂÂ's:

Code: [Select]
ÃÄÄÄTokens
ÃÄÄÄTokens (3)
³   ÀÄÄÄRelease
ÃÄÄÄTokens (4)
ÃÄÄÄwabbitemu
ÃÄÄÄwxHexEditor-v0.09-Win32
³   ÀÄÄÄwxHexEditor
ÀÄÄÄz80disassembler
Title: Re: XConsole
Post by: Binder News on December 28, 2010, 03:37:48 pm
I am working on a help thing. I have no idea what "tree" command you are talking about. I have a small list of commands that are implemented right now, and tree isn't one of them. I am also working on a sidebar with icons.
Title: Re: XConsole
Post by: Munchor on December 28, 2010, 04:00:43 pm
I am working on a help thing. I have no idea what "tree" command you are talking about. I have a small list of commands that are implemented right now, and tree isn't one of them. I am also working on a sidebar with icons.

type tree in the XConsole please...
Title: Re: XConsole
Post by: Binder News on December 28, 2010, 04:25:40 pm
Hmmm. It appears that if I have not already specified a way to execute a command, then it executes it using the system. That is OK, but then if your system doesn't support a command, that makes it less cross-platform. That is why I am building in the commands. So they can be executed anywhere.
Also, what platform are you on?
Title: Re: XConsole
Post by: Binder News on December 28, 2010, 06:14:59 pm
More updates:
 -more commands added
 -sidebar!!!! (use the View menu)
 -better icon (it is my avatar)

Next:
 -Help file
Title: Re: XConsole
Post by: Binder News on December 28, 2010, 10:53:57 pm
I'm stuck. I can not for the life of me figure out how to make a PAUSE function. I can't figure out how to get it to detect keypresses on the frame and it's child objects! AARRRRGGGGGHHHHH!!!!!!!!!!!!!!!!  :banghead:
* Binder News is V E R Y F R U S T R A T E D
Title: Re: XConsole
Post by: jnesselr on December 29, 2010, 02:06:13 pm
Well, the easiest way to get it to detect key presses is to add action listeners. Only the action listener that corresponds to the object with focus should receive a key event. You can see if you have focus, too, by one of the methods in the classes.
Title: Re: XConsole
Post by: Binder News on December 30, 2010, 12:35:37 am
I know. I just can't figure out how to make it so that EVERYTHING generates a KeyEvent, disabled or not. I just had an idea though...

EDIT: By the way Graph, I was at Mall of America today, and I saw your avatar on a sign
Title: Re: XConsole
Post by: nemo on December 30, 2010, 12:39:49 am
I know. I just can't figure out how to make it so that EVERYTHING generates a KeyEvent, disabled or not. I just had an idea though...

EDIT: By the way Graph, I was at Mall of America today, and I saw your avatar on a sign

could you go into more detail? or provide some source i could try to figure out how to make it work.
Title: Re: XConsole
Post by: Binder News on December 30, 2010, 12:48:46 am
Attached is the source.
Title: Re: XConsole
Post by: DJ Omnimaga on December 30, 2010, 01:01:11 am
I know. I just can't figure out how to make it so that EVERYTHING generates a KeyEvent, disabled or not. I just had an idea though...

EDIT: By the way Graph, I was at Mall of America today, and I saw your avatar on a sign
That's because his avatar is some sort of graphical code like barcodes. It could have easily been something else.
Title: Re: XConsole
Post by: Binder News on December 30, 2010, 11:18:27 am
Ah, cool.

Anyways, if anyone wants to be a MAJOR help, they can write a routine to find color codes within outputted text, and add them to the output with the color. I am now using a JTextArea for the output.
Title: Re: XConsole
Post by: jnesselr on December 30, 2010, 12:46:31 pm
I know. I just can't figure out how to make it so that EVERYTHING generates a KeyEvent, disabled or not. I just had an idea though...

EDIT: By the way Graph, I was at Mall of America today, and I saw your avatar on a sign
My avatar? You mean the qr code (which might change soon)?
Title: Re: XConsole
Post by: Binder News on December 30, 2010, 01:49:24 pm
Yeah, I saw one. So, will you help with color?
Title: Re: XConsole
Post by: nemo on December 30, 2010, 02:30:35 pm
Yeah, I saw one. So, will you help with color?

what's the problem? you don't know how to set it (http://download.oracle.com/javase/7/docs/api/javax/swing/text/JTextComponent.html#setSelectedTextColor(java.awt.Color)) or you don't know how to parse it (http://download.oracle.com/javase/7/docs/api/javax/swing/text/JTextComponent.html#getSelectedTextColor())?
Title: Re: XConsole
Post by: jnesselr on December 30, 2010, 05:19:35 pm
Yeah, I'm not writing that for you at all. That's kinda a pain to do in some ways. But, nemo gave you good links (to javadoc, I would still search for some tutorials).
Title: Re: XConsole
Post by: Binder News on December 30, 2010, 05:59:31 pm
Yeah, I use javadoc a TON. My internet has been down for a few hours. Really random.
Title: Re: XConsole
Post by: Binder News on December 30, 2010, 07:43:52 pm
We are having MAJOR internet problems (access is very sporadic), so I won't be posting many updates.
Title: Re: XConsole
Post by: DJ Omnimaga on December 31, 2010, 04:26:36 pm
Sorry to hear. What causes the Internet issues? Broken router, viruses, being grounded?
Title: Re: XConsole
Post by: Binder News on December 31, 2010, 04:55:17 pm
I have no idea. It will work one moment, then not the next. It's getting better. Slowly. Very slowly. But I can now be on long enough to post and do other things, before it goes down again.
Title: Re: XConsole
Post by: jnesselr on December 31, 2010, 06:25:14 pm
Well, this is one of those times that you download the Javadoc, and hope for the best. ;-)
Title: Re: XConsole
Post by: Binder News on December 31, 2010, 06:30:12 pm
I already have half the AWT docs on my hard drive. :)
Title: Re: XConsole
Post by: DJ Omnimaga on December 31, 2010, 07:39:00 pm
I have no idea. It will work one moment, then not the next. It's getting better. Slowly. Very slowly. But I can now be on long enough to post and do other things, before it goes down again.
Ah ok, maybe it's just your ISP. I know over here some sites were slow when there was that snowstorm in the South.
Title: Re: XConsole
Post by: Binder News on January 02, 2011, 01:38:40 pm
MAJOR UPDATE: XConsole now supports COLOR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The syntax is: [c=***]text[/c]
Also added echo command

Btw, what is the syntax for bash color?
Title: Re: XConsole
Post by: DJ Omnimaga on January 03, 2011, 11:17:11 pm
Nice. Is there a keyboard shortcut to quickly access certain colors like on IRC? (CTRL+K)
Title: Re: XConsole
Post by: Binder News on January 04, 2011, 06:33:21 pm
no, but the standard colors (red,green,blue,orange,yellow,pink,gray,dk_gray,lt_gray,etc.) are in there (check the java.awt.Color class to see all the colors you can use)
Title: Re: XConsole
Post by: DJ Omnimaga on January 05, 2011, 01:07:06 am
ok I see. Thanks for the info
Title: Re: XConsole
Post by: Binder News on January 12, 2011, 04:57:44 am
Wow, it feels like forever, but it's only been 7 days.

Anyways, added a few more commands.
Mainly, type help for a not-up-to-date list of commands (all listed work, but there are more).

Also wanted to revive this thread, as exams start later this morning (and will be finished Friday)!

I'm gonna try to go back to sleep now...
Title: Re: XConsole
Post by: DJ Omnimaga on January 13, 2011, 12:05:59 am
Cool to see a new update :D
Title: Re: XConsole
Post by: Binder News on January 13, 2011, 12:44:27 pm
Yup. I did say it was only on hold till the end of exams, and exams end tomorrow. (yes, I know I restarted early)
Title: Re: XConsole
Post by: Binder News on January 14, 2011, 09:39:06 pm
Sorry about the double post, but I need to know, should I keep working on this, or does nobody care anymore?
Title: Re: XConsole
Post by: nemo on January 14, 2011, 09:42:35 pm
Sorry about the double post, but I need to know, should I keep working on this, or does nobody care anymore?

i think it's pretty cool. i just don't post often,  i think you should keep working on it. i feel similarly about Juggernaut but i'm continuing for a contest regardless of omnimaga support
Title: Re: XConsole
Post by: Binder News on January 14, 2011, 09:51:15 pm
Well, that's one, if I can get 2 more, I will continue. If not, I guess I'll just release the source, and leave it (I hate doing work for nothing).
Title: Re: XConsole
Post by: shmibs on January 14, 2011, 10:28:08 pm
both of these sound cool to me!
sometimes people just read the threads, nod and smile a little, and then move on to the next thread, waiting to post until there is a finished product, but that definitely doesn't mean nobody cares.
Title: Re: XConsole
Post by: Binder News on January 15, 2011, 11:34:06 am
I know, I just kinda felt like after I added color support (toke me like 3 hrs btw), SOMEONE (anyone), would comment. DJ did, but that was it.

Remember unless I get 1 more reply, I will drop this project.
Title: Re: XConsole
Post by: DJ Omnimaga on January 16, 2011, 07:18:32 pm
The thing is that Omnimaga is mainly calc game-oriented, you can't expect to get as much support for a computer software around here as you would do on an actual computer programming forum. Some people here care, it's just that there are fewer that may actually check the computer section than the calc one.
Title: Re: XConsole
Post by: Happybobjr on January 16, 2011, 07:27:56 pm
both of these sound cool to me!
sometimes people just read the threads, nod and smile a little, and then move on to the next thread, waiting to post until there is a finished product, but that definitely doesn't mean nobody cares.
Completely agree with that.
Title: Re: XConsole
Post by: Binder News on January 16, 2011, 07:28:27 pm
Ok, thanks. The only problem is, I'm not on any other forum (I might get on one though). Except the Game Maker Community. But they only care about GM stuff.
Title: Re: XConsole
Post by: DJ Omnimaga on January 16, 2011, 08:57:31 pm
Ah ok. That said, on certain forums they tend to be rather picky, though. X.x

Another issue is that some people might already be fine with the already existing alternatives to XConsole so you have huge competition there. It's kinda like if you started making a new calculator shell to compete against MirageOS and Doors CS7
Title: Re: XConsole
Post by: Binder News on January 16, 2011, 09:00:56 pm
Good point. Still, I like the idea of what I have. And it has a solid code base. And it's cross-platform.
Title: Re: XConsole
Post by: DJ Omnimaga on January 16, 2011, 09:04:55 pm
Yeah true, I personally like the cross-platform part the most, especially.
Title: Re: XConsole
Post by: Binder News on January 16, 2011, 09:45:22 pm
So do I. Once I finish (which will be forever since there are a TON of Bash commands), you would be able to run batch files in Linux and Mac, and Bash scripts in Windows.
Title: Re: XConsole
Post by: Binder News on February 10, 2011, 03:27:21 pm
I am still working on this, but at a MUCH slower rate. I will probably use this for my AP computer Science course, and do more then with it.
Attached latest build.
Title: Re: XConsole
Post by: DJ Omnimaga on February 12, 2011, 07:59:12 pm
Cool. I hope you score high with this project for class. :)
Title: Re: XConsole
Post by: Binder News on February 13, 2011, 08:15:58 am
So do I. :) Also, my appearances on Omni will significantly decrease b/c my internet is being weird. It might have to do with the server, but IDK. Anyways, I'll still be working, just not online as much.
Title: Re: XConsole
Post by: Munchor on February 13, 2011, 03:16:29 pm
So do I. :) Also, my appearances on Omni will significantly decrease b/c my internet is being weird. It might have to do with the server, but IDK. Anyways, I'll still be working, just not online as much.

Hope you can still come, though ;D

Also, I'd be glad to try the latest .jar but I somehow lost Java :S
Title: Re: XConsole
Post by: DJ Omnimaga on February 17, 2011, 03:40:15 am
So do I. :) Also, my appearances on Omni will significantly decrease b/c my internet is being weird. It might have to do with the server, but IDK. Anyways, I'll still be working, just not online as much.
Ah ok, well I hope you can still visit and not have to leave. Maybe have your parents contact your ISP? It is most likely not my host because most people seems to access it fine.
Title: Re: XConsole
Post by: Binder News on February 17, 2011, 04:08:14 pm
It got fixed. Our internet was down for a few hours, then when we got it back, it's as fast as ever.
Title: Re: XConsole
Post by: DJ Omnimaga on February 18, 2011, 04:48:25 am
Good to hear. :D
Title: Re: XConsole
Post by: Munchor on February 21, 2011, 07:41:15 am
Now I really have to admire this project even more :P I started my own console too and it's quite hard.

However, you're using CMD as a base, and I'm creating it from scratch, but still nice ;D
Title: Re: XConsole
Post by: Binder News on February 22, 2011, 07:08:13 pm
What do you mean I'm using CMD as a base? All the code for the commands is stored in-JAR.
Title: Re: XConsole
Post by: Munchor on February 23, 2011, 10:32:51 am
What do you mean I'm using CMD as a base? All the code for the commands is stored in-JAR.

Yes, but you have CMD commands, I'm making my own :P
Title: Re: XConsole
Post by: Binder News on February 23, 2011, 10:35:47 pm
Ohhh. I get it. Well, the purpose of XConsole was so that you could run it on Linux, Mac, etc., and still be able to use batch files. Also, it will (hopefully) eventually support a number of BASH commands as well. If I ever get around to it.