[Macro] or [Addon] - Disenchanting automatic

[Macro] or [Addon] - Disenchanting automatic

by philip2206 » Wed Jan 06, 2016 11:21 pm

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.
philip2206
Tester
 

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

by SSJSketch » Thu Jan 07, 2016 12:33 am

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.
modui_ified
-----------------------------------------------------------------
"Success is buried in a garden of failure."
User avatar
SSJSketch
Grunt
Grunt
 

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

by philip2206 » Thu Jan 07, 2016 11:13 am

So you just have to write which slot the specific item is in?
philip2206
Tester
 

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

by SSJSketch » Thu Jan 07, 2016 4:45 pm

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.
modui_ified
-----------------------------------------------------------------
"Success is buried in a garden of failure."
User avatar
SSJSketch
Grunt
Grunt
 

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

by SSJSketch » Sun Jan 10, 2016 10:01 pm

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.
modui_ified
-----------------------------------------------------------------
"Success is buried in a garden of failure."
User avatar
SSJSketch
Grunt
Grunt
 

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

by jakeadams » Mon Jan 11, 2016 2:53 pm

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' "?
User avatar
jakeadams
Sergeant
Sergeant
 

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

by SSJSketch » Mon Jan 11, 2016 5:39 pm

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();
Last edited by SSJSketch on Mon Jan 11, 2016 7:50 pm, edited 1 time in total.
modui_ified
-----------------------------------------------------------------
"Success is buried in a garden of failure."
User avatar
SSJSketch
Grunt
Grunt
 

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

by jakeadams » Mon Jan 11, 2016 7:19 pm

Thanks alot mate!
That totally made it work. The frame was indeed called Bagnon, so I used the one with if.
User avatar
jakeadams
Sergeant
Sergeant
 


Return to Addons & macros