Reply
 
Thread Tools Display Modes
Old 05-03-13, 06:17 AM   #1
Mazzop
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 18
Data input ingame

Hi, i am looking for a way to mass input saved variables ingame. Currently i copy it from our guild website directly to savedvariables file, but that requires game to be turned off

LootHours= {
["Player1"] = 14,
["Player2"] = 5,
["Player3"] = 11,
["Player4"] = 16,
}

is there a way to do it ingame? I could change format of that data to one string with some seperators and then work with that if that helps, but our roster is 50+ players, so it would not fit into normal chat anyway. I am totally green with XML.
Mazzop is offline   Reply With Quote
Old 05-03-13, 08:55 AM   #2
Resike
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 465
Originally Posted by Mazzop View Post
Hi, i am looking for a way to mass input saved variables ingame. Currently i copy it from our guild website directly to savedvariables file, but that requires game to be turned off

LootHours= {
["Player1"] = 14,
["Player2"] = 5,
["Player3"] = 11,
["Player4"] = 16,
}

is there a way to do it ingame? I could change format of that data to one string with some seperators and then work with that if that helps, but our roster is 50+ players, so it would not fit into normal chat anyway. I am totally green with XML.
You dont need to turn off the game for that, just overwrite the data, and "/reload".
Resike is offline   Reply With Quote
Old 05-03-13, 09:35 AM   #3
Mazzop
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 18
Not work, it print old data after save file and /reload
Mazzop is offline   Reply With Quote
Old 05-03-13, 11:21 AM   #4
ravagernl
Macro Murloc mgrlglrgl!
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,106
If you use something like DevPad you can paste the table in there and run the script to overwrite savedvariables.
ravagernl is offline   Reply With Quote
Old 05-03-13, 11:36 AM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,477
Originally Posted by Resike View Post
You dont need to turn off the game for that, just overwrite the data, and "/reload".
No, the saved variables files are written to on a reload. Unless you set the file to be read-only before your /reload the UI, whatever the variables are set to in-game when reloading will be saved to the file overwriting what you had copy-pasted in.


@Mazzop: Depending on the length of the saved variables, you could just paste it into the chat frame to run it. Otherwise, you'll need to create an editbox yourself to paste into and then call RunScript() on the text or use an addon for that purpose (such as DevPad, WoWLua, TinyPad, etc.)
__________________
"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

Seerah is offline   Reply With Quote
Old 05-03-13, 12:27 PM   #6
Resike
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 465
Originally Posted by Seerah View Post
No, the saved variables files are written to on a reload. Unless you set the file to be read-only before your /reload the UI, whatever the variables are set to in-game when reloading will be saved to the file overwriting what you had copy-pasted in.


@Mazzop: Depending on the length of the saved variables, you could just paste it into the chat frame to run it. Otherwise, you'll need to create an editbox yourself to paste into and then call RunScript() on the text or use an addon for that purpose (such as DevPad, WoWLua, TinyPad, etc.)
My bad, i was actually saving variables via my addon.
Resike is offline   Reply With Quote
Old 05-03-13, 01:03 PM   #7
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,477
Originally Posted by Resike View Post
My bad, i was actually saving variables via my addon.
Huh? Every addon sets its saved variables.
__________________
"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

Seerah is offline   Reply With Quote
Old 05-03-13, 01:45 PM   #8
Mazzop
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 18
Thanks! Works superb via DevPad.
It is too big and complex for my needs, but i failed to do editbox myself, so it will do
Mazzop is offline   Reply With Quote
Old 05-03-13, 02:36 PM   #9
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,016
Originally Posted by Seerah View Post
Huh? Every addon sets its saved variables.
Mah brain, it asplode.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of Revelation, Spamalyzer, TravelAgent, Volumizer, and many other AddOns.
Torhal is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Lua/XML Help » Data input ingame

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