Topic
  • 2 replies
  • Latest Post - ‏2013-09-11T01:05:27Z by TonyNGAN
TonyNGAN
TonyNGAN
34 Posts

Pinned topic Move Mouse Position By Script

‏2013-09-10T11:55:09Z |

Dear All,

I am writing a script which need to perform some clicks and movement on a webpage.

I can record a script to do some clicks but may I know how can I move the mouse cursor position?

I've tried the following script but the cursor did not move.

mouseMove(atPoint(100,100))

May I ask for your kindly help?

Many Thanks!

Best Regards

Tony

  • Y5QY_gerben_delange
    Y5QY_gerben_delange
    34 Posts
    ACCEPTED ANSWER

    Re: Move Mouse Position By Script

    ‏2013-09-10T13:40:50Z  

    Hi,

    This is one option. I would'n recommend using static coordinates in your scripts though;

     

    try{

     java.awt.Robot r =  newjava.awt.Robot();

     r.mouseMove(0, 0);

    } catch(AWTException e) {

             // TODOAuto-generated catch block

         e.printStackTrace();

    }

     

    good luck,

     

    g

  • Y5QY_gerben_delange
    Y5QY_gerben_delange
    34 Posts

    Re: Move Mouse Position By Script

    ‏2013-09-10T13:40:50Z  

    Hi,

    This is one option. I would'n recommend using static coordinates in your scripts though;

     

    try{

     java.awt.Robot r =  newjava.awt.Robot();

     r.mouseMove(0, 0);

    } catch(AWTException e) {

             // TODOAuto-generated catch block

         e.printStackTrace();

    }

     

    good luck,

     

    g

  • TonyNGAN
    TonyNGAN
    34 Posts

    Re: Move Mouse Position By Script

    ‏2013-09-11T01:05:27Z  

    Hi,

    This is one option. I would'n recommend using static coordinates in your scripts though;

     

    try{

     java.awt.Robot r =  newjava.awt.Robot();

     r.mouseMove(0, 0);

    } catch(AWTException e) {

             // TODOAuto-generated catch block

         e.printStackTrace();

    }

     

    good luck,

     

    g

    Woo! It works! 

    Thanks a lot g!

    Regards

    Tony