Thread Tools Display Modes
10-15-10, 02:49 PM   #1
jlrm365
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 113
Question scripts into addon - HOW?

Hello.

I've got four script lines in a macro (they move a couple of elements on the screen).

Essentially, it's just:

/script [text here]
/script [text here]
/script [text here]
/script [text here]

Being able to move the items as it does - rather than manually doing so each time - is very useful, but I'd rather not have to click the button each time I login, reload or the addons otherwise reset themselves.

Typing /console in a macro can be translated to /CVar in an addon.

Can the word "script" be translated - in the same sort of way - into something that would work in a simple addon?

If possible, could you give an example of how a line would look in script and then "translated"?

Thanks very much!

  Reply With Quote
10-15-10, 03:54 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
macro:
/script [text here]

addon:
[text here]


The only thing to look out for is that if what you want to alter isn't created or otherwise ready to be altered yet, you will need to be a tiny bit more advanced with your Lua scripting.
__________________
"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
10-15-10, 04:34 PM   #3
jlrm365
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 113
Thanks. I'll try that out tomorrow and get back to you.
  Reply With Quote
02-05-11, 11:37 AM   #4
jlrm365
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 113
I finally got around to doing as you suggested and it's really as simple as it looks.
It works perfectly and means that the pet bar is back in its pre-Cataclysm position and I no longer need to click a script button to get it there.
Thanks again.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » scripts into addon - HOW?

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