I'm a bit confused. I am trying to write a JavaScript command shell for my board. I added the command shell to the configuration and set the internal code. When I login to try and use it, it says that it cannot find mframe.bin. Well, duh, because its JavaScript.
How do I let the configuration that it is a javascript and not a baja module. Or, do I have to make a baja module that executes a javascript?
I'm a bit confused. I am trying to write a JavaScript command shell for my board. I added the command shell to the configuration and set the internal code. When I login to try and use it, it says that it cannot find mframe.bin. Well, duh, because its JavaScript.
How do I let the configuration that it is a javascript and not a baja module. Or, do I have to make a baja module that executes a javascript?
On 12/19/2008 10:25 PM, Matt wrote:
How do I let the configuration that it is a javascript and not a baja modu Or, do I have to make a baja module that executes a javascript?
make a baja that executes the .js example....
:top EXEC "?s3.js" # should only see in a shell change PAUSE GOTO
top
replace s3 with your shell... the loop is so you can break out of the js, a reload... this also works for changing shells... your js shell will need to detect the shell changed and exit the js.
Re: Re: JavaScript Command Sh
By: Tracker1 to Matt on Fri Dec 19 2008 11:06 pm
On 12/19/2008 10:25 PM, Matt wrote:
How do I let the configuration that it is a javascript and not a baja modu Or, do I have to make a baja module that executes a javascript?
make a baja that executes the .js example....
:top EXEC "?s3.js" # should only see in a shell change PAUSE GOTO
top
replace s3 with your shell... the loop is so you can break out of the js, a reload... this also works for changing shells... your js shell
will need to detect the shell changed and exit the js.
I know this is an ancient thread, but it might be worth mentioning
somewhere in the documentation. I spent a lot of time tracking this down last night, and then a lot of wasted time trying to figure out why once I changed to my custom shell, I couldn't change out of it without re-logging (because I's an idiot at 3am).
The snippet I used to detect the shell change (to break out of the shell
and allow another one to take over) was this:
if(user.command_shell.toUpperCase() != "MYSHELL") {
exit();
}
Is this the cleanest way to handle it?
Sysop: | Chris Crash |
---|---|
Location: | Huntington Beach, CA. |
Users: | 578 |
Nodes: | 8 (0 / 8) |
Uptime: | 04:49:21 |
Calls: | 10,736 |
Files: | 5 |
Messages: | 443,460 |