Closed Thread Icon

Topic awaiting preservation: command line type interface Pages that link to <a href="https://ozoneasylum.com/backlink?for=8635" title="Pages that link to Topic awaiting preservation: command line type interface" rel="nofollow" >Topic awaiting preservation: command line type interface\

 
Author Thread
maninacan
Paranoid (IV) Inmate

From: Seattle, WA, USA
Insane since: Oct 2001

posted posted 05-02-2003 01:48

I was thinking about trying to design a site that looks like the command prompt, also known as the dos prompt. I was wondering how I could accept input and stuff from it. Like they just type in a command and then press enter and it does something. Is there a way I could do this without making it look bad, like having a textbox there or something. Also how would I have the blinking underscore thing that is the cursor. Basically I want to know a lot about it and it would probably be best if I could just look at the source code of something similar.

DmS
Paranoid (IV) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 05-02-2003 09:58

Cool idea, should be doable, use css to style the textbox, use js to keep the (real) cursor in the input and submit. Then use php on the server to create pages based on input.
/Dan

{cell 260}
-{ a vibration is a movement that doesn't know which way to go }-

Clay
Nervous Wreck (II) Inmate

From: Utreg, NL
Insane since: Nov 2002

posted posted 05-02-2003 11:06

Some time ago I worked on a kind of "game" that used this idea. The concept was that you got a kind of dos window (graphically spiced up conciderably though) with a commandline inputfield at the bottom of it, and all the screen said was "type help". From there on it was all trial and error for the user. I built in a file system, (browsable with cd name, cd .. etc.) with files and stuff in them, and within one "session" you could also create your own files and save them (not persistent).

It worked by using the keyevent for the enter key, and a list of known actions the script could respond to, combined with a scripted "file system". It was kind of cool, but I never finished it, and by now the code that I used is totally outdated. If I'd do it again I'd use xml to define commandline actions (and probably also any file or other data structures), and load those files onload.

Along with a hidden iframe to buffer content it could become quite an experience.

peterned

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 05-02-2003 17:55

You shouldn't need to actually use a textbox.

As long as the browser is focused you can just detect keyEvents and then use like a inner HTML to refelect those keypresses on the page.

It would be a little complicated because you would have to code it correctly on enters, backspace, arrow keys etc. but it could be done.



.:[ Never resist a perfect moment ]:.

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 05-17-2003 21:24

This idea intereseted me, and I made my own veriosn of dos in javascript. take a look at www.wrayal.4t.com/dos.html Sorry about the popups etc, I dont have my own server or anything. Feel free to nick any code you like.

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer! It's mine!

FatRod
Bipolar (III) Inmate

From: #
Insane since: May 2002

posted posted 05-21-2003 14:17

I thought i saw something that should be of interest on the the5k.org http://www.the5k.org/description.asp/entry_id=1152

its great - type help to get started.

/Ben

« BackwardsOnwards »

Show Forum Drop Down Menu