HT2477 how to make a snap shot of a selected text

Im trying make a snap shot of a selected text.

To take the picture of a part of the screen
Command (⌘)-Shift-4, and then drag the crosshair pointer to select the area. Continue to press the mouse button, release the keys, and then press Shift, Option, or the Space bar while you drag to resize the selection area. When you are ready to take a picture, release the mouse button.
Pictures of the screen (screenshots) are saved as files on the desktop, but if you prefer to put a screenshot in the Clipboard, hold down the Control key while you press the other keys. You can then paste the picture into a document.
http://support.apple.com/kb/PH11229
http://www.wikihow.com/Take-a-Screenshot-in-Mac-OS-X

Similar Messages

  • How to make icons of photos bigger when selecting to attach to email?

    how to make icons of photos bigger when selecting to attach to email?

    Changing the DPI to 120 won't affect the font size of the menu bar in the Editor.  See this FAQ for what happens when you change the DPI:
    http://www.johnrellis.com/psedbtool/photoshopelements-6-7-faq.htm#The_Organizers_Menu_Bar_ doesnt_show

  • How can i Change the Size of the selected text in JTextPane using ConboBox

    plzz help...
    How can i Change the Size of the selected text in JTextPane using ConboBox ???
    i m using if(cb.getSelectedItem=="small")
    cb.setAction(new StyledEditorKit.FontSizeAction("double click", 12);)
    if(cb.getSelectedItem=="medium")
    cb.setAction(new StyledEditorKit.FontSizeAction("double click", 14);)
    if(cb.getSelectedItem=="large")
    cb.setAction(new StyledEditorKit.FontSizeAction("double click", 16);)
    this code is not working properly according to the action i set on comboBox.
    when i select medium the previously set action on comboBox works like small action work.
    when i select large the medium action starts .
    means its not working in correct time when i select item of combox n action of that item is not working at that time..
    plzz plzz help me:(

    Action action1 = new StyledEditorKit.FontSizeAction(
    "double click", 12);
    Action action2 = new StyledEditorKit.FontSizeAction(
    "double click", 14);
    Action action3 = new StyledEditorKit.FontSizeAction(
    "double click", 18);
    s2 = (String) cb7.getSelectedItem();
    if (s2.equals("Small")) {
    cb7.setAction(action1);
    e1.setSource(cb7);
    } else
    if (s2.equals("Medium")) {
    cb7.setAction(action2);
    e1.setSource(cb7);
    } else if (s2.equals("Large")) {
    cb7.setAction(action3);
    // e1.setSource(cb7);
    when i chooze any combobox item then according to that item i set the Action on ComboBox but that action is not working properly on the selected text in the JTextPane..means selected text in JText Pane is not changes its Size according to the comboBox selected ITEM.
    PLZ plzzzzzzzzzz help me:((.i will be thankfull to u.

  • How to save multiple snap shots in one file?

    Hi,
    I've been trying to take snap shots using a USB camera and save the
    them into one file; however, I've had no luck with the saving part. Can
    anybody help me with this problem? I've attached the code I'm using in
    case anybody wants to take a look.
    Thank You,
    Molana
    Attachments:
    Camera Snap Shot1.vi ‏100 KB

    Hi Molana,
    If you are looking to save these images to file, you can use either the IMAQ Writefile VIs, or potentially the AVI writefile VIs.  These VIs are both on the FIle I/O palette of the Vision Utilities subpalette.  To write an AVI file, you <b>open</b>, write to, and then <b>close</b> a session, very similar to most processes in LabVIEW.
    I also noticed in your code that you are enumerating your USB cameras and closing the camera session all within the while loop.  This adds a great deal of overhead and time to your acquisition process.  I would recommend moving these processes outside of the acquisition loop, such that they occur once before and once after the snaps.
    If you are still having trouble acquiring, I would recommend that you download and install the NI IMAQ driver.  It includes examples for snapping and saving images with NI IMAQ.  This process is extremely similar to that which you would use in NI IMAQ for USB.
    Hope this helps!
    Robert

  • How to set the desired font to the selected text in textframe?

    Hi,
    I want to change the font(let's say Times New Roman) of selected text in textframe when I click on  menu-item of my plug-in.
    I went through the Adobe Text Engine documentation and  tried some code for setting font but failed. I don't see any member function in IFont class to set desired font, so unable to move forward.
    plz see the code. I would like to know one more thing that how can we set a particular font for a textframe?
    TextRangesRef rangesRef = NULL;
    result = sAIDocument->GetTextSelection(&rangesRef);
    aisdk::check_ai_error(result);
    ITextRanges ranges(rangesRef);
    if (ranges.GetSize() > 0)
         ITextRange range = ranges.Item(0);
         ICharFeatures features = range.GetUniqueLocalCharFeatures();
         IFont  font;                     // I don't see any method to put desired font.
       // features.SetFont(); 
    Thanks.
    D.A

    First, get the font:
    AIFontKey fontKey = 0;
    AIErr error = sAIFont->FindFont("Times New Roman Regular", kAIAnyFontTechnology, kNativeAIScript, 0, &fontKey);
    // do something with error
    ATE::FontRef fontRef = 0;
    error = sAIFont->FontFromFontKey(fontKey, &fontRef);
    // do something with error
    ATE::IFont font(fontRef);
    Then, apply it like this:
    ATE::TextRangeRef textRangeRef = 0;
    AIErr error = sAITextFrame->GetATETextRange(handle_to_artwork, &textRangeRef);
    // check error
    ATE::ITextRange textRange(textRangeRef);
    ATE::ICharFeatures charFeatures = textRange.GetUniqueLocalCharFeatures();
    charFeatures.SetFont(font);
    textRange.ReplaceOrAddLocalCharFeatures(charFeatures);
    There are a few other ways to set the text, but you need to understand how character & paragraph styles interact with each other to understand the differneces. This is the most straight forward way to do it though.

  • How can I get the tab key to select text fields only?

    Since upgrading to Firefox 4 on Windows, the tab key functions differently. How do I change it so that it only selects text input fields?

    The answer is:  The bug is in the UI.  Speech recognition was enabled, by default it uses the bare escape key as a "mic on" indicator, and it does not leave any trace in the keybord configuration.  So that is the bug.  It needs to leave a trace there, a la: "X Listen-for-voice-command  ^" under Mission Control.

  • How to create the request for change of selection text into other language.

    Hi,
    In my object requirement is that when login through Japanese language,  then on selection screen selection text should appear in Japanese language. For that I have maintained the text in Japanese language the program where we define the selection text there from translation I have maintained the text in Japanese but while maintain the text it didn't ask me for REQUEST, because of that I am not able to transport the changes to next system, so I want know how to create the request for this case.
    Thanks

    Hello Chetan,
    You could goto the selection screen texts by goto-> selection texts,
    Then you could again goto -> Translation
    or
    Other-> Translation(Not sure )
    Then double click on the Program you should be able to see the Texts that need translation, now change something save and come back and try to activate, now it should propose for a new Transport Request.
    Either create a new transaport request or give one that you have given for the program.
    Hope the issue is resolved.

  • FSCM Documented Credit Decision SnapShot - how to remove the Snap Shot linked object

    Within the Documented Credit Decision linked objects there is the SnapShots for credit decisions section. I'm trying to remove this folder from the linked objects area. Also the linked objects folder titles are in German unlike all other areas of the case which are in English. Does anyone know where I need to make the adjustments to correct the language and remove the SnapShots from being displayed? Your insight is greatly appreciated.

    Hello John,
    1. T-Code : SCASE --> Select the second node "Records and case Record Models" you then get a drop sown -->  for the Modelet in the case record in SAP Credit Management  --> right click and choose find --> a new window opens --> direct execute (F8) --> Select DCD case Record --> on the right hand side you would be able to see 4 folders -->  the second fodler is snapshot nod deactivate that. node and i think then you should be able to see SNAPSHOT  in Object when i a normal DCD is created in linked Objects.
    Also we have one more option that is the badi which is used for SNAPSHOTS.
    You need to activate that badi in case if you do not want to use the SNAPSHOT functionality.
    I repeat you need to activate the badi if you do not want to use the SANPSHOT fucntion .
    SPRO--> Financial Supply Chain Management -->Credit Management --> Credit Risk Monitoring --> Documented Credit Decision --> Enhancements --> you would be able to see the 3 badi's  you need to activate the second one.
    Regards
    Sai

  • How do I write snap shot of my data to measurement file every 5 seconds

    Hi There
    I'm trying take a snapshot of my data stream once every 5 seconds and write it to a .LVM file. I'm having trouble with the "Write to Measurement File" VI. The rate at which it writes data to the file appears to be dictated by the "Samples to Read" parameter in the DAQ assistant. I've tried placing the "Write to Measurement File" VI inside a case structure and initiating the case structure with an "Elapsed Time" VI. This only results in a 5 second delay before the "Write to Measurement File" VI initiates. Once the "Write to Measurement File" VI is initiated it begins writing at 20 x per second. Is there a way to change this or dictate the rate at which the "Write to Measurement File" VI exicutes? 
    My reason for slowing down the write rate are, 1) Reduce disk space taken up by my data file. 2) Reduce CPU usage and hard disk access cycles.
    The reason I can't increase the "Samples to Read" value in the DAQ assitant (to match my data writing requirement) is that my VI will begin to miss events and triggers.
    I'm sure I can't be the only person who needs high frequency data acquisition and low frequency writing of the processed data to disk? I can't however see a straight forward way of achiving this.
    The hardware I am using is a NI USB 6008 DAQ, acquiring analogue voltage data at 100hz.   
    Thanks in advance for your help
    Cheers
    Kim
    Solved!
    Go to Solution.

    The case structure and the elapsed time function should work. Did you configure it to reset when the time target is reached? You should get a single true and then the output will be false until the time has elapsed again. The write to file would not be running 20 times a second. Post your code if you still have problems.

  • How to make the Open/Save dialogue download the text file instead of JSP

    I am currently coding on a JSP program, which searches the database and writes the resultset into a file on the server, and then allows the client to download this tab delimited text file onto their local machine. But I met a problem, when the default Open or Save dialogue appears, it shows that it's trying to download the running JSP file from my local host instead of the newly-created text file. Despite this, when I click OK to either Open or Save the file, a warning dialogue will appear saying: The explorer cann't download this file, it's unable to find this internet site or something like that. I get no error message from the server but I was always told that Javax.servlet.ServletException: getWriter() was already called. What does this mean?
    I guess maybe this is caused by the mix use of outputStreams in my program. I don't know if there is a way to directly read the resultset from the database and then send it through outputStream to the client. My solution is: first create a file on the server to hold the resultset, and then output this file to the client. I did all these in one JSP program: Create file on the server, search database, and then read file and output the contents to client. Is this correct? I attached my code, please feel free to correct any of my mistake? Thanks!
    //global.class is a class dealing with database connection
    <%@ page language="java" import="java.sql.*,java.util.*,java.math.*,java.io.*,ises.*,frmselection.*" %>
    <jsp:useBean id="global" scope="session" class="ises.Global" />
    />
    <!--start to process data-->
    <%
    //get query statement from the session
    String sQuery = "";
    if (session.getAttribute("sQuery")!=null && !(session.getAttribute("sQuery").toString()).equals(""))
    sQuery = session.getAttribute("sQuery").toString();
    String path = "c:/temp";
    String fileName = "temp.TXT";
    File file= null;
    FileOutputStream fo = null;
    PrintStream ps = null;
    try {
         file = new File(path,fileName);
         if(file.exists()) {
         file.delete();
         file.createNewFile();
         fo = new FileOutputStream(file);
         ps = new PrintStream(fo);
    }catch(IOException exp){
         System.out.println("IO Exception: " +exp.toString() );
    java.sql.ResultSet recResults     = null;
    java.sql.Statement STrecResults = null;
    STrecResults = global.getConnection().createStatement();
    recResults = STrecResults.executeQuery(sQuery);
    ResultSetMetaData meta = recResults.getMetaData();
    int columns = meta.getColumnCount();
    String [] tempColumnName = new String[columns];
    String [] ColumnName =null;
    int DisColumns = 0;
    int unDisCol = 0;
    String sLine = "";
    if(recResults.next()) {     //if_1
    for(int n=0;n<columns;n++) {
    String temp = meta.getColumnName(n+1);
    if(!temp.equals("PROJECTID")&&!temp.equals("BUILDINGID")&&!temp.equals("HAZMATPROFILEID")) {
    sLine = sLine + "'" + temp + "'" + " ";
    tempColumnName[DisColumns] = temp;
    DisColumns ++;
    ColumnName = new String[DisColumns];
    }else {
    unDisCol ++;
    }//end for
    for(int i=0;i<(columns-unDisCol);i++) {
    ColumnName[i] = tempColumnName;
    ps.println(sLine);
    do{
    sLine = "";
    for(int n=0;n<(columns-unDisCol);n++) {
    String tempColName = recResults.getString(ColumnName[n]);
    if(tempColName==null) {
    sLine = sLine + "" + " ";
    } else {
         sLine = sLine + "'"+tempColName+"'" + " ";
    ps.println(sLine);
    }while(recResults.next());
    }     //end if_1
    recResults.close();
    recResults = null;
    STrecResults.close();
    STrecResults = null;
    %>
    <!--end of processing data-->
    <!--start of download.jsp-->
    <%
    //set the content type to text
    response.setContentType ("plain/text");
    //set the header and also the Name by which user will be prompted to save
    response.setHeader ("Content-Disposition", "attachment;filename=temp.TXT");
    //Open an input stream to the file and post the file contents thru the servlet output stream to the client
    InputStream in = new FileInputStream(file);
    ServletOutputStream outs = response.getOutputStream();
    int bit = 256;
    try {
         while ((bit) >= 0) {
         bit = in.read();
    outs.write(bit);
    } catch (IOException ioe) {
    ioe.printStackTrace(System.out);
    outs.flush();
    outs.close();
    in.close();     
    %>
    <!--end of download -->

    Thanks. I believe something wrong with this statement
    in my program:
    You are correct there is something wrong with this statement. Seeing how you are doing this in a jsp, not really what they're made for but thats another topic, the output stream has already been called. When a jsp gets compiled it creates a few implicit objects, one of them being the outputstream out, and it does this by calling the response.getWriter(). getWriter or getOutputStream can only be called once, other wise you will get the exception you are experiencing. This is for both methods as well, seeing how the jsp compiles and calls getWriter means that you cannot call getOutputStream. Calling one makes the other throw the exception if called as well. As far as the filename problem in the browser goes I'm guessing that it's in IE. I've had some problems before when I had to send files to the browser through a servlet and remember having to set an inline attribute of some sort in the content-dis header inorder to get IE to see the real filename. The best way to solve this is to get the orielly file package and use that. It is very easy to use and understand and does all of this for you already. Plus it's free. Cant beat that.
    ServletOutputStream outs =
    response.getOutputStream();
    because I put a lot of printout statement within my
    code, and the program stops to print out exactly
    before the above statement. And then I get the
    following message, which repeats several times:
    ServletExec: caught exception -
    javax.servlet.ServletException: getWriter() was
    already called.

  • How to make a fix width for a select list

    APEX 4
    good day everyone I have an apex_item selectlist. My question is How do I make a fix width on it?

    http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_item.htm#CHDHJJAB
    APEX_ITEM.SELECT_LIST(
        p_idx           IN   NUMBER,
        p_value         IN   VARCHAR2 DEFAULT NULL,
        p_list_values   IN   VARCHAR2 DEFAULT NULL,
        p_attributes    IN   VARCHAR2 DEFAULT NULL,
        p_show_null     IN   VARCHAR2 DEFAULT 'NO',
        p_null_value    IN   VARCHAR2 DEFAULT '%NULL%',
        p_null_text     IN   VARCHAR2 DEFAULT '%',
        p_item_id       IN   VARCHAR2 DEFAULT NULL,
        p_item_label    IN   VARCHAR2 DEFAULT NULL,
        p_show_extra    IN   VARCHAR2 DEFAULT 'YES')
        RETURN VARCHAR2;Specify
    p_attributes => 'style="width: 200px;"'for a width of 200px.
    Ta,
    Trent

  • How to make a bit field (multiple bits selectable) structure?

    I'm develping a program to communicate with an external device, and it has a specific protocol. Often times, I need to make structs/typedefs of specific type (u8/u16/u32) that have values defined by multiple selection. For example, the protocol asks for the following:
    The field is a bit field structure (multiple bits can be set simultaneously) defined as follows:
    typedef u_16 COMM_TYPES;
    #define A 0x8000
    #define B 0x4000
    #define C 0x2000
    #define D 0x1000
    How would you recommend implementing this? I've tried looping through a listbox in combination with a text ring that has the name and value pairs, but its cumbersome doing for each unique typedef (see image below)

    That's what I would do.  Other than I might use OR instead of sum, but that shouldn't make a difference.
    The other possibility would be to take the array of index values,  to a 2^x where x the array of indices, then add that.  This assumes that every index in the array matches bit for bit with the enum values.  Nothing is missing, and array element 0 corresponds to bit 0.  In your case, your order is reversed, but you can reverse the array.  And all your values are in the highest nibble of the highest byte (hex ?000)  So you'd have to do some bit shifting or multiplication to get the actual values.
    But I think this would make your code that much more fragile.  I would just do what you have shown.

  • How to make an a basic attack in my text based game

    hey guys! i really need some genuine help on how to create an attack for my monsters and player. the attack should be basic: if the room contains a monster, then the monster attacks when the player goes inside the room. then the player can type a command to attack the monster. the attack should just deduct the hp of the monster. so the player can keep attacking till the monster is "dead"(this is where i remove the monster).
    anyway i tried alot in creating the attack but i failed all the time, messing my code even more. please!!!!! help!!!
    my monster class:
    public class Monster
    private int hp, stage;
    private String name;
    public Monster(String name, int stage)
    this.name = name;
    this.stage = stage;
    if(stage == 1) {
    hp = 1;
    else if(stage == 2) {
    hp = 2;
    else if(stage == 3) {
    hp = 2;
    else if(stage == 4) {
    hp = 3;
    else if(stage == 5) {
    hp = 4;
    else if(stage == 6) {
    hp = 6;
    public int monsterStage()
    return stage;
    public String getName()
    return name;
    this is where i created the monsters in my main game class:
    private Monster skeleton, sphinx, zombie, vampire, werewolf, undeadking;
    setting the monster to a room:
    skeleton = new Monster("skeleton1", 1);
    skeleton = new Monster("skeleton2", 1);
    sphinx = new Monster("sphinx1", 2);
    sphinx = new Monster("sphinx2", 2);
    sphinx = new Monster("sphinx3", 2);
    zombie = new Monster("zombie", 3);
    vampire = new Monster("vampire1", 4);
    vampire = new Monster("vampire2", 4);
    werewolf = new Monster("werewolf", 5);
    undeadking = new Monster("undeadking", 6);
    //setting the monster to a place
    bridge.addMonster("skeleton1", skeleton);
    castleDoor.addMonster("sphinx1", sphinx);
    castleChest.addMonster("zombie", zombie);
    dungeonDoor.addMonster("sphinx2", sphinx);
    castleStair.addMonster("werewolf", werewolf);
    dungeonBridge.addMonster("vampire2", vampire);
    dungeonBook.addMonster("sphinx3", sphinx);
    dungeonChest.addMonster("skeleton2", skeleton);
    throneCenter.addMonster("undeadking", undeadking);
    ps.: please help me! each room has one monster only and they are stored in hashmaps

    Here is a start of a basic text based game--it doesn't level or regen characters nor give healing or have new weapons...
    package ForumJunk;
    import java.util.Random;
    import java.util.Scanner;
    public class ForumJunk{
      private final int widthX;
      private final int heightY;
      private int myX;
      private int myY;
      private int myLevel;
      private int baseHP;
      private int myHP;
      private int myTreasure;
      private String[] myWeapon = {"fist", "open hand", "dagger", "short sword", "long sword", "b-sword", "2H sword"};
      private int[] myWeaponMaxDamage = {2, 3, 4, 6, 10, 12, 16};
      private int monsterFillFactor = 40;
      private int[][] monsterLevel = {{1, 1, 1}, {2, 2, 2}, {3, 3, 3}};
      private String[][] monsterName = {{"Skeleton", "Orac", "Kobald"}, {"Zombi", "Wolf", "Giant Rat"}, {"Bandit", "Mummy", "Ghost"}};
      private int[] monsterMaxDamage = {2, 4, 6};
      private myRoom[][] room;
      private Random rand;
      public ForumJunk(){
        widthX  = 100;
        heightY = 100;
        myLevel = 1;
        rand = new Random();
        baseHP   = 16;
        myHP     = baseHP;
        for(int i=0; i<myLevel; i++) myHP = myHP + rand.nextInt(4) + 4;
        room = new myRoom[widthX][heightY];
        for(int i=0; i<widthX; i++)for(int j=0; j<heightY; j++)room[i][j]=new myRoom();
        myX = rand.nextInt(widthX);
        myY = rand.nextInt(heightY);
        myTreasure = 0;
        fillMonster();
      public void doAttack(){
        if(!(room[myX][myY].monster != null)){
          System.out.println("Oh, it must have been my shadow; there's no monsters here \n");
          return; //no monster
        if(rand.nextBoolean()){
         doHumanAttack();
         if(room[myX][myY].monster.hp > 0) doMonsterAttack();
        }else{
          doMonsterAttack();
          doHumanAttack();
      public void doHumanAttack(){
        int weaponIndex = 0;
        if(myLevel<myWeaponMaxDamage.length) weaponIndex = myLevel;else weaponIndex = myWeaponMaxDamage.length-1;
        System.out.println("Attacking with " + myWeapon[weaponIndex] + " ...");
        int damage = myLevel * rand.nextInt(myWeaponMaxDamage[myLevel]);
        room[myX][myY].monster.hp -= damage;
        if(damage>0) System.out.println("Hit for " + damage + " damage\n");
        else System.out.println("I missed!\n");
        if(room[myX][myY].monster.hp <= 0) System.out.println("The " + room[myX][myY].monster.name  + " is dead.");
      public void doMonsterAttack(){
        System.out.println("The " + room[myX][myY].monster.name  + " is attacking...");
        int damage = rand.nextInt(monsterMaxDamage[room[myX][myY].monster.level-1]);
        myHP -= damage;
        if(damage>0) System.out.println("I've been hit for " + damage + " damage\n");
        else System.out.println("It missed me!\n");
        if(myHP<=0){
          System.out.println("Oh no, I'm dead!!!!!");
          System.exit(0);
      public void doStatus(){
        System.out.println();
        System.out.println("  Status:");
        System.out.println("    Room: " + myX + ":" + myY);
        System.out.println("      HP: " + myHP);
        System.out.println("Treasure: " + myTreasure + " gp");
        System.out.println("   Level: " + myLevel);
        System.out.println();
      public void doTreasure(){
        if(!(room[myX][myY].monster != null)){
          System.out.println("What--do you expect it just to be laying around in every room? \n");
          return; //no monster
        if(room[myX][myY].monster.hp>0){
          System.out.println("If there is any treasure that " + room[myX][myY].monster.name + " is guarding it.\n");
          return; //no monster
        myTreasure += room[myX][myY].monster.treasure;
        System.out.println("I found " + room[myX][myY].monster.treasure + " gp\n");
        room[myX][myY].monster = null;
      public void fillMonster(){
        int fill = (widthX * heightY * monsterFillFactor) / 100;
        int x = 0;
        int y = 0;
        boolean gen = false;
        for(int i=0; i<fill; i++){
          gen = true;
          while(gen){
            x = rand.nextInt(widthX);
            y = rand.nextInt(heightY);
            if(!(room[x][y].monster != null)){
              room[x][y].monster = new Monster(rand.nextInt(3)+1);
              gen = false;
      class Monster{
        int level = 0;
        int hp   = 0;
        int treasure = 0;
        String name = "";
        Monster(int level){
          this.level = level;
          hp = 1;
          for(int i = 0; i<level; i++) {
            hp += rand.nextInt(6);
            treasure += rand.nextInt(100);
          name = monsterName[level-1][rand.nextInt(3)];
      class myRoom{
        Monster monster = null;
        //what ever else you want to put in here
      public static void main(String[] args){
        String myIN = "";
        Scanner scan = new Scanner(System.in);
        ForumJunk fj = new ForumJunk();
        System.out.print("I am in room: " + fj.myX + ", " + fj.myY + " I have " + fj.myHP + " hit points and " + fj.myTreasure + " treasure ");
        if(fj.room[fj.myX][fj.myY].monster!=null){
          System.out.println("There is a  " + fj.room[fj.myX][fj.myY].monster.name + " here!");
        System.out.println("\n");
        while(!(myIN=scan.next()).equals("exit")){
          if(myIN.equals("north")){
            fj.myY -=1;
            if(fj.myY<0) fj.myY=fj.heightY-1;
          }else if(myIN.equals("south")){
            fj.myY +=1;
            if(fj.myY==fj.heightY) fj.myY=0;
          }else if(myIN.equals("west")){
            fj.myX -=1;
            if(fj.myX<0) fj.myX=fj.widthX-1;
          }else if(myIN.equals("east")){
            fj.myX +=1;
            if(fj.myX==fj.widthX) fj.myX=0;
          }else if(myIN.equals("attack")){
            fj.doAttack();
          }else if(myIN.equals("weapon")){
            System.out.println("I'll be using my " + fj.myWeapon[fj.myLevel] + " to attack\n");
          }else if(myIN.equals("treasure")){
            fj.doTreasure();
          }else if(myIN.equals("status")){
            fj.doStatus();
        System.out.print("I am in room: " + fj.myX + ", " + fj.myY + " I have " + fj.myHP + " hit points and " + fj.myTreasure + " treasure ");
        if(fj.room[fj.myX][fj.myY].monster!=null){
          System.out.print("There is a ");
          if(fj.room[fj.myX][fj.myY].monster.hp<=0) System.out.print("dead ");
          System.out.println(fj.room[fj.myX][fj.myY].monster.name + " here!");
        System.out.println("\n");
      System.out.println("Bye!");
    }

  • How to make a good UI for channel selection using DAQmx

    A lot of my Labview programming was with earlier verisons of labview (pre Labview 7), and there are a ton of new features that I'm trying to digest (currently using Labview 8.2).
    My question is (in general terms), how are people programming their UI for selecting channels and such when using DAQmx hardware?  What I have in mind is a compacDAQ system with a number of modules.  The user would be able to pick and choose which channels to monitor.  Using MAX as part of that process seems counter intuative, and somewhat static (yeah I know you can change it there, but it feels more like something you would use for something that really doesn't change much).  I'd like all the UI to be within the VI.
    Are programmers using the create task VIs for that or something else?
    Thanks in advance.
    Solved!
    Go to Solution.

    I wholeheartedly second the motion to keep MAX out of the picture as far as users are concerned.
    Setting up UI's for channel selection is a breeze in DAQmx when you create channels on the block diagram. The control you create off the Channels input will populate itself with the inputs that it knows are capable of performing the desired task...
    <<< My configuration knows that my Module 5 is capable of doing Analog Input.
    So... Just create a panel that waits for the user to select the proper channel. I also run a quick check of the user's selection before creating / starting the task. For example, if they choose ai30 or higher, and I know that the system isn't wired for those inputs, I'll not allow that selection. Also check for using two of the same input, etc.
    Richard

  • How to make a row enabled for lead selection and make other Rows disabled?

    Hi,
    What I require is:
    In a webdynpro table , which can have multiple rows, I want to make the rows which are retrieved fom backend as disabled for selection.
    And when I add a new row (using an ADD functionality) , this newly added row should only be enabled for lead selection.
    The Table property "enabled" can be assigned a context , and can be used to control the disabling of whole table.But then if I add the new row to this table, even this will be disabled.
    I can set lead selection to a the new row, but if the whole table is disabled, this won't work.
    Please suggest a solution for this.
    Thanks,
    Richa

    Do not set the enabled flag to the whole table but to the editors of each column. Bind the enabled property to a calculated boolean flag in the data source node. In the get method of this flag add a code that will make the editor enabled only if it belongs to the lead selection element.
    Now do not allow the selection of rows in the table (there is a property for this, perhaps is named rows selection I don't remember well now), but change the lead selection of the data source node to the desired element when you add the element programatically.
    Hope it helps.

Maybe you are looking for

  • Freeze

    Hi. I was on watching a moving on YouTube and my Macbook Pro froze. The keyboard would not respond. So I used the power button to restart my Mac. What's wrong with my Mac?

  • ITunes wont load at all, BEX error?

    Hiya, Not sure whats happened but my iTunes wont open at all. I am getting this error Problem signature:   Problem Event Name:          BEX   Application Name:          iTunes.exe   Application Version:          10.5.2.11   Application Timestamp:    

  • With APTT and Adobe Reader QTP spy on a PDF document causes Adobe Reader to stop working

    Hi, We have the below configurations, QTP Version 11 Adobe Reader 10.1.2 Adobe PDF Test Toolkit for Adobe Reader 10.1.1 onwards Windows 7 64 bit OS Internet Explorer 8 QTP shows AcroQTP in the Add-in page. But when an object Spy is done on a PDF docu

  • A problem with file loading

    Hello, I need to load a binary file and display it. If I wire output from Read binary file to shift register it will be displayed only after I add next element to an array. How to display an array asap and to be able to add next elements to it? Thank

  • Event 109 with full import from cloud

    After installing the AAD Connection Tool we find the step which does a full import from the cloud errors with stopped-extension-dll. This generates 3 error logs in Event Viewer 109 - 6801 - 6803. 109 - Failure while importing entries from Windows Azu