Latest Posts

Topic: Autoclicking

Topic Opener
Joined: 2022-12-19, 07:06
Posts: 14
OS: Windows 10
Version: master
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

From external tools - this seems to be capable of it, but works only under windows:

Top Quote
Joined: 2013-02-18, 19:48
Posts: 2480
OS: Archlinux
Version: current master
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:

Top Quote
Joined: 2021-03-24, 11:44
Posts: 452
OS: antix / Debian
Version: some new PR I'm testing
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