View Single Post
11-21-22, 06:04 PM   #2
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Okay after a bit more investigating I have this:

Lua Code:
  1. GameMenuButtonSettings;Click("RightButton")  -- open game menu
  2. SettingsPanel.GameTab:Click("RightButton") -- click the game tab
Then from there, I have to loop through the category list:
Lua Code:
  1. for k, v in pairs(SettingsPanel.CategoryList) do  
  2.    print(k, v)  
  3. end
The keybindings button is the 7th element;
Lua Code:
  1. for k, v in pairs(SettingsPanel.CategoryList.elementList) do
  2.    for a, b in pairs(v) do
  3.       if k == 7 then        
  4.          print(k, a, b)    
  5.          if a == "data" then
  6.             print("FOUND", k, a, b)            
  7.          end
  8.       end
  9.    end
  10. end
The problem is that getting to the 7th element is wrong as I have to manually count the elements rather than reading each element.
Then from there, I need to identify the current element as a button then read that button text and from there I need to click the keybinding button.

Now that I am a bit closer to my goal I have hit a wall and am floundering once again.
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote