Thread Tools Display Modes
11-21-09, 10:05 AM   #1
doc309
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 122
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
  Reply With Quote
11-21-09, 10:16 AM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
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.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
11-21-09, 10:21 AM   #3
Folji
A Flamescale Wyrmkin
 
Folji's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 136
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.

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()
  Reply With Quote
11-21-09, 10:32 AM   #4
doc309
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 122
thanks that was the key...

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


Doc
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » small lua question


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off