View Full Version : Scripting
LordHazard
12-23-2005, 09:24
This is probably a no, but is it possible trigger a scroll from a script running in the background? I've looked through the docudomen files but can't find anything.
Well, you can open a few scrolls by pressing their buttons with a script, e.g. the faction summary scroll or the building scroll, but you can't open a specific scroll with a simple command.
The_Mark
12-23-2005, 19:47
Simulating mouse clicks on the correct buttons should work. Specifically these commands:
Identifier: simulate_mouse_click
Parameters: [lclick_down|lclick_up|rclick_down|rclick_up|ldbl_c lick]
Description: Acts as if the given mouse event had happened on the currently 'selected' ui_element (see 'select_element' command)
Sample use: select_element hud_show_buildings_tab
simulate_mouse_click lclick_down
Class: SIMULATE_MOUSE_CLICK
Implemented: Yes
Author: Tom
---------------------------------------------------
Identifier: select_ui_element
Parameters: element id (see available_ui_element_ids.txt for appropriate identifiers)
Description: Use in conjunction with simulate mouse click to store the element that will next recieve the simulated mouse click
Sample use: select_element hud_show_buildings_tab
simulate_mouse_click lclick_down
Class: SELECT_ELEMENT
Implemented: Yes
Author: Tom
Though, as alpaca said, this only works for a few specific scrolls.
LordHazard
12-23-2005, 21:05
Ok, thanks anyway.
vBulletin® v3.7.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.