Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Move cursor in the desktop and click in fedora

Posted on 2004-10-26
8
Medium Priority
?
203 Views
Last Modified: 2010-03-31
Can you give me idea on how to control/control the mouse. I have application to choose in the desktop and then click.
thanks for you help.
0
Comment
Question by:randylPalomo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 12413976
See java.awt.Robot
0
 
LVL 92

Expert Comment

by:objects
ID: 12416625
Robot r = new Robot();
r.mouseMove(100, 100);
r.mousePress(0);
r.mouseRelease(0);

0
 
LVL 9

Expert Comment

by:DrWarezz
ID: 12419579
It's easy to move the pointer, but you'll need to use JNI to simulate a 'click' of the mouse (and won't be easy) - [AFAIK].

Moving the cursor: http://www.javaalmanac.com/egs/java.awt/MoveMouse.html

JNI tutorial: http://java.sun.com/docs/books/tutorial/native1.1/

Best of luck,
[r.D]
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 9

Expert Comment

by:DrWarezz
ID: 12419587
>"Robot r = new Robot();
   r.mouseMove(100, 100);
   r.mousePress(0);
   r.mouseRelease(0);"

Can't the mouse click only be done using java (without JNI) on your own application? I didn't know that it could be used anywhere on the screen .... ?

[r.D]
0
 
LVL 92

Expert Comment

by:objects
ID: 12419643
0
 

Author Comment

by:randylPalomo
ID: 12435464
Thanks guys, sorry for I just now replied, internet problem. anyway I got it when CEHJ send the idea. but my problem now is when im set in the crontab. I made a testing, it copy a file but when I run the java program it won't work.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12435991
:-)

What do you mean by 'it won't work'?
0
 

Author Comment

by:randylPalomo
ID: 12556884
hello,
   I tried to run automatically at given time in my computer "linux" without using any timer program in java. So I set-up the crontab, call a script that run the java program but it didn't work. I ran the script indipendently and it works. So I test my crontab if its work, I add a new crontab that will call a script and the script will only copy a file in other directory. And it work, but the script that call java it will not work. Anyway I just did the timer program but untill now I still don' t why my first option did not work "Calling a script that runs java  program and assign in the crontab".
thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question