Thread Tools Display Modes
12-08-15, 06:41 AM   #1
Sherezaada
A Defias Bandit
Join Date: Dec 2015
Posts: 3
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?

Last edited by Sherezaada : 12-08-15 at 06:44 AM.
  Reply With Quote
12-08-15, 12:00 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,323
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)
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 12-08-15 at 12:05 PM.
  Reply With Quote
12-10-15, 07:17 PM   #3
Sherezaada
A Defias Bandit
Join Date: Dec 2015
Posts: 3
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?
  Reply With Quote
12-10-15, 08:45 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,323
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%.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
12-11-15, 03:04 PM   #5
Sherezaada
A Defias Bandit
Join Date: Dec 2015
Posts: 3
Just as you told to me! I must click 2 times, or make 2 macros. Thanks a lot for the help!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » set trade amount with macro

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off