Latest Posts

Topic: Autoclicking

palino
Avatar
Topic Opener
Joined: 2022-12-19, 07:06
Posts: 14
OS: Windows 10
Version: master
Ranking
Pry about Widelands
Posted at: 2024-04-30, 14: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, 19:48
Posts: 2453
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2024-04-30, 17: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").


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
tothxa
Avatar
Joined: 2021-03-24, 11:44
Posts: 448
OS: antix / Debian
Version: some new PR I'm testing
Ranking
Tribe Member
Posted at: 2024-04-30, 19: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