Xmacro - keys & mouse automatiseren

Windows, Android, iOS, Linux, Chrome OS, ...
Plaats reactie
maxke
Starter
Starter
Berichten: 20
Lid geworden op: 15 apr 2004, 10:19

Hallo ,


Ik heb hier een windows xp client staan die ik graag volledig zou overhaulen met een linux counterpart.

Er draaide
-ABC (bittorent)
-Mozilla (autosurf)
-Ncron Lite (windows equivalent cron - tasksheduling)
-Gmouse (mouse mover - inloggen van autosurf)

Wat mij gelukt is :
-Mandrake 10
-Java
-Azareus (linux bittorent client draaiende op java)
-Cron

Het enige wat ik nodig heb om de transistie te volmaken is een mouse mover voor KDE oftwel voor het xfree window manager systeem. (Hier kan ik terminologie fouten gemaakt hebben)

Een mogelijke oplossing is "Xmacro". Deze heb ik proberen te installen maar na een configure en make ging hij niet verder omdat het aan X??.h header files e.d. ontbrak. Erbij is wel te vermelden dat deze oplossing niet zo recent qua laatste update (2001) en dat de Xomgeving waarschijnlijk al helemaal gevolueerd is waardoor Xmacro niet meer compatibel is.


Kent u mouse mover/macro software voor het linux gebeuren ? Of hoe ik rechtstreeks een muis beweging en een paar kliks kan automatiseren ?
= inloggen (dus op een form button klikken) en dan nog een andere link volgen.

Met dank bij voorbaat !!



Groeten
maxke
Starter
Starter
Berichten: 20
Lid geworden op: 15 apr 2004, 10:19

Ook al heeft niemand behoefte aan zo'n applicatie mijn zoektocht is verder gegaan :

Met behulp van java zou je met de robot ?class? positie in mouse events kunnen doorsturen. Dus wil je zelf je pointer programmeren dan kan ik u zeggen dat het met java mogelijk zou moeten zijn. Andere programmeertalen zijn oftewel niet cross-platform of daar vond ik dan toch geen informatie over.

Anyway , ziehier een voorbeeld dat ik gevonden heb :

try {
Robot robot = new Robot();

// Simulate a mouse click
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);

// Simulate a key press
robot.keyPress(KeyEvent.VK_A);
robot.keyRelease(KeyEvent.VK_A);
} catch (AWTException e) {
}

Groeten
maxke
Starter
Starter
Berichten: 20
Lid geworden op: 15 apr 2004, 10:19

Found it !!

Excellent stukje code waarmee je alle mousecommands kan doen die je maar wil..

Je moet wel de java SDK installeren en de code "prepareren"


Code: Selecteer alles

/*File Robot04.java
Copyright 2003 R.G.Baldwin

This program illustrates the low-level nature of
the behavior of an object of the Robot class by
programming a Robot object to click the Close
button of a non-Java program (such as Internet
Explorer) and causing that program to terminate.

This program should work without modification if
you are running WinXP with 1024 by 768 screen
resolution.  If you are running under a different
OS, or a different screen resolution, you may
need to modify the coordinate values in the
program.

To see the desired behavior of this program,
start Internet Explorer, (or some other program)
and maximize it to full-screen mode.  This should
cause the Close button with the X for that
program to appear in the upper right-hand corner
of the screen.

Then run this program.  If all goes well, this
program will use an object of the Robot class
to position the mouse pointer over the Close
button of the other program and then click that
button.  The result will be the standard result
of clicking the Close button on that program.
Frequently, the standard result of clicking the
Close button is to terminate the program.

If you don't get this result, try adjusting the
coordinate values in the program to make certain
that the mouse pointer is automatically
positioned on the Close button before the mouse
click is executed.  Delays are inserted so that
you can view the process in slow motion.

Tested using SDK 1.4.1 under WinXP
************************************************/

import java.awt.*;
import java.awt.event.*;

public class Robot04{
  public static void main(String[] args)
                             throws AWTException{
    Robot robot = new Robot();
    //You may need to modify these coordinates if
    // they fail to place the mouse pointer on
    // the Close button of the non-Java program
    // that you are trying to terminate.
    robot.mouseMove(1005,10);

    //Press and then release the left mouse
    // button.  The delays are provided so that
    // you can view the action.  Watch the upper-
    // right corner of the screen when you run
    // this program.
    robot.delay(2000);
    robot.mousePress(InputEvent.BUTTON1_MASK);
    robot.delay(2000);
    robot.mouseRelease(InputEvent.BUTTON1_MASK);
  }//end main
  //-------------------------------------------//

}//end class Robot04




Maar soit ;

Sorry dat ik jullie lastig heb gevallen.
Als er nu iemand is en die zoekt hetzelfde te doen , follow the leader !

Greets
Plaats reactie

Terug naar “Software en apps”