[Lua] Help automatization of TSM Auto-Mail menu

User Tag List

Results 1 to 3 of 3
  1. #1
    Schattengest's Avatar Corporal
    Reputation
    6
    Join Date
    Apr 2012
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua] Help automatization of TSM Auto-Mail

    Hi buddies,

    There is a button on TSM auto mail, that on press, send all u listed goods by mail to another character.
    But this button dont have a name, and so, cannot make a macro to use it.
    I tried by myself adding a name on it, but it gave me errors.

    If i can give it a name, i could keybind the macro and then keyspam.

    Well, here is the code:

    Code:
    function AutoMail:OnEnable()
    	local button = CreateFrame("Button", nil, MailFrame, "UIPanelButtonTemplate")
    	button:SetHeight(26)
    	button:SetWidth(250)
    	button:SetText(L["TradeSkillMaster_Mailing: Auto-Mail"])
    	button:SetFrameStrata("HIGH")
    	button:SetScript("OnEnter", function(self)
    			GameTooltip:SetOwner(self, "ANCHOR_BOTTOMLEFT")
    			GameTooltip:SetText(self.tooltip, 1, 1, 1, nil, true)
    			GameTooltip:Show()
    		end)
    	button:SetScript("OnLeave", function() GameTooltip:Hide() end)
    	button:SetScript("OnHide", function()
    			private:StopAutoMailing()
    		end)
    	button:SetScript("OnClick", function(self)
    			private:StartAutoMailing()
    		end)
    	button:SetPoint("TOPLEFT", MailFrame, "TOPLEFT", 70, 13)
    	button.tooltip = L["Runs TradeSkillMaster_Mailing's auto mailer, the last patch of mails will take ~10 seconds to send.\n\n[WARNING!] You will not get any confirmation before it starts to send mails, it is your own fault if you mistype your bankers name."]
    	private.button = button
    	
    	if ElvUI then
    		ElvUI[1]:GetModule("Skins"):HandleButton(button)
    	end
    end
    I think the name should go on the place of the nil on
    Code:
    local button = CreateFrame("Button", nil, MailFrame, "UIPanelButtonTemplate")
    But just replacing it with "TSMAutoMailButton", give me error.

    Anyone can help me fix this addon?

    Thanks

    [Lua] Help automatization of TSM Auto-Mail
  2. #2
    Holyscourge's Avatar Member
    Reputation
    1
    Join Date
    Feb 2012
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its way simpler then that.

    AutoMail,lua in the AddOns\TradeSkillMaster_Mailing\Modules folder.

    --top of file
    local TSM = select(2, ...)
    local AutoMail = TSM:NewModule("AutoMail", "AceEvent-3.0")
    local L = LibStub("AceLocale-3.0"):GetLocale("TradeSkillMaster_Mailing") -- loads the localization table

    local private = {}

    TSMMail = private; <-- our line of code


    in your macro simply invoke

    /run TSMMail:StartAutoMailing()

  3. #3
    Owneth's Avatar Active Member
    Reputation
    56
    Join Date
    Feb 2011
    Posts
    362
    Thanks G/R
    6/22
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Holyscourge View Post
    Its way simpler then that.

    AutoMail,lua in the AddOns\TradeSkillMaster_Mailing\Modules folder.

    --top of file
    local TSM = select(2, ...)
    local AutoMail = TSM:NewModule("AutoMail", "AceEvent-3.0")
    local L = LibStub("AceLocale-3.0"):GetLocale("TradeSkillMaster_Mailing") -- loads the localization table

    local private = {}

    TSMMail = private; <-- our line of code


    in your macro simply invoke

    /run TSMMail:StartAutoMailing()
    How about the newest version that just dropped?

Similar Threads

  1. [Help] Need LUA help? Post here!
    By EcHoEs in forum World of Warcraft Emulator Servers
    Replies: 20
    Last Post: 10-03-2010, 01:18 PM
  2. LUA help
    By stoneharry in forum World of Warcraft Emulator Servers
    Replies: 16
    Last Post: 02-25-2008, 03:27 PM
  3. Lua help
    By reconz in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 02-18-2008, 07:03 PM
  4. Lua help
    By Tom_2001 in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 02-04-2008, 12:17 PM
  5. [Help Wanted]Admin/Dev send Mail via Website
    By Zaphieon in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 10-19-2007, 11:48 AM
All times are GMT -5. The time now is 04:11 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search