repeats / Repeat

Cross-platform mouse/keyboard record/replay and automation hotkeys/macros creation, and more advanced automation features.
Apache License 2.0
1.05k stars 78 forks source link

Can't compile recorded task #3

Closed ghost closed 8 years ago

ghost commented 8 years ago

I am trying to record a simple 3 seconds mouse moving task, but it is just not working. Steps to reproduce the problem:

  1. I ran the jar as root( is it correct way?)
  2. I set up the JDK path, it looks like this: http://imgur.com/a/Ru9I4
  3. I record the mouse moving
  4. I generate the code using CTRL-M
  5. I get this error output: http://pastebin.com/5NXzxEAu

My system: Ubuntu 16.04 LTS

Java version:

java -version java version "1.8.0_101" Java(TM) SE Runtime Environment (build 1.8.0_101-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

hptruong93 commented 8 years ago

I haven't been updating the code generation part. I'll try to have it fixed this weekend. However, you can always replay the recorded action by pressing the play button after recording. Let me know if you have any problem with that.

azariel commented 8 years ago

I have the same issue, my guess is that the Generate Source button is generating code outside of action function and if referencing directly to controller functions (which are not statics) As a workaround, you can copy the generated code that looks like

controller.blockingWait(5);
controller.mouse().move(-1,1);

and, inside of action function, change it to

c.blockingWait(5);
c.mouse().move(-1,1);

here a working Example

would have used a pastebin, but the copy paste seems to crash somehow ; )

ghost commented 8 years ago

Thank you both for replying.

@hptruong93 No, I don't have problems with replaying recorded task. That is working very fine.

And yes thank you @azariel I will try that.

hptruong93 commented 8 years ago

Fixed with 251834e4af598bb8a877871337e7ad05d27d7f22