Robot class and positioning the cursor

I have an application where I have a number of panels on the screen and using an editable field wish to enter coordinates to position the Cursor to on another panel.
ie, using grid coordinates on a map. Using the robot class I am able to position the cursor on the other panel but as soon as I move the mouse the cursor jumps back to the original position on the screen where the first panel with the editable field was. It is like only a picture of the cursor was drawn at the new coordinates and the real cursor is still at the old podition. It is important to this application that if the cursor is moved it stays where it has been moved to and actually is there and not just appearing to be there. I am using jdk 1.3 on Intel Solaris 2.8. Any help on this issue would be helpful and appreciated

Maybe you can use the mouse move event to position the mouse to where you had moved the cursor to.
for example
1.the mouse is at point 100,100
2. you move the cursor from your code to point 0,0
3. the user starts to move the mouse
4. you code gets that event and repositions the cursor to the last place where it was, that is at 0,0

Similar Messages

  • How to highlight a line in a text stream and position the cursor at the end.

    I would like to select a line in a text control data stream, highlight the text, and place the cursor at the end of the line so that the text control can be edited at that point.

    Depends on what you mean by "highlight". If you mean highlight in the sense of when you use the mouse to select text, then you can't do that and then place the cursor at the end, since that would effectively "unhighlight" the text. You need to use a different kind of "highlight", like turning the text bold or something. This KB article talks about highlighting particular characters: How Do I Highlight Particular Characters in a String Control?
    See attached for simple example. Modify as needed.
    Attachments:
    Text Select.vi ‏19 KB

  • Photoshop CS5 - Control and navigate the cursor position automatically

    Hello
    I wonder if it’s possible with Photoshop CS5 (OS: Win7)  to control and navigate the cursor position automatically?
    Given: I have individual image coordinates for a set of locations.
    Wanted: A possibility to position the cursor sequentially at those image location by the means of an external script or procedure.
    Any ideas if that is possible with CS5?
    Thanks for any help.
    Lars

    As far as I can tell with regard to a Photoshop Scripting approach: No.
    Creating a Selection of certain dimensions and a certain position would be possible, though.
    What exactly are you trying to achieve?

  • How to position the cursor in a text

    I there a better way to position the cursor in a text portion other than trying it several times until the OS picks the right space? I know the iPad has a good way to do it by zooming in.
    Or is RIM working on it.....

    I've been pretty successful at getting the cursor to hit where I want in text entry boxes.
    Maybe some more practice will make perfect. Worked for me, until I got used to,and then again maybe my using a touchscreen smartphone, the process just comes second nature for me.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Error in TCode iview Select a line or position the Cursor correctly

    Hi All,
    I am getting the below error while selecting the row in Tcode iview
    Select a line or position the Cursor correctly.
    You have not selected a delivery or a delivery item for processing and the cursor is not positioned on a valid line, even after i am
    selecting the Delivery and click on the execute button
    My system config  :
    NW04s SP 20
    Thanks&Regards
    Murthy

    Hi Murthy,
    Create the Iview again.Hope the issue will resolve.
    Thanks,
    Arun

  • How to position the cursor at the end of the text with EDIT_TEXT?

    Hello, it wanted to ask to them if somebody could make work the module of function EDIT_TEXT so that it positions the cursor at the end of the text that is visualizing in the text editor. In the documentation it says that passing a ' X' to him in the field scrollend of the parameter Control is obtained that operation. Nevertheless, I did this and the cursor continues appearing at the beginning of the text that visualizes.
    Somebody could help me please?
    Regards,
    Gabriel
    PD: The code that I use is the following one:
    FORM f_ingresar_comentarios.
    DATA: l_action,
    l_result LIKE itcer,
    l_pedido LIKE thead-tdname,
    li_coment_save LIKE i_comentarios OCCURS 0,
    li_coment_aux LIKE i_comentarios OCCURS 0 WITH HEADER LINE,
    l_lines TYPE i,
    l_lines_save TYPE i,
    l_lines_insert TYPE i,
    l_index TYPE i,
    l_index_aux TYPE i,
    l_insert,
    lwa_control LIKE itced.
    CLEAR: l_action.
    CLEAR i_comentarios.
    REFRESH: i_comentarios,
    li_coment_save,
    li_coment_aux.
    l_pedido = v_pedido.
    Leemos el texto si es que existe
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    client = sy-mandt
    id = v_id_text
    language = sy-langu
    name = l_pedido
    object = c_ekko
    IMPORTING
    header = wa_cabecera
    TABLES
    lines = i_comentarios "Lineas de texto leídas
    EXCEPTIONS
    id = 1
    language = 2
    name = 3
    not_found = 4
    object = 5
    reference_check = 6
    wrong_access_to_archive = 7
    OTHERS = 8.
    IF sy-subrc <> 0.
    Armamos la cabecera por primer comentario para el pedido
    CLEAR wa_cabecera.
    wa_cabecera-tdobject = c_ekko. "Objeto en tabla TTXID
    wa_cabecera-tdname = v_pedido. "Nro de pedido
    wa_cabecera-tdid = v_id_text. "ID en tabla TTXID
    wa_cabecera-tdspras = sy-langu. "Lenguaje
    wa_cabecera-tdlinesize = 70.
    ENDIF.
    Salva comentarios originales
    li_coment_save[] = i_comentarios[].
    lwa_control-scrollend = c_x. " c_x = 'X'
    Abre el editor de texto
    CALL FUNCTION 'EDIT_TEXT'
    EXPORTING
    header = wa_cabecera
    save = space
    control = lwa_control
    IMPORTING
    newheader = wa_cabecera
    function = l_action
    RESULT = l_result
    TABLES
    lines = i_comentarios
    EXCEPTIONS
    object = 1
    id = 2
    language = 3
    name = 4
    linesize = 5.
    Si cambio los comentarios, actualiza comentarios
    CASE l_action.
    WHEN c_unchanged.
    WHEN c_delete.
    WHEN c_update OR
    c_insert.
    Obtiene cantidad de lineas de comentarios originales y modificados
    DESCRIBE TABLE li_coment_save LINES l_lines_save.
    DESCRIBE TABLE i_comentarios LINES l_lines.
    Si se insertaron lineas...
    IF l_lines > l_lines_save.
    Calcula cantidad de lineas a insertar para luego calcular valor de
    indice a partir del cual insertar los nuevos comentarios
    l_lines_insert = l_lines - l_lines_save.
    l_index = ( l_lines - l_lines_insert ) + 1.
    Controla que al menos una de las lineas insertadas sea diferente de
    blanco
    l_index_aux = l_lines.
    l_insert = c_n.
    DO l_lines_insert TIMES.
    READ TABLE i_comentarios INDEX l_index_aux.
    IF sy-subrc = 0 AND
    i_comentarios-tdline <> space.
    l_insert = c_s.
    EXIT.
    ENDIF.
    l_index_aux = l_index_aux - 1.
    ENDDO.
    IF l_insert = c_s.
    Carga comentarios originales y agrega lineas insertadas
    li_coment_aux[] = li_coment_save[].
    APPEND LINES OF i_comentarios
    FROM l_index
    TO l_lines
    TO li_coment_aux.
    Setea variable para indicar actualizacion de comentarios.
    v_comentario = 'S'.
    Agrega usuario y fecha del comentario
    CONCATENATE sy-uname
    sy-datum
    INTO li_coment_aux-tdline
    SEPARATED BY space.
    li_coment_aux-tdformat = '*'.
    APPEND li_coment_aux.
    Grabamos el texto
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
    client = sy-mandt
    header = wa_cabecera
    savemode_direct = c_x
    IMPORTING
    newheader = wa_cabecera
    TABLES
    lines = li_coment_aux
    EXCEPTIONS
    id = 1
    language = 2
    name = 3
    object = 4
    OTHERS = 5.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDCASE.
    ENDFORM. " f_ingresar_comentarios
    In addition, I made another program simpler that it uses the same functions and also have the same problem:
    *& Report Y_GVA_TEXT *
    REPORT y_gva_text .
    DATA: wa_cabecera LIKE thead,
    i_comentarios LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA: l_action,
    v_comentario,
    l_result LIKE itcer,
    v_pedido LIKE thead-tdname VALUE '3',
    l_pedido LIKE thead-tdname,
    c_a05 LIKE thead-tdid VALUE 'A05',
    c_ekko LIKE stxh-tdobject VALUE 'EKKO',
    l_lines LIKE sy-tabix,
    lwa_control LIKE itced.
    CONSTANTS: c_x VALUE 'X',
    update VALUE 'U', "Langtext verändert
    insert VALUE 'I', "Langtext eingefügt
    delete VALUE 'D', "Langtext gelöscht
    modify VALUE 'M', "Kein Langtext, Inlinezeile veränd.
    unchanged VALUE ' '.
    CLEAR: l_action.
    CLEAR i_comentarios.
    REFRESH i_comentarios.
    Leemos el texto si es que existe
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    client = sy-mandt
    id = c_a05
    language = sy-langu
    name = v_pedido
    object = c_ekko
    IMPORTING
    header = wa_cabecera
    TABLES
    lines = i_comentarios "Lineas de texto leídas
    EXCEPTIONS
    id = 1
    language = 2
    name = 3
    not_found = 4
    object = 5
    reference_check = 6
    wrong_access_to_archive = 7
    OTHERS = 8.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    Armamos las cabecera para mostrar los comentarios
    CLEAR wa_cabecera.
    wa_cabecera-tdobject = c_ekko. "Objeto en tabla TTXID
    wa_cabecera-tdname = v_pedido. "Nro de pedido
    wa_cabecera-tdid = c_a05. "ID en tabla TTXID
    wa_cabecera-tdspras = sy-langu. "Lenguaje
    wa_cabecera-tdlinesize = 70.
    ENDIF.
    lwa_control-noendlines = c_x.
    lwa_control-scrollend = c_x.
    Abre el editor de texto
    CALL FUNCTION 'EDIT_TEXT'
    EXPORTING
    header = wa_cabecera
    save = space
    control = lwa_control
    IMPORTING
    newheader = wa_cabecera
    function = l_action
    RESULT = l_result
    TABLES
    lines = i_comentarios
    EXCEPTIONS
    object = 1
    id = 2
    language = 3
    name = 4
    linesize = 5.
    Si cambio los comentarios, actualiza comentarios
    CASE l_action.
    WHEN unchanged.
    WHEN delete.
    WHEN update OR
    insert.
    Agrega usuario y fecha del comentario
    CONCATENATE sy-uname
    sy-datum
    INTO i_comentarios-tdline
    SEPARATED BY space.
    i_comentarios-tdformat = '*'.
    APPEND i_comentarios.
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
    header = wa_cabecera
    IMPORTING
    newheader = wa_cabecera
    TABLES
    lines = i_comentarios.
    ENDCASE.

    Murugesh,
    I believe that you have mis-read Gabriel's problem.
    Gabriel,
    The cursor is not positioning at the base of the editor as you have cited.
    In order to get this functionality to work, you must set the LINE_EDITOR import paramter to 'X'.
    data: hdr like THEAD.
    data: l_itced like itced.
      hdr-tdobject = 'VBBP'.
      hdr-tdname = '4000029521000030'.
      hdr-tdid = 'Z005'.
      hdr-tdspras = 'E'.
      hdr-TDLINESIZE = '100'.
      hdr-TDTXTLINES = '3'.
      l_itced-SCROLLEND = 'X'.
      CALL FUNCTION 'EDIT_TEXT'
        EXPORTING
        DISPLAY             = ' '
        EDITOR_TITLE        = ' '
          HEADER              = hdr
        PAGE                = ' '
        WINDOW              = ' '
        SAVE                = 'X'
          LINE_EDITOR         = 'X'   " here !!!
          CONTROL             = l_itced
        PROGRAM             = ' '
        LOCAL_CAT           = ' '
      IMPORTING
        FUNCTION            =
        NEWHEADER           =
        RESULT              =
        TABLES
          LINES               = lines
      EXCEPTIONS
        ID                  = 1
        LANGUAGE            = 2
        LINESIZE            = 3
        NAME                = 4
        OBJECT              = 5
        TEXTFORMAT          = 6
        COMMUNICATION       = 7
        OTHERS              = 8
    Don't forget those points !!

  • Why is my BDC_CURSOR command not working to position the cursor?

    Why is my BDC_CURSOR command not working to position the cursor?  Here are the details regarding my issue.
    I am writing a BDC to mass delete routing material assignments using transaction CA02.  I am OK to navigate through the initial screen to go to the Header screen and from here I am OK to navigate to the Material Assignments screen.  But once here, I cannot get the BDC_CURSOR command to take me into the list.  Here are the commands I am using.  Please let me know what I may try differently.
    CA02 Material Assignment - Set position  <-- this resets list of materials to correct position
      PERFORM bdc_dynpro      USING 'SAPLCZDI'   '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR'  'RC27X-ENTRY_ACT'.
      PERFORM bdc_field       USING 'BDC_OKCODE'   '=ENT1'.
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'  c_position.
    CA02 Material Assignment - Delete
      PERFORM bdc_dynpro      USING 'SAPLCZDI'   '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR'  'MAPL-MATNR(01)'.    <-- this is not working to set the cursor into the list
      PERFORM bdc_field       USING 'BDC_OKCODE'  '=LOE'.             " trash can
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'  c_position.
    CA02 Material Assignment - Green Check OK
      PERFORM bdc_dynpro      USING 'SAPLCZDI'   '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR'  'RC27X-ENTRY_ACT'.
      PERFORM bdc_field       USING 'BDC_OKCODE'   '=BACK'.            " check mark
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'  c_position.

    Thank you for your reply.
    I had used SM35 to record.  However, I was not aware of the "create program" feature.  I had commented out a section from my previous post which I have now added back (latest code below).  But it still did not resolve the issue.
    When I execute with dismode = 'N', I get back error message "No batch input data for screen SAPLCZDI 1010".
    When I execute with dismode = 'E' (only show dynpros when error), it stops at the material selection screen without placing my cursor in the list.  I can then MANUALLY click to set the cursor position in the list, MANUALLY click the trashcan, it then uses my BDC command to respond to the popup asking "Do you want to delete", still leaving me at the material selection screen.  I can then MANUALLY click the green check (or enter), then it continues with the BDC to go back to the previous screen, and saves.  But it still will not place my cursor in the material selection list (SAPLCZDI screen 1010).
    Here is code used.  It is the second section of code labeled "CA02 Material Assignment - Delete" that is not working.
    CA02 Material Assignment - Set position
    this code functions to position the desired material to first in screen list
      PERFORM bdc_dynpro      USING 'SAPLCZDI' '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC27X-ENTRY_ACT'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=ENT1'.
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'
                                     c_position.
    CA02 Material Assignment - Delete
      PERFORM bdc_dynpro      USING 'SAPLCZDI' '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR' 
                                    'MAPL-MATNR(01)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=LOE'.             " trash can
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'
                                     c_position.
    Acknowledge Pop-Up Screen
      PERFORM bdc_dynpro      USING 'SAPLSPO1' '0100'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=YES'.
    CA02 Material Assignment - Green Check OK
      PERFORM bdc_dynpro      USING 'SAPLCZDI' '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC27X-ENTRY_ACT'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=BACK'.            " check mark
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'
                                     c_position.

  • How to position the cursor in File Name area in JFileChooser??

    Hi,
    I have been trying to position the cursor directly to filename area in JFileChooser. But no success.
    It positions itself at the directory path by default.
    How should I achieve this?
    The problem is that I do not know the name of this
    component used for File Name area hence difficult to
    use "requestFocus() or getFocus()" like methods.
    Thanks for your help.
    -Manoj

    Somewhere I saw a tip that explained how to do it, but I didn't keep a link to it. But basically it's like this: JFileChooser is a Container, so getComponent(n) will return the n-th component in the JFileChooser. One of them is the one you want to give the focus to, and I expect it will be a JTextField. A little experimentation should tell you which index you need to use.

  • Position the cursor on a button

    Hi friends,
    How to get and set the cursor position on a button in module pool programming.
    Kindly advice.
    Thanks  n regards,
    Praveen Lobo

    hi,
    BY USING KEYWORD SET CURSOR U ASSIGN FOCUS THE CURSOR TO A PARTICULAR FIELD IN A SCREEN. USING THIS KEYWORD IN PBO EVENT.
    PBO EVENT
    SET CURSOR ON 'BUTTON NAME'.
    IF HELPFUL REWARD SOME POINTS.
    WITH REGARDS,
    SURESH ALURI

  • Agent Assignment showing error "Please position the cursor correctly"

    Hi Friends,
    I have a strange problem that has come up suddently in the development client. The "Agent Assignment" which was happening earlier is not working anymore. Instead it is showing an information message "Please position the cursor correctly". I am doing the agent assignment the same way i used to do it earlier but its not happening. I tried changing the agent assignment for most of the task types including the "Activity" task, "Decision" task. But nothing seems to work....
    The agent assignment is happening in Sandbox client but not in Development client.
    Is it some BASIS side settings ?? What may be the exact cause ??
    Please help.
    Thanks,
    Shashank Shirali

    You do not have the proper authorization to do the agent Assignment. Take a SU53 dump and you will find our which authorization is missing and ask the Security folks to provide the authorization.
    Thanks
    Arghadip

  • Robot class and keystrokes

    Can somebody help me? I have a 14000 plus line coded program. I need to generate software produced keystrokes. For example I would like to have my program hit the 'Enter' key instead of it being generated from the keyboard by a user. Now, I have just briefly been introduced to the Robot class and I am trying to understand it. I guess to use it I have to throw a AWTException. The problem is where I need to use the Robot class is in a JButton ActionListener(), which is on line 8000 nested in another frame. My question is how and where do I throw the AWTException in my program so that I can use the Robot class to generate an 'Enter' keystroke? I have noticed that in some sample programs the AWTException follows the opening
    public static void main(String[] args) throws AWTException
    statement. I tried attaching this in my program but the code nested in a AcitionListener did not recognize it.
    What I am hoping is that I can throw the exception in the following format:
    try
    Robot robot = new Robot();
    robot.keypressed(VK_ENTER);
    catch (AWTException exception)
    exception.printStackTrace();
    This is just a format I made up to show what I am looking for it has no actual copyright.
    I do not want to throw the AWTExecption for my whole program just this localized area when I need to have the software hit enter for me.
    Anyway, this is my problem can you help me out
    Derek.

    I just figured the problem out myself, by just guessing believe it or not.
    As follows :
    try
    Robot rob = new Robot():
    rob.keyPressed(VK_ENTER);
    catch(AWTException exception)
    exception.printStackTrace();
    It worked perfectly.

  • Position the cursor on an ENHANCEMENT statement .ED301

    Hello Folks ,
    I am changing an ENHANCEMENT and did a syntax check. the syntax check failed.
    Editting is now locked out and when I place the cursor on the Enhancement statement and go to Edit > Enhancement Operations > Change Enhancement.
    the "Position the cursor on an ENHANCEMENT statement" error statement appears even though the cursor was there.
    I tried to "UNDO" the Enhancement So that I could put the correct code in. But,the same syntax error appears even though the bad code is not on the screen.
    Has anyone else encountered this problem?

    Hi Harel Gilor,
    In that case you can delete/change that enhancement point by going to node Enhancements under your package name in SE80>Package>Enhacements.
    Thanks & Regards,
    Faheem.

  • Position the cursor in a JTextField

    Hi !
    I have an App with 10 JTextFields and I want to position the cursor from JTextField No.2 to JTextField No.8
    Is there a possibility to tell the program that the cursor have to go to an other Component ?
    Thank you. Wolfgang (KLD)

    You'll want to check out
    "grabFocus" in javax.swing.JComponent
    For some additional niceties you may want to check out
    "setFocusAccelerator" in javax.swing.text.JTextComponent
    It provides automated ways to jump around components.
    H

  • How position the cursor in selected screen field insted of defualt field

    Hi All,
    Can you pls let me know , how to position the cursor in selected selection-screen filed. My requirement is i have 3 selection-screen fields, By default cursor is positioned on field screen field, but i want the cursor to be positioned at 3rd screen field to enter input, i want to do this coz i am filling first 2 screen fields with default values, so i need to position the cursor at 3 rd screen filed. let me know if it is possible to achieve this.
    Thanks in advance.
    Regards
    Vishal

    You will need to point it to the LOW field.
    report zrich_0001.
    tables: reguh.
    select-options :
    s_bukrs for REGUH-ZBUKR default 'US10',
    s_laufd for REGUH-LAUFD default sy-datum,
    S_LAUFI FOR REGUH-LAUFI .
    at selection-screen output.
    <b>set cursor field 'S_LAUFI-LOW'.</b>
    Welcome to SDN!  PLease be sure to award points for helpful answer and mark you post as solved when solved completely.  Thanks.
    Regards,
    Rich Heilman

  • Lumia 800 - positioning the cursor

    Hello Lumia fans,
    while typing a text message - its very hard to position the cursor before or after a particular letter. instead it selects the whole word. its so annoying..
    and how to copy the entire text message in d sms??
    Solved!
    Go to Solution.

    Hello @maninred,
    -You can move the cursor in your text when it's blinking between the words by long-pressing it and then move your finger on the screen without lifting it.
    -You can copy the text by choosing the first letter and then slide your finger to the last word and then by pressing the white clipboard icon.
    -vvaino
    #SwitchToLumia

Maybe you are looking for

  • Where is my MemoPad??

    Hi!  I have synced all media files via Blackberry Desktop Software - all successful - but my MemoPad notes have cleared and i cannot find them anywhere on my Mac.  Any ideas where they would be, or how to restore them? The new notes I have added sinc

  • Help. My little friend won't start anymore.

    Started him today and there were just the powerled which gave me one blink all 5 secs., no chime but the fans and hdds are on. Also no video is avail. What could that mean? I pulled the ram and tested every single on in all of the four slots. Pushed

  • SMC broken after applying patches

    Running a freshly installed 11/06 build of solaris 10 x86, I don't have any issues with smc. Immediately after patching, installing all recommended and security patches, smc so longer starts up. bash-3.00# smc Warning: Cannot convert string "-monotyp

  • Creting flat file

    HI ALL, When creating flat file..in Excel sheet i have macintosh.csv,microsoft.csv and limited text.csv..which one i should select and save the falt file? Vijayalakshmi.Y

  • Mail - Auto capitalize first word in each sentence

    When composing a message in mail is there a way to turn on auto capitalization for the word beginning each sentence?