jakeadams wrote:Could you look the the code again? Because I am really interested in this but I can't get it to work. I use Bagnon for my bag, would that interfer with the " 'ContainerFrame' "?
The way I made it was for default ui, as bagnon uses its own frames. You just simply need to change it to what bagnon frames use.
Just mouse over a slot in the bags and type
- Code: Select all
/run DEFAULT_CHAT_FRAME:AddMessage(GetMouseFocus():GetName())
..In this case.. you get something along the lines of 'BagnonItem19' or so.
So just replace 'ContainerFrame' with 'Bagnon',
- Code: Select all
/run SpellStopTargeting(); local f=GetMouseFocus(); if strfind(tostring(f:GetName()), 'Bagnon') then CastSpellByName('Disenchant'); f:Click(); end SpellStopTargeting(); ClearCursor();
or just simply remove the if statement which will allow it to be used in any frame which might cause unforeseen issues. (Will cause errors to appear on non-clickable/non-existent frames),
- Code: Select all
/run SpellStopTargeting(); local f=GetMouseFocus(); CastSpellByName('Disenchant'); f:Click(); SpellStopTargeting(); ClearCursor();