View Single Post
10-16-22, 06:35 PM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Originally Posted by mooman219 View Post
Hello,

I'm looking to setup a script at load time to do the following:
Code:
local button = _G["BT4Button73"]
local action = GetAction(button)
if (action == "spell or item") then
  print("/use [@mouseover]%s", spell/item name)
end
I'm still reading into lua syntax, and trying to catch up on wowpedia.fandom.com/wiki/ for the API docs.
There's a couple issues with your code but before I get into those I'm going to jump to the end and say that even if you properly got what's on that Bartender4 button you can't call protected actions like that.

Can't simply run a /use or /cast as a script from addons.
  Reply With Quote