-
Posted by bange.pike on Tue, 15 Mar 2011 16:33:59
I found several way to get the file path to the textures used, but what I'd like to do is display the textures to the chat screen. is this possible with out a complete addon. most of my scripts are done with macros.
tia
-
Posted by jnwhiteh on Tue, 15 Mar 2011 16:49:09
Textures can be included in (most) FontStrings using UI escape sequences.
-
Posted by bange.pike on Tue, 15 Mar 2011 16:56:50
thank you. I think this is exactly what I was looking for. Now I just have to wait for the realms to come back up and try it. thanx again
-
Posted by bange.pike on Tue, 15 Mar 2011 21:43:50
sorry, but it didn't work. this is the macro I'm wanting to use it on:
/run q="player" w="say" l=UnitLevel(q) p=UnitXP(q)/UnitXPMax(q) SendChatMessage(format("%s %.0f %s %.3f%s","I'm Level",l,"and",p*100,"%"),w);for i=6,13 do a,b,c,d,e,f,g,h=GetProfessionInfo(i);SendChatMessage("{rt1}"..a.." is "..c.." of "..d,w) end
and I would like to show the icon texture of the profession in line with the listing. and I've tried print(), SendChatMessage() and DEFAULTCHATFRAME:AddMessage() and all results are the same. I would like to replace the {rt1}; which is the star; with the icon. is there another way or do you have an example I can work with? thanx
-
Posted by jnwhiteh on Tue, 15 Mar 2011 21:48:46
sorry, but it didn't work. this is the macro I'm wanting to use it on:
/run q="player" w="say" l=UnitLevel(q) p=UnitXP(q)/UnitXPMax(q) SendChatMessage(format("%s %.0f %s %.3f%s","I'm Level",l,"and",p*100,"%"),w);for i=6,13 do a,b,c,d,e,f,g,h=GetProfessionInfo(i);SendChatMessage("{rt1}"..a.." is "..c.." of "..d,w) end
and I would like to show the icon texture of the profession in line with the listing. and I've tried print(), SendChatMessage() and DEFAULTCHATFRAME:AddMessage() and all results are the same. I would like to replace the {rt1}; which is the star; with the icon. is there another way or do you have an example I can work with? thanx
A few things:
- What I posted to you works, and everything you need is on that page.
- You cannot send texture via chat channels, that's a security risk so its not allowed.
- You can't test any escape codes in the edit box by using the
|
character. This is explained in my book and on the page I linked to you, the edit box replaces each|
with||
. If you want to test using the edit box, you must use\124
instead of|
.