How do I create a "command-line-interface" for a game?

Hey people,
For a game I need to make a DOS-like command-line-interface where the user has at least 3 options to answer with, does anyone know how to go about this?
Hope someone here can help me out!
Kind regards,
Angela

I'm not sure what part of this you are having difficulty with. Imagine for a moment that instead of asking for your end user to type something into a text-entry field and to monitor what they type (perhaps when the ENTER key is pressed), that instead you provide 3 buttons on your stage. Responding to a button press in this scenario is much the same as responding to typed user input - your movie does something based on user interaction. Going back to the user entered text scenario, a text or field sprite can detect the ENTER key being pressed and examine the string the user has entered, something like:
on keyDown me
  if _key.keyCode = 36 then
    stopEvent
    sText = sprite(me.spriteNum).member.text
    case sText of
      "hack": -- do whatever you need to here
      "research":
      "wait":
      otherwise:
    end case
  else
    pass
  end if
end

Similar Messages

  • How to get the command line interface for WRT160NL router

    hi,
    How can I get the command line interface for WRT160NL router. please suggest.

    If you’re trying to access the web-based interface of your router, just use its default IP address (192.168.1.1). The Username is left blank and the Password is "admin". Here’s a quick link on how to do that.

  • How to set SAXParser at command-line interface to create a large XML file

    Hi,
    I am trying to create a large XML file (more than 50 MB) by selecting from Oracle database but failed because of "out of memory" error. According to "Oracle XML Developer Guide", we should use SAXParser to parsing a large XML file. But there is no example to show how to set SAXParser at command-line
    Following is what I use to get xml files. It works only when the file is small.
    java OracleXML getXML -DateFormat -withDTD -rowsetTag PO_HDR -conn
    "jdbc:oracle:oci8:@server_name" -user "ID/password" "select * from table_name"
    When I set SAXParser at the way below,
    java oracle.xml.parser.v2.SAXParser OracleXML getXML -DateFormat -withDTD -rowsetTag PO_HDR -conn
    "jdbc:oracle:oci8:@server_name" -user "ID/password" "select * from table_name"
    it failed with the error message: "In class oracle.xml.parser.v2.SAXParser: void main(String argv[]) is not defined"
    Does anyone know how to solve the problem? I'll be appreciated very much for your help.
    Yi

    here are my ideas.
    register the xml schema.
    using xmldom, generate the desired xml output and return as xmltype.
    then you can use something like this to check.
    declare
    xmldoc xmltype ;
    begin
       -- populate xmldoc from you xmldom function
       -- validate against XML schema
       xmldoc.isSchemaValid(schema_url, root_element);
       if xmldoc.isSchemaValid = 1 then
            --valid schema
       else
            --invalid
       end if;
    end

  • How do I create a white line border for my video

    So I've got standard HD source video with 16:9 aspect ratio (1920 x 1080 pixels) and I've made it "wide screen" by putting black slugs as bands at the top and bottom of the screen. I would now like to place a white line border at the top and bottom of the visible video. How do I do this in FCP? Is there a "draw" like function within FCP similar to those in Microsoft Word or Powerpoint, so that I can draw a line and then define it's colour and width?
    Thanks very much.

    Hi Michael,
    if you need to do this often a plugin may also help you to quickly and easily create, reposition and change the width and color of one or more lines. One of these plugins is a free one of mine (actually I have two line genertors available for you).
    You can find them using the link below, they are  "line generators" indeed:
    http://www.lucavisualfx.com/freebies.htm
    Hope you find them useful, if you need me to increase/decrease certain control values (in the actual script/code) let me know and I'll make necessary adjustments for you.
    Luca
    Disclaimer: The plugins downloadable from the link above are totally free, however, the web site includes commercial plugins/visual fx web pages. As per TOU I am required to state that  I may  receive compensation of some sort from my link reccomendation.

  • -info XML format for Compressor's command line interface?

    Hi Everyone,
    I've got a brand new copy of Final Cut Studio HD that I'm using for an encoding project. I'm trying to figure out how to use Compressor's command line interface. I want to give it a MPEG-2 file and a .scc (closed caption) file. I can see how to specify the source file, but I'm having trouble figuring out how to specify the SCC file. As best as I can understand, I'm going to need to use the -info <XML> option, but I haven't found any documentation for this. Can someone point me to the appropriate documentation?
    Thanks!
    - Kevin

    I get an error when I do exactly what you suggested. My problem is not if the XSU is able to locate the xml file because I know it is able to parse it since it picks up an error in it such as if I make the "ROW" element "row" - ie small caps instead of big which is not recognised by XSU. I use the url of the xml file as specified when I open the xml file in internet explorer. The XSU does confirm it inserts the document successfully with my original command but the document simply doesn't get inserted into the table. Specifically, if anyone is to insert the xml file I have shown in Oracle, how would it be approached successfully?
    Your help is very much appreciated.

  • Is their any command line interface to Oracle App server ?

    Hi All,
    I am basically from weblogic background and now started using Oracle Server
    is their any command line interface to the Oracl application server?
    Thanks
    Raghavendra

    Oracle Application Server is composed of two major parts
    A - infrastructure
    B - middleTier
    each one has diferent components and as consequence different "command line" interfaces (for example, infrastruture as an oracle dabatase bound to it .. )
    for each one of these two major parts you have a process that "manages" all other processes/components.
    It's "Oracle Process Manager" -> OPMN
    you can user OPMN and another command line interfaces to manage oracle application server.
    Please Check Documentation, a good start point would be the "application server administrator guide" wich you can find in Application server documentation CD, or online in otn.oracle.com
    Best Regards

  • Setting Command Line Arguments for my Class

    HI,
    How do I set the command line arguments for my debug class. For example , I would like my user to type :
    java Debug -LEVEL1
    What should I do to implement this behaviour.
    Thanks in advance...

         public static void main (String[] args){
              if(args.length > 0){
                   int j = 0;
                   BMsearch search = new BMsearch();
                   try{
                        while (j < args.length){
                             if(args[j].equalsIgnoreCase(ONE_PATERN)){
                                  search.addPaternForSearch(args[j+1]);
                                  j = j+2;
                             else if (args[j].equalsIgnoreCase(PATERNLIST)){
                                  j++;
                                  while( ! (args[j].startsWith("-")) ){
                                       search.addPaternForSearch(args[j]);
                                       j++;
                                  }//end while
                             else if (args[j].equalsIgnoreCase(PATERNFILE)){
                                  j++;
                                  search.readPaternFile(args[j]);
                                  j++;
                             else if(args[j].equalsIgnoreCase(MATCH_H)){
                                  search.heuristic = MATCH_HEURISTIC;
                                  j++;
                             else if(args[j].equalsIgnoreCase(MATCH_H2)){
                                  search.heuristic = MATCH_HEURISTIC_TWO;
                                  j++;
                             else if(args[j].equalsIgnoreCase(OCC_H)){
                                  search.heuristic = OCC_HEURISTIC;
                                  j++;
                             else if(args[j].equalsIgnoreCase(COMB_H)){
                                  search.heuristic = COMBINED_HEURISTIC;
                                  j++;
                             else if(args[j].equalsIgnoreCase(JAVA_S)){
                                  search.heuristic = JAVA_NATIVE;
                                  j++;
                             else if(args[j].equalsIgnoreCase(TEXTFILE)){
                                  j++;
                                  search.readFileIn(args[j]);
                                  j++;
                             else if(args[j].equalsIgnoreCase(TEXTURL)){
                                  j++;
                                  search.readURLFileIn(args[j]);
                                  j++;
                             else if(args[j].equalsIgnoreCase(STOPatFIRST)){
                                  search.searchall = false;
                                  j++;
                             else if(args[j].equalsIgnoreCase(STOPatLAST)){
                                  search.searchall = true;
                                  j++;
                             else if(args[j].equalsIgnoreCase(VERBOSE)){
                                  search.verbose = true;
                                  j++;
                             else if(args[j].equalsIgnoreCase("-h") || args[j].equalsIgnoreCase("-help")){
                                  printHelp();
                                  Start = false;
                                  break;
                             else{
                                  System.out.println(" Error while parsing Parameter. ");
                                  System.out.println(" type java BMsearch -help for all Options");
                                  Start = false;
                                  break;
                        }// end outer while
                   catch(Exception e){
                        System.out.println(" Error while parsing Parameter. ");
                        System.out.println(" type java BMsearch -help for all Options");
                        Start = false;
                        j = args.length;
                   if(Start){
                        if(search.verbose)System.out.println(" Parameter parsed, beginning with search ...");
                             search.starttimeTotal = System.currentTimeMillis();
                        search.search();
                        search.stoptimeTotal = System.currentTimeMillis();
                        System.out.println(" Whole search took:  " + (search.stoptimeTotal - search.starttimeTotal) + " milliseconds.(Brutto) ");
              else{
                   System.out.println(" Error while parsing Parameter. ");
                   System.out.println(" type java BMsearch -help for all Options");
         }//end MAINThis is takem from one of my command line classe (a Boyer Moore Pattern-Matching application from an exercise). I don't know if this is the best way, but thats what I have done there for passing some arguments, where the order of them isn't pre-given (you can pass the params in the order you want).
    The CAPITAL vars are pre-defined final Strings holding the param-names, e.g.
    public static final String ONE_PATERN = "-p";
    public static final String PATERNLIST = "-plist";
    public static final String PATERNFILE = "-pfile";Another trick sometimes used in Linux/Unix, if you have only false/true combinations, are numbers from pow 2 (2,4,8,16). In C they are used because of the binary representation, but it has some benefits. E.g. a value of 2 (0010) and another true set on 4 (0100) results binary in 6 (0110), so you can mix parameters in only one value, and with a byte - array you could check, if the flag for a given param is set. But this way is a little tricky for the end-user.

  • How to create a "Command Line"/"Text Validation"

    I want to create a command line like the picture. I'm using "Input Text" method for text. Variable name is "myText", Instance Name is "line".
    How can I use "if" in input text like this:
    Command name is: exit, if user wrote "exit" command, exit the flash app.

    This is a pretty old thread (I know I came across this while searching for something similar recently), but I figured I'd throw this out there in case other people might find this useful. As I write this, JavaFX's latest version is 1.3... which may have added the needed functionality since the last post.
    You can now create a multi-line text area using a TextBox and by specifying the nubmer of lines and setting the "multiline" value to true. It may not offer all of the same functionality as JTextArea, but it did the job for what I needed... newlines by pressing enter, scrollbar if text surpasses height, etc.
    Here's a simple example:
    Group {
       content: [
          TextBox {
             text: "This is a multi-line textbox"
             lines: 10  // <-- this may/may not be necessary depending on your situation. Default is 5.
             multiline: true
    }Edited by: loeschg on Jul 29, 2010 2:59 PM

  • Can I create a new folder using the command line interface

    Hi.
    Is there a way to create a new folder in an existing business area, from the command-line?
    We have an application that provides an interface for the user to create a table and load flat file data into the table. After loading the data, the user will verify the loaded data using discoverer. If there is a command line interface to create a new folder, then the script that created the table can also call the discoverer command line to create a new folder for the new table. Is this possible?
    Thanks

    Hi,
    I think I am having a similar question here. I am using Oracle 10g on Windows xp.
    I logged in to Oracle from command prompt. I used command “create directory myFunDir as 'd:/funDir';”. Oracle returns: “Directory created”. But I couldn’t find the directory “myFunDir”! Where is it?
    Thanks.
    Newbie.

  • How can I make command line interface (CLI)

    Hi All,
    How can I make command line interface ( CLI ) In Java using JTextArea or JTextField.
    Thanks In advance..
    Vikas Sahu

    We do agree with your assessment and have plans to improve all of these aspects. Unfortunately, it takes a long time and a lot of work to turn "working" software into "simple to use" software, but we are working on it, and it is a high priority for us to make it simpler to use and develop for and administer Coherence.
    Peace,
    Cameron Purdy | Oracle Coherence

  • Advice on constructing a test engine and formatting a spreadsheet test file to perform command line interface testing on a product through telnet or serial interface

    Advice on constructing a test engine and formatting a spreadsheet test file to perform command line interface testing on a range of products through telnet or serial interface and output pass/fail results.

    If I understand correctly, you want to do the following:
    1. Create one or more tab-delimited files that specify a series of query strings (that LabVIEW will send to your products) and expected reply strings (that LabVIEW will look for in response to each query)
    2. Run your LabVIEW program (the test engine) and have it execute one or more test scripts from file using either TCP/IP or serial communication to your units under test
    3. Track how many of the queries are met with the expected response, and output an indication of whether each step passed or failed
    If this is close to correct, then I've attached a sample test file and LabVIEW VI as an example; I chose the TCP/telnet method because it allowed me to use the ni.com Web site to simulate my tes
    t hardware. If you happen to own the LabVIEW Internet Toolkit, there's a VI called "Telnet Play Script" in the Telnet palette that does something fairly similar using TCP. The same general model would also work for Serial communications.
    Hope it helps,
    John Lum
    Attachments:
    test_engine.zip ‏24 KB

  • Advice on constructi​ng a test engine and formatting a spreadshee​t test file to perform command line interface testing on a product through telnet or serial interface

    Advice on constructing a test engine and formatting a spreadsheet test file to perform command line interface testing on a range of products through telnet or serial interface and output pass/fail results.

    Hello j. smith,
    TestStand gives you the ability to create "sequence files" which are lists of tests to be run sequentially or in parallel. These tests can be written in any language: LabVIEW VIs, C/C++ DLLs, EXEs, ActiveX objects, .NET Assemblies, etc.
    You can run your TestStand sequence files from a command-line prompt using the following syntax:
    \bin\SeqEdit.exe" /quit -run
    This will launch the TestStand Sequence Editor (and optionally prompt you for TestStand login information if you have this configured), run your sequence file, then exit.
    If you're using the TestStand process model, it can output your results to a report file or database if you configure this. To use a TestStand process mo
    del to execute your sequence file, use the following syntax:
    \bin\SeqEdit.exe" /quit -runEntryPoint
    Here's an example:
    C:\>"C:\Program Files\National Instruments\TestStand 3.0\bin\SeqEdit.exe" /quit -runEntryPoint "Single Pass" "C:\Program Files\National Instruments\TestStand 3.0\Examples\Demo\C\computer.seq"
    Note that multiple sequences and sequence files can be specified on the command line.
    TestStand supports remote sequence execution using DCOM (Distributed COM), which is an east way to remotely execute tests. But as for running tests or commands through a telnet or serial interface, you would have need to check Windows documentation on how to execute command-line remotely like this.
    David Mc.
    NI Applications Engineer

  • Grant and revoke privilages from command line interface

    hi all,
    I have a lot of users that I need to give them a set of privileges to folders and containers of the repository, i thought that using the command line interface should help in loading a script.
    i checked the manual for the syntax for such a command (i.e. to grant privileges) but i couldn't, searched the net and i didn't find anything.
    So can we grant privileges from the command line interface and how ?
    by the way is there anyway to create users from command line interface as well ?\
    thanks in advance and have a good one

    The granting of access rights cannot be done with a CLI script in Designer. Instead you have to use the Designer API Pl/Sql packages.
    For detailed information, refer to the "API and Model Reference Guide", which is
    installed with the Designer Repository Documentation, or can be found on OTN > Doco > Designer site.
    Scroll through that document to the Reference section. You will need to read up on two topics at least: Workarea and Container Context, Privileges and Access Rights.
    To grant rights, the easiest way is to grant them "just like some existing ones".
    To do this, you'll need a Pl/Sql procedure with 5 input parameters:
    1) the workarea context
    2) the container to look at
    3) the user to look like
    4) the container to grant access to
    5) the user to grant access for
    The Pl/Sql procedure then needs to make a series of Repository API package calls to set context and get container IRIDs:
    JR_CONTEXT.Set_Workarea (workareaname) - to set the context workarea
    JR_CONTEXT.Set_Working_Folder (sourcefoldername) - to specify the source container
    JR_CONTEXT.Working_Folder (sourcefolderid) - to get the ID of the source container
    JR_CONTEXT.Set_Working_Folder (targetfoldername) - to specify the target container
    JR_CONTEXT.Working_Folder (targetfolderid) - to get the ID of the target container
    OR you can just do a couple queries after you set the WA CONTEXT such as ...
    Select IRID from CI_Application_Systems where NAME = <sourcefoldername>
    Select IRID from CI_Application_Systems where NAME = <targetfoldername>
    Then you get the list of rights desired, and grant them back to the target user.
    JR_ACC_RIGHTS.Get_Acc_Rights (sourcefolderid, sourceusername) > AccessList
    [gets list of existing rights for some user on a container]
    JR_ACC_RIGHTS.Grant_Priv_List (targetfolderid, targetusername, AccessList, Cascade? = TRUE)
    [to set the list of rights for a user against the target container and its subcontainers]
    There are other ACC_RIGHTS packages, like Grant_Priv, Revoke_Prive, Revoke_Priv_List, etc that you can use as well to build up a set of access management scripts.
    Hope this helps

  • Can I use the Command Line Interface on Unix?

    Hi,
    We use 9iAS on Unix. We want to use Discoverer Command Line Interface on unix to export the worksheet query result. Can anyone know how to do this? I couldn't find out the command similar to dis5usr.exe for windows version.
    Thanks.
    Richard Qiu

    Hello Richard
    You can use the Discoverer EUL Command Line for Java utility. This was released with Discoverer 10g (9.0.4).
    Please refer to the documentation for more information on how to use this command line interface: 'Oracle Discoverer EUL Command Line for Java User's Guide 10g (9.0.4), Part No. B10274_01 (PDF)' The document is available from OTN at http://otn.oracle.com/documentation/discoverer.html
    Regards
    Discoverer Product Management

  • Command Line Interface

    Hi all,
    I am trying to write a program with a command line interface and I am running into a few problems.
    I read the commands issued by the user as :
    BufferedReader in = new BufferedReader(
                new InputStreamReader(System.in));
    String command = in.readLine();Question 1. Is this the right way?
    Question 2. I have to read a password from a user. How do I stop the echo of this password (or change the echo to something like *)? Is it possible to do that from a Java program?
    Question3. While the user is typing a command, the system wants to output a message. This jumbles up the echo of the command the user was typing. So I need to show the message from the system on a new line, and then again show the command the user was typing .. or something similar which keeps the whole thing neat. How do I do it?
    Some of these requirements might not be possible to implement because of the inherent limitation of the command line interface. :-)
    Please help me with this.
    Thanks,
    Binil

    I raised this issue also in another thread.
    Actually I am pretty p.o. This issue pops up over and over again but the people at Sun systematically deny the problem and simply do nothing about it. I know, it's not as interseting as EE, 3D graphics or Swing, but it is asked for by many peaople over and over again.
    I simply don't understand what is so difficult in the method:
    System.in.setEcho(boolean) or System.in.setEcho(char)
    Your solution will work, but it is not platform-idependent. That os what Java is all about or am I wrong?
    hi,
    yah thatz the correct way to read things typed
    typed in the command prompt. Am not sure whether you
    will be able to mask the character typed to show a *
    (but i supoose itz not possible). If you are going
    to do any CLI have a look at JNICurses library
    available at
    http://home.att.net/~psantoro/jnicurses/jnicurses.html
    hope that was useful.
    cheerz
    ynkrish

Maybe you are looking for

  • Folder view in iTunes

    Is there a way to browse my music files in a folder view rather than one huge list? I just added about 4000 .mp3 files to my library (first time using iTunes) and the only way I know of to add songs to my iPod is to scroll through this huge list wher

  • Why are we paying over $300 a month for a family plan that doesn't include call blocking or decent voicemail services?

    I am a member of a shared family plan which as I see it posted our bill is over $300 a month, which does not include unlimited data, family protection (which allows you to permanently block numbers vs there 30 or 90 day limit if you are not covered)

  • PDA: Calling library functions - seems to link the stubbed .cpp file instead of the DLL

    I'm having trouble developing a Lab View PDA module that calls a DLL built using Visual C++. The DLL functions correctly when called in a non-PDA VI. My issues seem to be with porting to the PDA. My configuration: - Lab View 8.5 with the PDA 8.5 modu

  • Inconsistent Multi-Pass

    I recently bought Multi-Passes for the Daily Show and the Colbert Report. They worked as expected for the first two episodes, but today only the Colbert Report downloaded. I received a notification e-mail only for the Colbert Report - however, the sa

  • File transfers (photos) from iPod to Powerbook

    Hi all-posted this as well in iPhoto...not sure best place to have it addressed: I recently used my iPod as a hard drive (as I needed my logic board replaced) so I transferred all my files onto it. Now that I'm transferring my files back to my Powerb