Thank you so much for pointing me in the right direction and giving me the answer :P
now I have this:
Lua Code:
local gearEditBox = CreateFrame("EditBox",nil,UIParent,"InputBoxTemplate")
gearEditBox:SetSize(configFrame:GetWidth()/4.4,32)
gearEditBox:SetPoint("TOPLEFT",12,-118)
gearEditBox:IsNumeric()
gearEditBox:SetText("|cffff0000 RIGHT-CLICK ME! ")
gearEditBox:SetJustifyH("CENTER")
gearEditBox:SetAutoFocus(false)
gearEditBox:HookScript("OnEnter", function(self)
GameTooltip:SetOwner(self,"ANCHOR_TOP")
GameTooltip:AddLine("Copy this text to the character.lua located at: ", 1,1,1)
GameTooltip:AddLine("Interface/AddOns/"..addon, 1,1,1)
GameTooltip:AddLine(" ")
GameTooltip:AddDoubleLine("right-click", "Sets the text in the editbox to the equipment", 1,1,1, 1,1,0)
GameTooltip:AddDoubleLine("ctrl + a", "marks all text", 1,1,1, 1,1,0)
GameTooltip:AddDoubleLine("ctrl + c", "copy the marked text", 1,1,1, 1,1,0)
GameTooltip:Show()
end)
gearEditBox:HookScript("OnLeave", function()
GameTooltip:Hide()
end)
local gearList = {}
local visibleItemID = 0
gearEditBox:SetScript("OnMouseUp", function(self, button)
if button == "RightButton" then
gearList = table.wipe(gearList)
for slotID = 1,19 do
if slotID == 2 or slotID == 11 or slotID == 12 or slotID == 13 or slotID == 14 or slotID == 18 then else
local isTransmogrified = C_Transmog.GetSlotInfo(slotID, 0)
if isTransmogrified then
visibleItemID = C_TransmogCollection.GetSourceInfo(select(3, C_Transmog.GetSlotVisualInfo(slotID,0))).itemID
if select(7, C_Transmog.GetSlotInfo(slotID, 0)) then visibleItemID = "nil" end
else
visibleItemID = GetInventoryItemID("player", slotID)
if visibleItemID == nil then visibleItemID = "nil" end
end
if visibleItemID then
if slotID == 19 then
table.insert(gearList, "[ "..slotID.."] = ".. visibleItemID)
else
table.insert(gearList, "[ "..slotID.."] = ".. visibleItemID..", ")
end
end
end
end
gearEditBox:SetText(unpack(gearList))
--print(unpack(gearList))
print("|cff6699FFSX |cffffff00WallpaperKit|r: Gear list printed in editbox")
end
end)
gearEditBox:SetScript("OnEnterPressed",function(s)
gearEditBox:ClearFocus()
-- local isTransmogrified, hasPending, isPendingCollected, canTransmogrify, cannotTransmogrifyReason, hasUndo, isHideVisual, texture = C_Transmog.GetSlotInfo(slotID, transmogType)
end)
and it works great, except it only prints the first line of the table into the editBox, any help on how I can print the entire table into the editBox?