We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Export an application using Robot java class
Page Index Toggle Pages: 1
Export an application using Robot java class (Read 809 times)
Export an application using Robot java class
Sep 22nd, 2007, 12:03pm
 
I have written a sketch in processing which uses the Robot class to move the mouse to specific locations on the screen. It works perfectly when it is run within processing, however when I try to export it as an application, I get the following error sent back to me:

E:/Processing Sketches/Robot/application.windows/Robot.java:26:5:26:30: Semantic Error: No applicable overload for a method with signature "mouseMove(int, int)" was found in type "java.awt.Component". Perhaps you wanted the overloaded version "boolean mouseMove(java.awt.Event $1, int $2, int $3);" instead?

processing.app.RunnerException: Perhaps you wanted the overloaded version "boolean mouseMove(java.awt.Event $1, int $2, int $3);" instead?
at processing.app.Compiler.message(Compiler.java:339)
at processing.app.MessageSiphon.run(MessageSiphon.java:60)
at java.lang.Thread.run(Unknown Source)

I have read that it may be something to do with the fact that I haven't got a main() function added, however I am not experienced in java so I wouldn't know how to make one! If anyone knows of any way I can get this to export properly, I would be very appreciative.

Martin
Re: Export an application using Robot java class
Reply #1 - Sep 22nd, 2007, 6:56pm
 
Don't worry about it, I found the solution! If anyone was interested, you have to direct the new robot command to the robot class, ie.

java.awt.Robot robot = new java.awt.Robot();

This will allow processing to export as an application. Hope this helps anyone that needs it!
Page Index Toggle Pages: 1