WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   small lua question (https://www.wowinterface.com/forums/showthread.php?t=28648)

doc309 11-21-09 10:05 AM

small lua question
 
is there a way to get this line

Stat:SetScript("OnMouseDown", function() OpenAllBags() end)

to "press" the keybind b.

i'm new to this so forgive the ignorance:)

i'm trying to add a bag addon to a great UI, and when i click that area, i get the default blizz bags showing not the addons bags.

thanks

Doc

Xrystal 11-21-09 10:16 AM

Nope, as far as I am aware you cannot automate pressing a key or mouse button only react to them being pressed.

I suspect you will have to find out the name of the addons bag frame and then show it instead. Perhaps mentioning the addon itself will help us assist you.

Folji 11-21-09 10:21 AM

I'm not a LUA coder myself, but even if it was possible to make a script that makes the UI think a certain key is being pressed, you'd still just be wasting time and effort since you're essentially looping through needless stuff. :p

Depending on the bag AddOn in question, you should be able to figure out what function makes it's bag GUI open up. Then you can use that function instead of Blizzard's OpenAllBags()

doc309 11-21-09 10:32 AM

thanks that was the key...

i figured it out, looked in the addons lua and noticed a setting i missed
:banana::banana::banana::banana:

Doc


All times are GMT -6. The time now is 08:38 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI