You can easily create spell/item icons in WeakAuras using this library.
# WeakAuras is required #
!Import this WeakAuras string as well.
[WotLK] https://wago.io/20UyZ2uQQ
[DF] https://wago.io/m2CVYCDmy
#Save the macro below and you will be able to easily find the action button ID.
/run local mf = GetMouseFocus(); if mf then local af =_G[mf:GetName()]; if af then print("\124cFF77AAFFActionID\124r:\124cFFFF3355[" ,af.action or "0","]\124r") end end
#ElvUI
/run local mf = GetMouseFocus(); if mf then local af =_G[mf:GetName()]; if af then print("\124cFF77AAFFActionID\124r:\124cFFFF3355[" ,af._state_action or "0","]\124r") end end