Fate-Grand-Order_Lua icon indicating copy to clipboard operation
Fate-Grand-Order_Lua copied to clipboard

Script cannot run with AccessibilityService

Open MrTroika opened this issue 4 years ago • 9 comments

https://imgur.com/a/LGcfEnC

Not sure what could be causing this; accessability is enabled.

MrTroika avatar Apr 24 '20 20:04 MrTroika

The script is currently incompatible with accessibility mode, it seems. Can you try daemon or root mode? See the installation page in the documentation.

reconman avatar Apr 24 '20 20:04 reconman

Not an option, unfortunately; I use Bluestacks and I don't think there's a way to choose your android version in that.

MrTroika avatar Apr 24 '20 21:04 MrTroika

Further information: this issue appears to happen when the script has to drag the friends list to find a particular Servant.

MrTroika avatar Apr 24 '20 21:04 MrTroika

See https://ankulua.boards.net/thread/628/daemon-bluestacks. It should work, but I haven't tried it myself.

reconman avatar Apr 24 '20 21:04 reconman

See https://ankulua.boards.net/thread/628/daemon-bluestacks. It should work, but I haven't tried it myself.

That thread is 3 years old and the method described therein doesn't work.

To clarify on this, there is currently no way to root Bluestacks and thus daemon can't be installed.

MrTroika avatar Apr 25 '20 01:04 MrTroika

You don't need root to install the daemon, you only need USB debugging, which should be activatable in Bluestacks, I assume.

reconman avatar Apr 25 '20 06:04 reconman

The USB debug method does not work for installing the daemon, at least not for me. Despite all indications that it's functional on the Windows end, it won't actually install itself and be activateable in Bluestacks.

MrTroika avatar Apr 25 '20 06:04 MrTroika

Support option preferred won't work without manualTouch support. Change to first or manual or use Nox with daemon instead of Bluestacks.

Edit: Actually, accessibility mode is supported on higher Android versions. I used it before rooting my phone and it worked great. I don't know if it's possible to use 8.0+ on Bluestacks, but you could try it, if it's available.

potchy avatar Apr 26 '20 15:04 potchy

For Android 7 you can use swipe instead of manualTouch With accessibility, manualTouch only works on Android 8+, swipe works on Android 7+.

https://github.com/29988122/Fate-Grand-Order_Lua/blob/b16689e71b90f5dfdc173cf20cf2e9fc7f094c7a/modules/support.lua#L171-L181

Try changing to:

swipe(game.SUPPORT_SWIPE_START_CLICK, game.SUPPORT_SWIPE_END_CLICK)

It might not work as smoothly as manualTouch though. You might want to adjust game.SUPPORT_SWIPE_END_CLICK if you find that it scrolls too much.

https://github.com/29988122/Fate-Grand-Order_Lua/blob/b16689e71b90f5dfdc173cf20cf2e9fc7f094c7a/modules/game.lua#L64

This works for me:

game.SUPPORT_SWIPE_END_CLICK = Location(5, 660)

MathewSachin avatar May 16 '20 08:05 MathewSachin