GetMenuLastClickedElement
A function added by the JIP NVSE Plugin.
Description
Returns a string_var indicating the last UI element clicked in any menu since the last time this command was called from the calling script.
A UI element can be represented in several ways, and the optional formatType parameter is intended for just this purpose. Accepted values:
0 Numeric <id> property (default) 1 Name 2 Full Path
The primary reason for this option is due to the fact that many click-able UI elements do not have a defined ID property, or have one that is not unique and is shared with other elements in the same menu. Element names, as well, are often shared by multiple elements (this is especially true with templates). Only the full path is guaranteed to be unique to every individual element.
Prefer using IDs (which are the fastest) where possible, then names, and if neither do the trick - use full paths (which are the slowest, but 100% reliable).
Syntax
(element:string_var) GetMenuLastClickedElement formatType:int
Example
let sLastElement := GetMenuLastClickedElement
let sLastElement := GetMenuLastClickedElement 2