Page 1 of 1

[Macro] or [Addon] - Disenchanting automatic

PostPosted: Wed Jan 06, 2016 11:21 pm
by philip2206
Hey guys and girls

Since my main gold income comes from disenchanting stuff to sell on the AH, i've been wondering about a macro nor maybe an addon, that will make life easier, when it comes to disenchanting. Does such a thing exist in vanilla?

I used to (on retail wow; MoP and WoD) to have a macro for DE - looked like this;

/use Disenchant
/use "insert Item" - just without the (").

I have tried for a long time to use all kind of commands, scripts and addons like SuperMacro, but with no luck.

Any ideas? Thanks.

Re: [Macro] or [Addon] - Disenchanting automatic

PostPosted: Thu Jan 07, 2016 12:33 am
by SSJSketch
Both are options are possible, but it just depends on how easy you want to make disenchanting.

A simple macro that would try to disenchant anything in Bag 0 (Backpack), Slot 1.
Code: Select all
/cast Disenchant
/run ContainerFrame1Item16:Click()


..or make an addon that makes it a simple slash command, when used.. searches through all your bags for the first instance of that item name and then try's to disenchant it.

Re: [Macro] or [Addon] - Disenchanting automatic

PostPosted: Thu Jan 07, 2016 11:13 am
by philip2206
So you just have to write which slot the specific item is in?

Re: [Macro] or [Addon] - Disenchanting automatic

PostPosted: Thu Jan 07, 2016 4:45 pm
by SSJSketch
philip2206 wrote:So you just have to write which slot the specific item is in?

For macros. yes.

Not sure if you could fit all of the "searching" functionality in a 255 character macro.

Re: [Macro] or [Addon] - Disenchanting automatic

PostPosted: Sun Jan 10, 2016 10:01 pm
by SSJSketch
Just randomly had a thought about my original posts.. and a simple macro idea popped into my head.

You can just use a mouse over type of macro..
Code: Select all
/run SpellStopTargeting(); local f=GetMouseFocus(); if strfind(tostring(f:GetName()), 'ContainerFrame') then CastSpellByName('Disenchant'); f:Click(); end SpellStopTargeting(); ClearCursor();


Just mouse over the item you want to disenchant (in your bags only) and run the macro.

Re: [Macro] or [Addon] - Disenchanting automatic

PostPosted: Mon Jan 11, 2016 2:53 pm
by jakeadams
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' "?

Re: [Macro] or [Addon] - Disenchanting automatic

PostPosted: Mon Jan 11, 2016 5:39 pm
by SSJSketch
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();

Re: [Macro] or [Addon] - Disenchanting automatic

PostPosted: Mon Jan 11, 2016 7:19 pm
by jakeadams
Thanks alot mate!
That totally made it work. The frame was indeed called Bagnon, so I used the one with if.