Thread Tools Display Modes
08/21/15, 03:49 PM   #21
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,913
Originally Posted by sirinsidiator View Post
When you use an external tool, nothing is going to stop you from replacing one file in your addon with updated data from your website. On UI reload it will load the new data as part of the addon.
Ok, I was talking about the SavedVariables filenames, not filenames inside the addon directory itsself. But this would be a possible solution, right
  Reply With Quote
08/22/15, 12:24 AM   #22
dopiate
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 142
lots of history with this...

I already have an addon that does some of this.

If you have specific question let me know.

Guild Sales Assistant for Master Merchant

-d
  Reply With Quote
08/23/15, 12:10 PM   #23
domintheus
Join Date: Aug 2015
Posts: 8
So the saved variables file will only change when the ui is loaded, reloaded, or when the user logs out?

If so, I imagine a program could be made to watch the saved variables file for changes. There's a few concerns about this, though. Firstly, people shouldn't simply run executables that they find on the internet, there could be security concerns with that. Is there any other way to send the http requests when the saved variables file is updated?
  Reply With Quote
08/23/15, 12:50 PM   #24
haggen
 
haggen's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2015
Posts: 137
Originally Posted by domintheus View Post
So the saved variables file will only change when the ui is loaded, reloaded, or when the user logs out?

If so, I imagine a program could be made to watch the saved variables file for changes. There's a few concerns about this, though. Firstly, people shouldn't simply run executables that they find on the internet, there could be security concerns with that. Is there any other way to send the http requests when the saved variables file is updated?
I think you missed my post :P I AM currently developing such software, that watches the saved variables for changes and send them to the add-on developer: https://github.com/haggen/Argonian
  Reply With Quote
08/23/15, 12:52 PM   #25
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,913
Yes, you are right about the SavedVars.

Without external "watching" programs you wouldn't be able to set an http request. lua in eso isn't able to write/read external files, send data to the internet websites etc.
If you make it open source so ppl can watch the code and give improvement hints, they may trust the exe file more then others
  Reply With Quote
08/23/15, 07:38 PM   #26
dopiate
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 142
Think outside the box

Originally Posted by domintheus View Post
So the saved variables file will only change when the ui is loaded, reloaded, or when the user logs out?
Correct. Every saved variables file is loaded and then saved during logoff, toon switch or reloadui.

Originally Posted by domintheus View Post
If so, I imagine a program could be made to watch the saved variables file for changes. There's a few concerns about this, though. Firstly, people shouldn't simply run executables that they find on the internet, there could be security concerns with that. Is there any other way to send the http requests when the saved variables file is updated?
You don't have to compile it -- you could write a simple vbs that runs in the background and monitors for your conditions and send when you detect changes.

So you would launch ESO via the VBS

Notice you check the file properties first (with DateLastModified you get TIME and DATE)

Code:
Set objShell = WScript.CreateObject ("WScript.shell")
set objFSO = CreateObject("Scripting.FileSystemObject")
set file = objFSO.GetFile(SAVED VARIABLE FILE NAME/PATH HERE)
lastUpdated =  file.DateLastModified
objShell.run """" & "cmd /c C:\Program Files (x86)\Zenimax Online\The Elder Scrolls Online\game\client\eso.exe" & """"
from that point on your vbs could sit in memory and sleep for however long you want, wake up and then check on the file.DateLastModified and compare the two, then go back into sleep.

If there is a difference, then you can send your http request.

Create a loop that checks that ESO is running.

While the loop is running wscript.sleep for periods of time, then check for file attribute changes.
No reason to check every millisecond :-)

Then if you detect and change - do your http thing and if you base your loop on "is ESO running" then when the result is false you know for a fact the files have changed and do what you need to again.

I've done this type of thing at my office before. This solves your .exe issue. Vbs is just a text file and it can do everything you want.

If this interests you, let me know. I could assist you with the code.

-d

Last edited by dopiate : 08/24/15 at 08:50 AM.
  Reply With Quote
08/24/15, 07:44 PM   #27
domintheus
Join Date: Aug 2015
Posts: 8
Originally Posted by haggen View Post
I think you missed my post :P I AM currently developing such software, that watches the saved variables for changes and send them to the add-on developer: https://github.com/haggen/Argonian
Does it require running an external script/program? I personally would love to find a way that won't cause the potential user to worry whether they should run the program for fear of being infected.


Originally Posted by dopiate View Post
I've done this type of thing at my office before. This solves your .exe issue. Vbs is just a text file and it can do everything you want.

If this interests you, let me know. I could assist you with the code.
Do you know if there's a way to do this within the LUA language? As I mentioned above, if possible, I'd rather keep from running separate executables/scripts and instead be able to just start the game normally.

I definitely am looking for people who know more about the LUA side of things. I know the php side, and would like to get a couple people to collaborate with on a guild forum addon. You and haggen both seem to have interest so far.
  Reply With Quote
