Greyford

Tail game log in Overwolf App

Recommended Posts

Hi,

 

I want to tail the Hearthstone Power.log out of my Overwolf App to get info about game events.

 

Here's my code:

plugin().getTextFile(logPath, false, function (status, data) {
      if (!status) {
        console.log("No Power.log file found.");
      }
      else {
        console.log(data);
      }
    });

Now this works just fine, if I don't have Hearthstone open. But when I have it open, the status is false...

 

So what I have to cope with is:

1) Accessibility when the file is used by another program

2) Tailing a file instead of just getting it's current data

 

I am pretty sure this is possible with Overwolf somehow, because Heartharena does exactly that.

 

Would be really grateful for some help. :) Thank you.

Share this post


Link to post
Share on other sites

Hola,

Please use the plugin version from this branch: https://github.com/overwolf/simple-io-plugin/tree/special_ha_patch

 

It now has these two methods:

plugin.listenOnFile("id", "filename", skipToEnd (true/false), function(id, status, data) {
  if (status) {
  console.log("File " + id ": " + data);
  }

});

 
 
and:
plugin.stopFileListen("id");

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now