Zebrina Posted November 20, 2015 Share Posted November 20, 2015 Hi, I'm working on a simple hotkey mod and would like to know the form which has mouse focus in either the inventory or favorites menu (havn't decided yet). I think I have found the variable I need to access in the SkyUI actionscript source, which is (I think) "inventoryLists.itemList.selectedEntry" in ItemMenu.as. I figured I could get it as an int (formid?) and then convert it to a form, but I'm not sure how to use UI.GetInt("InventoryMenu", "<what should be here?>"). Relevant source files:InventoryMenu.asItemMenu.as - Inherited by InventoryMenuInventoryLists.as - Used by ItemMenuTabularList.as - Used by InventoryListsScrollingList.as - Inherited by TabularListBasicList.as - Inherited by ScrollingListBSList.as - Inherited by BasicList Any help is appreciated. Thank you for your time! /Sabrina Link to comment Share on other sites More sharing options...
cdcooley Posted November 21, 2015 Share Posted November 21, 2015 Form item = Game.GetFormEx(UI.GetInt("InventoryMenu", "_root.Menu_mc.inventoryLists.itemList.selectedEntry.formId")) That should work to get you the right base FormID value for the item. (I know that's the right path for the ContainerMenu and I'm fairly sure it works on the Inventory menu too.) You need the SKSE GetFormEx() function to convert the number into a proper formID because the game's original GetForm fails for any formID values that end up being represented as negative integers. Link to comment Share on other sites More sharing options...
Zebrina Posted November 21, 2015 Author Share Posted November 21, 2015 It works perfectly, thank you so much! Link to comment Share on other sites More sharing options...
Recommended Posts