Quantcast
GameTooltip Issue - WoWInterface
Thread Tools Display Modes
11-26-20, 05:41 PM   #1
sgkdnay
A Defias Bandit
Join Date: Feb 2011
Posts: 3
GameTooltip Issue

Trying to understand GameTooltip but for some reason not working as intended (reading tooltips)

Code:
function vQC_ToolTips(self)
	local lines = self:NumLines()
	print(lines)
	for i = 1, lines do
		local txtL = getglobal(self:GetName() .. "TextLeft" .. i)
		if txtL:GetText() ~= nil then
			if txtL:GetText() == "Quest ID" then
				local txtR = getglobal(self:GetName() .. "TextRight" .. i)
				print("Found it "..txtR:GetText())
			end
		end
	end
end
GameTooltip:HookScript("OnShow", vQC_ToolTips)
Some would give me information, other will not.
This will NOT give me QuestID into chat, also x.Numlines shows 3 when it's 11
http://prntscr.com/vqv2ya
But this one will, while this x.NumLines shows 12 properly
https://prnt.sc/vqv3fx

So what am i missing? Im trying to extract all information from whomever's addon's tooltip created

Last edited by sgkdnay : 11-26-20 at 05:43 PM. Reason: url won't display properly
  Reply With Quote
11-26-20, 06:44 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,991
What exactly is your goal? Depending on what you intend to do, there are probably better ways in getting this info than tooltip scanning.
__________________
ESOUI AddOns | 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
11-26-20, 06:57 PM   #3
sgkdnay
A Defias Bandit
Join Date: Feb 2011
Posts: 3
Just reading the tooltip, was looking for LeftText "Quest ID" then pull the info on RightText with actual "#". No modification or anything.
  Reply With Quote
11-27-20, 12:17 AM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,991
Reading tooltips is a desperate last-ditch effort to get information. From your screenshots, another addon is putting that into there, which means it's getting it form somewhere else to display it. The only thing I can suggest at this time is to look at that addon's code to see where it's getting that information from.

If you need further help, I need to know what addon you're trying to grab this from. If there's more to your code, it'll help to show all of it for context.
__________________
ESOUI AddOns | 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
11-27-20, 12:40 AM   #5
sgkdnay
A Defias Bandit
Join Date: Feb 2011
Posts: 3
Its trying to read from AllTheThings.lua that generate tooltips. Most tooltip I could read and pull information, some cannot. I might have to ask the author and see if something can be fixed in regard to tooltip or of some sort.
  Reply With Quote
11-27-20, 03:20 AM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,991
If you're really set on tooltips, you might try looking at ItemRefTooltip that handles chat links.
__________________
ESOUI AddOns | 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

WoWInterface » Developer Discussions » Lua/XML Help » GameTooltip Issue

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