08/25/15, 04:14 AM   #28
dopiate
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 142
Originally Posted by domintheus View Post
Do you know if there's a way to do this within the LUA language? As I mentioned above, if possible, I'd rather keep from running separate executables/scripts and instead be able to just start the game normally.

I definitely am looking for people who know more about the LUA side of things. I know the php side, and would like to get a couple people to collaborate with on a guild forum addon. You and haggen both seem to have interest so far.
Hi I think maybe you didn't fully understand my post.

You only have to launch 1 icon.

In the .vbs you run it, it gets the current stats on the file you are watching then it launches ESO for you and finally goes into memory to do whatever routines you are looking for.

So yes you can use 1 VBS to run anything on your computer. In my example the VBS file launches ESO into it's own memory space by doing "cmd /c" there is no reason for the VBS to be tied to ESO.

On your other question, LUA is a sandbox environment. You can only use the LUA file in game, thats it, no other options.

Thats why there is no winamp addon, chrome window in game, you can't do any of that. And it will not run programs for you. It's won't reach out of the sandbox.

As for help, I'm a so-so LUA coder. My addon is in .NET and pulls data from the savedvariables. I would say I'm much better in .NET or VBS or PowerShell than I am at LUA.

You are going to need to parse the LUA files for the data you need and let me tell you that isn't easy.

Your going to end up with a 2 part addon (like mine) the in game collection and the external parsing and posting. Really it's a similar setup to mine but you can do yours with 1 icon if you want.

If you go the .NET or VBS route I can give you some routines for parsing so that would save you time. I'm not sure I have a lot of time to help but I may have already written half of what you need.

-d

PS if you want to see any of what I'm talking about get Master Merchant and Guild Sales Assistant for Master Merchant. You will see the data collector is MM and outside the game GSA parses the savedvariables for the data it needs and puts it into a local database.
  Reply With Quote
08/25/15, 12:06 PM   #29
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,913
Originally Posted by domintheus View Post
Do you know if there's a way to do this within the LUA language?
We all answered this now several times
No chance!
  Reply With Quote
08/26/15, 05:54 AM   #30
Fyrakin
 
Fyrakin's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 129
Originally Posted by domintheus View Post
Couldn't the reload action both be a POST then GET operation? Operating on initial game load, similar to how MasterMerchant updates on initial game load, then only POSTing/GETting when the content is submitted or fetched via the buttons that do the reloadui?

The PHP side, or .NET in your case, could be configured with variables, just as you see in this forum.

In example:

Code:
newreply.php?do=newreply&noquote=1&p=22879

$do = newreply;
$noquote = 1;
$p = 22879;
This will require some work depending on the forum software being used, but it is definitely possible. All of the info will need to be passed as variables to the PHP translation file, it will handle the login, comment posting, then fetching the few topics and comments to replace the existing ones in the saved variables.

Variables would be something like:

Code:
$email = '[email protected]';
$password = 'somepass';
$topics = array(); // storing the topics/threads
$comment = 'some content to post as a comment';
$commenttopic = 38948; // the topic to post the comment too
If anyone is willing to help with the idea, I'm willing to put a forum up to test with.
I would monitor the folder with an external app which would then parse and transmit the data to external database, if it has to update something, say some lua file in add-ons it could do that as well, but it would require /re on client side to fetch the new data.
  Reply With Quote
08/26/15, 06:01 AM   #31
Wandamey
Guest
Posts: n/a
I get it that the technical challenge is fun here, but for me it takes between 30s/3mn to reloadui, i wouldn't ever edit a site or post a message on a site like that.

And if the data are send only at the end of my session, i'll have the risk to lose all of my editing on a crash :s

Having the possibility to read new infos on the other side... seems fair enough.
  Reply With Quote
08/26/15, 06:10 AM   #32
Fyrakin
 
Fyrakin's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 129
Originally Posted by Wandamey View Post
I get it that the technical challenge is fun here, but for me it takes between 30s/3mn to reloadui, i wouldn't ever edit a site or post a message on a site like that.

And if the data are send only at the end of my session, i'll have the risk to lose all of my editing on a crash :s

Having the possibility to read new infos on the other side... seems fair enough.
Same here, I would rather alt-tab to do that. It would only be beneficial to exchange the in-game data between add-on users as a part of such solution. Updates could happen before and after gaming sessions.
  Reply With Quote
08/26/15, 06:46 AM   #33
Wandamey
Guest
Posts: n/a
Originally Posted by Fyrakin View Post
Updates could happen before and after gaming sessions.
yeah i know but reading the last state of the forum/news at login may be an incentive to open the website.

edit, oh sry I see the other potential problem... lol, should force a reloadui on every addon user to get the last message updated in time

Edit : yes I've read the preface, but I don't buy it. they can't alt-tab, but they are fine with reloading? no way, I can check my mails and this forum at each loading screen (not even the reload ones).

Last edited by Wandamey : 08/26/15 at 07:45 AM.
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Addon connect to external database?

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