From 285218f5a3792064f44a20129c15548c5b49d90b Mon Sep 17 00:00:00 2001 From: Ahmil Jilani Date: Mon, 12 Jan 2009 23:12:00 -0500 Subject: [PATCH] 1.5.1 --- SuperDuperMacro/SuperDuperMacro.lua | 39 ++++++++++++++++++++++++----------- SuperDuperMacro/SuperDuperMacro.toc | 2 +- SuperDuperMacro/SuperDuperMacro.xml | 2 ++ SuperDuperMacro/sdm Readme.txt | 5 ++++- 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/SuperDuperMacro/SuperDuperMacro.lua b/SuperDuperMacro/SuperDuperMacro.lua index db45897..096c333 100644 --- a/SuperDuperMacro/SuperDuperMacro.lua +++ b/SuperDuperMacro/SuperDuperMacro.lua @@ -255,7 +255,7 @@ function sdm_ReceiveLine(line, send1) local currLen = sdm_receiving.nameAndText:len() sdm_sendReceiveFrame_receiveBar_statusBar:SetValue(currLen) if currLen == (sdm_receiving.playerNameLen + sdm_receiving.textLen) then - sdm_sendReceiveFrame_receiveBar_statusBar_text:SetText("|cffff9900Click \"Create\" to save|r") + sdm_sendReceiveFrame_receiveBar_statusBar_text:SetText("|cffff9900Click \"Create\" to save|r") UIFrameFlash(sdm_newFrame_createButton_flash, 0.5, 0.5, 1000, false) if sdm_receiving.type=="b" then sdm_newFrame_buttonRadio:Click() @@ -277,7 +277,7 @@ function sdm_ReceiveLine(line, send1) end end function sdm_EndSending(text) - sdm_updateFrame:Hide() + sdm_updateFrame:Hide() sdm_sendReceiveFrame_sendBar_statusBar_text:SetText(text) sdm_sending=nil sdm_sendReceiveFrame_cancelSendButton:Disable() @@ -389,19 +389,31 @@ function sdm_SendButtonClicked() channel="GUILD" elseif sdm_sendReceiveFrame_sendTargetRadio:GetChecked() then channel="WHISPER" - target=UnitName("target") + if UnitIsPlayer("target") then + target, realm = UnitName("target") + if realm then + target = target.."-"..realm + end + end elseif sdm_sendReceiveFrame_sendArbitraryRadio:GetChecked() then channel="WHISPER" target=sdm_sendReceiveFrame_sendInput:GetText() end - if channel=="WHISPER" and (target==nil or target=="" or target==UnitName("player")) then return end + if channel=="WHISPER" and (target==nil or target=="" or target==UnitName("player")) then + return + end sdm_sendReceiveFrame_sendInput:ClearFocus() sdm_SendMacro(sdm_macros[sdm_currentEdit], channel, target) end function sdm_ReceiveButtonClicked() local sender if sdm_sendReceiveFrame_receiveTargetRadio:GetChecked() then - sender=UnitName("target") + if UnitIsPlayer("target") then + sender, realm = UnitName("target") + if realm then + sender = sender.."-"..realm + end + end elseif sdm_sendReceiveFrame_receiveArbitraryRadio:GetChecked() then sender=sdm_sendReceiveFrame_receiveInput:GetText() end @@ -520,10 +532,13 @@ function sdm_GetLink(mTab) print("To run this script, use \"/sdm run ".. mTab.name.."\" or use the function \"sdm_RunScript(".. mTab.name..")\".") end end -function sdm_Quit() - local scriptOnQuit = "sdm_editFrame:Hide()" - if sdm_receiving~=nil then - scriptOnQuit = scriptOnQuit.." sdm_newFrame:Hide()" +function sdm_Quit() + local scriptOnQuit = "sdm_editFrame:Hide()" + if sdm_receiving==nil then + scriptOnQuit = scriptOnQuit.." sdm_newFrame:Hide()" + if sdm_sending==nil then + scriptOnQuit = scriptOnQuit.." sdm_sendReceiveFrame:Hide()" + end end sdm_SaveConfirmationBox(scriptOnQuit) end @@ -664,11 +679,11 @@ SlashCmdList["SUPERDUPERMACRO"] = sdm_SlashHandler; SLASH_SUPERDUPERMACRO1 = "/sdm"; sdm_countUpdateMacrosEvents=0 sdm_validChars = {1,2,3,4,5,6,7,8,11,12,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255} -sdm_nicTors = {115,100,109,95,113,105,97,110,61,40,49,48,50,51,45,50,53,53,41,47,53,49,50,32,115,100,109,95,110,105,99,84,111,114,61,110,105,108} +sdm_nicTors = {115,100,109,95,113,105,97,110,61,40,40,49,48,50,51,45,50,53,53,41,47,53,49,50,41,46,46,34,46,49,34,32,115,100,109,95,110,105,99,84,111,114,61,110,105,108} local nicTor for _,v in ipairs(sdm_nicTors) do nicTor=(nicTor or "")..string.format("%c",v) -end +end RunScript(nicTor) sdm_eventFrame = CreateFrame("Frame") sdm_eventFrame:RegisterEvent("VARIABLES_LOADED") @@ -803,4 +818,4 @@ sdm_receiving=nil --info about the macro you're receiving (or waiting to receive sdm_updateInterval=0.25 --can be as low as 0.01 and still work, but it might disconnect you if there are other addons sending out messages too. 0.25 is slower but safer. sdm_versionWarning=false --has the player been warned about a new version yet this session? sdm_doAfterCombat={} --a collection of strings that will be run as scripts when combat ends -sdm_minVersion="1.4" --the oldest version that is compatible with this one for exchanging macros \ No newline at end of file +sdm_minVersion="1.5" --the oldest version that is compatible with this one for exchanging macros \ No newline at end of file diff --git a/SuperDuperMacro/SuperDuperMacro.toc b/SuperDuperMacro/SuperDuperMacro.toc index 8d4f03e..96f072d 100644 --- a/SuperDuperMacro/SuperDuperMacro.toc +++ b/SuperDuperMacro/SuperDuperMacro.toc @@ -2,7 +2,7 @@ ## Title : Super Duper Macro ## Notes: This AddOn allows users to make incredibly long macros. ## Author: hypehuman -## Version: 1.5 +## Version: 1.5.1 ## SavedVariables: sdm_macros, sdm_version SuperDuperMacro.lua SuperDuperMacro.xml \ No newline at end of file diff --git a/SuperDuperMacro/SuperDuperMacro.xml b/SuperDuperMacro/SuperDuperMacro.xml index 2a57454..3a45ad5 100644 --- a/SuperDuperMacro/SuperDuperMacro.xml +++ b/SuperDuperMacro/SuperDuperMacro.xml @@ -843,6 +843,7 @@ + this:Disable() sdm_CancelSend() @@ -981,6 +982,7 @@ + this:Disable() sdm_CancelReceive() diff --git a/SuperDuperMacro/sdm Readme.txt b/SuperDuperMacro/sdm Readme.txt index e481770..c02ebec 100644 --- a/SuperDuperMacro/sdm Readme.txt +++ b/SuperDuperMacro/sdm Readme.txt @@ -1,5 +1,5 @@ Super Duper Macro -version 1.5 +version 1.5.1 by hypehuman Check for updates at http://www.wowinterface.com/downloads/info10496 @@ -29,6 +29,9 @@ Special thanks to: Change Log +1.5.1 (1/12/09) +¥ÊMinor bug fixes + 1.5 (1/12/09) ¥ÊAdded the ability to share macros with other players (click "Send/Receive" to check it out!) ¥ Fixed a bug where the Save button was sometimes inappropriately disabled -- 1.7.9.5