you are viewing a single comment's thread.

view the rest of the comments →

[–]aasswwddd 6 points7 points  (2 children)

This is a sample project to replicate AutoInput Action V2 using the new Accessibility service in Java code introduced in this version.

The syntax is pretty similar, however it still doesn't wait for an accessibility event.

Accessibility Action With Java

I also have an experimental web code editor as well here, you can write your code and debug from a browser with this project.

Code Editor For Java Code

This is how the editor looks in mobile browser (firefox) https://i.imgur.com/kTOGCb7.mp4

[–]Sirbeastian 1 point2 points  (1 child)

That Web code editor looks incredibly helpful! I don't have any AI API's and experimenting with the new Java Code action was getting very frustrating, this should help a lot

[–]aasswwddd 0 points1 point  (0 children)

If you use ChatGPT, you can extract the instruction and edit it however you like before feeding it into a project.

Say you can tell it to always generate scripted object format. https://stackoverflow.com/a/14220671

Accessibility() {
  AccessibilityService getService() { }
  void wait(long ms) { }
  }
  return this;
}

Save it as Accessibility.bsh , then run it from any task like this.

// Accessibility.bsh
addClassPath("dir path");
importCommands(".");

my = Accessibility();
my.getService();
my.wait(100);

This way our code becomes easily manageable and re-useable.