PDA

View Full Version : What UI element should I select to exit the Battle Results screen?



mrtwisties
11-29-2007, 14:42
I'm still working on the same project I posted earlier (https://forums.totalwar.org/vb/showthread.php?t=95802), but now I have a different question so I've created a different post. I hope that's okay.

Here's the situation:
1. When you auto-resolve a land or sea battle, a battle results screen comes up.
2. I'd like to use a script to automatically get rid of this results screen.
3. Here is the code I'm using (unsuccessfully):



declare_counter DismissScroll
set_counter DismissScroll 0

monitor_event ScrollOpened ConditionTrue
set_counter DismissScroll 1
end_monitor

monitor_conditions I_CompareCounter DismissScroll = 1
set_counter DismissScroll 0
select_ui_element confirm_quit_scroll
simulate_mouse_click lclick_down
simulate_mouse_click lclick_up
end_monitor


Here are the questions:
Q1. Is this the right monitoring code? When I try and test with puppify_my_love, the puppies appear straightaway.
Q2. What UI element should I select to exit the Battle Results screen?

Red Spot
11-29-2007, 15:50
could you explain me what these 2 commands do;

simulate_mouse_click lclick_down
simulate_mouse_click lclick_up


I mean seperatly from one an other .... :inquisitive:


G

Myrddraal
12-07-2007, 01:25
They:
Simulate the action of pressing the mouse left button down
Simulate the action of then lifting the left mouse button

mrtwisties
12-07-2007, 03:05
There isn't a simulate_key_press command, is there?

Myrddraal
12-10-2007, 05:53
Have you tried calling a shortcut? You can do that with a script, and there are shortcuts to almost all the scrolls.

mrtwisties
12-10-2007, 07:34
I've tried pretty much every shortcut that looks like it might refer to a button or a continue function. I've only been working off the descr_shortcuts.txt file, though, so if there are more out there then that could be handy. But unless my search skills are particularly woeful, that's all there is.

mrtwisties
12-10-2007, 07:34
When I get a chance, I'm going to try using the names of keys in place of the name for a shortcut. Just for kicks.