WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   set trade amount with macro (https://www.wowinterface.com/forums/showthread.php?t=52962)

Sherezaada 12-08-15 06:41 AM

set trade amount with macro
 
I need to set trade amount with a macro, can be done?

With this I got the name of the frame I need to modify:

Code:

/run local f = GetMouseFocus(); if f then DEFAULT_CHAT_FRAME:AddMessage(f:GetName()) end
TradePlayerInputMoneyFrameGold


Now I have this macro:
Code:

/tar [PLAYERNAMEHERE]
/trade
/select TradePlayerInputMoneyFrameGold #whattheheck, doesnt work...
#/click TradePlayerInputMoneyFrameGold doesn't work...


Could you helpme?

SDPhantom 12-08-15 12:00 PM

I don't think there is a /select command.
/click only works on buttons and is to securely execute Lua onclick handlers.



If you're looking to select the editbox to type in a value, you need to call a Lua method to activate it.
Code:

/run TradePlayerInputMoneyFrameGold:SetFocus()


To have the macro set a value, you can use this. This example sends 1 gold. (10000 copper)
The editbox does not need to be "selected" in order for this to work.
Code:

/run MoneyInputFrame_SetCopper(TradePlayerInputMoneyFrame, 10000)

Sherezaada 12-10-15 07:17 PM

Omg!! Thanks a lot It worked!!!!

Code:

/tar [NameplayerHere]
/trade
/run MoneyInputFrame_SetCopper(TradePlayerInputMoneyFrame, 10000000)

Can I use now the /click function to click acept, right?

SDPhantom 12-10-15 08:45 PM

I think so, though I've had the trade window cancel the accept from lag and make you click it again. That might prevent this kind of macro from auto accepting 100%.

Sherezaada 12-11-15 03:04 PM

Just as you told to me! I must click 2 times, or make 2 macros. Thanks a lot for the help!


All times are GMT -6. The time now is 01:27 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI