Thread Tools Display Modes
02-07-11, 02:40 PM   #1
aiikachi
A Cyclonian
 
aiikachi's Avatar
Join Date: Jan 2007
Posts: 44
Question on changing settings in mods with lua

I am wondering if it is at all possible to write my own lua file (with IsAddonLoaded perhaps?) that will change certain settings in certain other addons (remove fontshadow, change frame size, ect) so that I do not have to manually edit the lua of these addons everytime I update them. I thought I had seen that this was possible elsewhere before, but I would like confirmation/examples if it is thanks!
__________________
  Reply With Quote
02-07-11, 04:07 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Only if what you want to change is globally accessible.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
02-07-11, 05:18 PM   #3
aiikachi
A Cyclonian
 
aiikachi's Avatar
Join Date: Jan 2007
Posts: 44
So if I understand: if it's a font string created by the individual addon--that wouldn't be possible?
__________________
  Reply With Quote
02-07-11, 06:49 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Does it have a global name or variable, or is it only assigned a local variable? Does the fontstring's parent have a global name or variable so that you can use GetChildren (or maybe even GetRegions) to find it?
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
02-07-11, 07:03 PM   #5
aiikachi
A Cyclonian
 
aiikachi's Avatar
Join Date: Jan 2007
Posts: 44
Look's like everything I was concerned about are locals, so back to editing the individual lines it is. Thanks for the replies Seerah! <3
__________________
  Reply With Quote
02-09-11, 03:04 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
You might want to take a look at EnumerateFrames() if you really want to go that direction.

EnumerateFrames() gets the first frame from a list, notice no frame has been passed. If EnumerateFrames(frame) is called, it returns the frame following the one passed in the list. If there are no more frames, it returns nil.

The following code would iterate through every frame in existence.
Code:
local frame=EnumerateFrames();
while frame do
--	Do something that checks if this is the frame you want and store the pointer to it

	frame=EnumerateFrames(frame);
end
__________________
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)

Last edited by SDPhantom : 02-09-11 at 03:10 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Question on changing settings in mods with lua


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