Latest Posts

Topic: Autoclicking

palino
Avatar
Topic Opener
Joined: 2022-12-19, 08:06
Posts: 15
OS: Windows 11
Version: master
Ranking
Pry about Widelands
Posted at: 2024-04-30, 15:43

Do you have any internal or external tool, which is capable of autoclicking through widelands tutorials? This means script which will click to the game instead of human. I want to prepare such automatic tool/script for passing through 4th tutorial, to easily reproduce https://codeberg.org/wl/widelands/issues/4804

From external tools - this seems to be capable of it, but works only under windows: https://www.autohotkey.com/


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 2546
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2024-04-30, 18:04

You can do that with a lua script. E.g. the first tutorials do some automatic clicks.

You can start a script either by using the commandline parameter --script=path/to/lua_script (see the commandline help) or by using a debug build and opening the lua script console by pressing SHIFT + CTRL/STRG + SPACE. In this console you can run any lua script by entering dofile("complete/path/to/lua_Script").


Top Quote
tothxa
Avatar
Joined: 2021-03-24, 12:44
Posts: 482
OS: antix / Debian
Version: some new PR I'm testing
Ranking
Tribe Member
Posted at: 2024-04-30, 20:48

kaputtnik wrote:

You can do that with a lua script. E.g. the first tutorials do some automatic clicks.

Except for modal windows. Lua code cannot run while a modal dialog is open, not even the new plugin timers.

I'm working on a PR that automates the creation of compatibility test saves, and I implemented a commandline option for it that allows setting a timeout for automatically closing modal dialogs.


Top Quote