Page 2 of 2

Posted: 16 Dec 2005 20:30
by egladil
I can now say that it is indeed doable. I got a small "tutorial" working here. It clicks the network game button, clicks the player name field, and types some text.

A tutorial is a sequence of action. Possible actions are:
* Move mouse
* Click mouse
* Left mouse down
* Left mouse up
* Type text
For each action a target and a delay can be set. The delay is the number of game cycles to wait until the target is started. Target is specified in the format "window: window_name widgetid: id coord: x, y".
As for percentages, I could add those too.

Posted: 16 Dec 2005 20:35
by Bjarni
egladil wrote:As for percentages, I could add those too.
I don't think those will be needed. We just use absolute x,y compared to the top left corner and moves the top bar to the left. That way it will all happen in the top left area if you select a huge screen, but it will show on all monitors (except the PDAs that got less than 640x480, but those aren't officially supported anyway)

Posted: 16 Dec 2005 20:43
by MeusH
egladil wrote:I got a small "tutorial" working here. It moves the mouse to (5, 5) and clicks.
That's great! Are you uploading the file right now, or did I understand you wrong?

Posted: 16 Dec 2005 21:12
by Pilatus
This sound simply great!

:D

Posted: 17 Dec 2005 00:37
by egladil
It would be very nice to hear what functionality the people who are thinking about making some tutorials want.
Is it enough with just clicking, moving the mouse and typing? Or do you want something more advanced?

Posted: 17 Dec 2005 09:02
by KING
how to build a nuke :twisted:



I think we need starter vidoes like how you build a track from A to B and put a train on it for newcomers.
same for road air and sea.
I noticed A LOT of people don`t use the "transfew" to it`s full use.
mayby one for that.

Posted: 17 Dec 2005 09:30
by MeusH
When dynamic news will be done, it would be also good to use them in tutorials. Right-clicking, shift-clicking and ctrl-clicking should be done, too.

Very good thing would be also information on the bottom panel. Currently summarized news scroll down there, but it would be also good if information "what do we do now" was showed there.

Posted: 17 Dec 2005 13:50
by Brianetta
How will the demo cope with different resolutions or menu positions? If it's only doing mouse clicks, not button events, there could be trouble.

Posted: 17 Dec 2005 16:47
by egladil
The coordinates can be specified relative to the screen, to a window or a widget in a window, so that is not a problem.

Posted: 17 Dec 2005 18:58
by MeusH
So... can one set mouse to go to "button 2 of rail construction window"? And the mouse will patiently move there?

Posted: 17 Dec 2005 23:35
by egladil
Yes. Button two in the build rail window is widget 5, so that would look like this:

Code: Select all

mouse_move   "window: build_toolbar widget: 5"   0
or

Code: Select all

mouse_move   "window: build_toolbar widget: 5 center"   0
if you want to move to the middle of the button.
The zero in the end is how long (in game cycles) after the last action this should be done.
I've looked at naming the buttons, but as there is 1405 widgets in openttd that is quite a task.