• Announcements

    • Colorfulstan

      Windows XP\ Vista support dropped   11/19/2016

      It's been a while but I think some people (especially first time visitor's) don't know yet
    • Raif

      Code of Conduct - Rules you should read   02/25/2017

      In General
      Be respectful! There's another person on the other end of that conversation! The forums are a place to discuss anything related to Overwolf and beyond but want this to be a place where people feel comfortable to participate and have fun! Keep it on topic, keep it constructive - Threads should be constructive and have a clear topic. Replies to that topic should be relevant. Bumping a thread without adding relevant information is not considered constructive. Bumping a thread from a long time ago is also not constructive (Overwolf updates every 2 weeks, things change). Attacks or Accusations are not acceptable - Attacking another person is unacceptable, the circumstances are irrelevant, just don't do it. Read the topic - Know what people are talking about in the thread. Stick to the given topic and don't derail it. Search - We have a great search function, use it before you post a new thread as it's possible someone has asked your question before and there's info on it. Don't see something about your question or topic after searching? Post it! (keep in mind that bumping threads from a long time ago is not recommended, post your own). Don't post about locked or deleted topics; they were deleted for a reason. No petitions, demands or "When will.." We have places for asking for games, features and we will tell you when something is coming. We don't give dates for a reason. Don't try getting around the swear filter, it's not cute or funny. This is not a place to break NDA's, talk about something illegal or break any law from any country. We will contact the necessary parties involved and you will be pursued to the extent of the law. No spam. You will be banned and your post deleted. Please write in English. This is an international forum and we'd like everyone to be able to participate.
      Bad Behavior Insults, racial slurs, profanity, vulgarity. Trolling - You know who you are, and we will find you. Nudity, porn or anything obscene. Flaming - We don't have a trained fireman on staff, so don't do it. No advertising - No one wants to buy that shirt off of you, or that WoW gold. No insulting any religion (fake, real, or imagined), sexual orientation, gender or culture. No talking about drugs or performing illegal activities. Impersonation - Don't do it, people find out and you end up looking stupid.
      What will we do if you break a rule? Warnings - You get only one. Thread/Post deletion - We delete your thread/post from the forums. Suspension - Temporary forum ban. Account termination - Permanent forum ban. Legal action or report violations to the appropriate legal authorities.
    • ChriSKate

      Think you tried everything?! - Check out the Overwolf knowledge-base!   02/25/2017

      Dear gamers, how about some DIY? -   http://support.overwolf.com/ The knowledge-base for all your Overwolf related troubleshooting, faq, bugs, known issues and much more!
      Just start typing anything related to your issue (for example, 'fps' or 'heartharena') and discover new ways to work things out.


  • Content count

  • Joined

  • Last visited

  • Days Won


NathanSchwartz last won the day on December 25 2015

NathanSchwartz had the most liked content!


About NathanSchwartz

  • Rank
    Pack Member
  1. Overwolf App Tutorial

    Never would have thought of that, thanks!
  2. how to get callback after dragResize()

    Good idea. Btw the onresize link 404'ed
  3. how to get callback after dragResize()

    I'm not sure what you are trying to accomplish, but Overwolf automatically saves window sizes and positions so there is no need to make a new solution for that.
  4. Its almost over!

    I kept a pretty steady pace through most of the contest, but towards the end it was 30 hr/ weekends and an average of 8 hour days during the week on top of my job. It made for amazing progress, but you can only do that for so long . I'm a "learn by doing" guy as well, but I'd rather get started ASAP and use the documentation as a reference sheet when I get stuck than spend hours practicing syntax. Eloquent JS went much more in-depth in certain areas like high-level functions and I found the style suited me better. At the end of the day it's just a matter of preference. I was planning on implementing AngularAMD to combine Require.js and Angular.js but since it was my first project I didn't want to add MVC to the mix quite yet. Good luck in the contest!
  5. Overwolf App Tutorial

    This post will be purely Recording stuff so I'm making a separate post. I will cover a few pitfalls, making capture recordings that include future duration in quick succession without recharge, and dealing with skipped recordings. Dealing with turnOn() errors The first pitfall I noticed was that only 1 app can record at a time. I used this, but don't forget to make turnOff() reverse the indicator. function turnOn(callback){ overwolf.media.replays.turnOn({}, function(result) { if(result.status== "success"){ localStorage.setItem('recordingOn', true); }else if(result.error == "Already turned on." && JSON.parse(localStorage.getItem('recordingOn')) === false) //Either another recording app is running or you failed to turn off the process before closing last time. }); }; Making start-stop recordings get along with captures This could easily be a problem that is specific to my app, but since I can't remember the exact details I won't speculate. I found that when I used captures before start/stop recordings I was getting an error that wouldn't let the recording start. To solve this I ended up detecting whether or not captures had been used previously and if they were I called turnOff() followed by turnOn(). Catching skipped recordings I used a recursive solution to correct failed captures. It only will recurse for 2 types of errors (both of which have been confirmed to be fixed by this method) and the number of recursions is limited. The theory behind this is that it takes a small amount of time to process each capture, so if you get unlucky and try to capture during this period you wouldn't save the recording. In the most demanding testing I've put it through, this method achieved over 98% success even though there were many simultaneous capture requests. function capture(before, after, recursed, recurseCount){ overwolf.media.replays.capture(before, after, function(result){}, function(result){ if(result.status== "success"){ localStorage.setItem("url", result.url); overwolf.media.replays.finishCapture(result.url); }else if(result.error == "Replay is already capturing."){ if(!recursed){ console.log("wasn't recursed-already capturing"); setTimeout(function(){ capture(before, after, true, 0); },300); }else{ console.log("recursed-already capturing", recurseCount); if(recurseCount < 5){ setTimeout(function(){ capture(before, after, true, recurseCount+1); },300); } } }else if(result.error == "Replay not capturing."){ if(!recursed){ console.log("wasn't recursed - not capturing"); setTimeout(function(){ capture(before, after, true, 0); },300); }else{ console.log("recursed - not capturing", recurseCount); if(recurseCount < 5){ setTimeout(function(){ capture(before, after, true, recurseCount+1); },300); } } } } ); }; Rapid capture recordings w/ future duration in quick succession Normally you can only have 1 recording taken at a time. If the recordings only capture past duration they can be taken in quick succession. However, if you are recording a bit into the future as well you will have to wait until the recording ends before taking any others. localStorage.setItem("recordingLayers", JSON.parse(localStorage.getItem("recordingLayers"))+1); setTimeout(function(){ rec.capture(before + after, 1); //this references the capture function above localStorage.setItem("recordingLayers", JSON.parse(localStorage.getItem("recordingLayers"))-1); }, after); //I use 1 instead of -1 because at one point negative parameters were bugged and I never changed it back. Keeping track of pending recordings You probably already figured it out from the code above, but I use recording "layers" to track pending recordings. When a capture request is recieved the layer counter is incremented and when the setTimeout callback is executed it is decremented. Thus, if the counter is ever >0, you have a pending recording. This makes it super easy to check if there are pending recordings and allows you to warn users when they attempt to close the app or use turnOff(). I hope some of this was useful!
  6. Overwolf App Tutorial

    I considered making my own thread, but instead I'll just hijack this one so the info is all in the same place (sorry bishop ). I wanted to share a few of the methods I used to in my app. Most of the things I will cover are not super complicated, but they are little things that helped me offer more customization and functionality in my app. I'm admittedly a Javascript noob so if you see something that you have a better solution for feel free to share it. Storing Window ID's This is pretty basic, but you'll see me using the IDs throughout my post so I figured I might as well cover it. function getWinID(name, ID){ //Start the process of the window named, retrieve and save its ID, and then end the process if it is not the main window. overwolf.windows.obtainDeclaredWindow(name, function(result){ if (result.status == "success"){ localStorage.setItem(ID, result.window.id); if(name != "MainWindow") overwolf.windows.close(result.window.id); } } ); }; //Get ID's of each window. Window name works 90% of the time but I still use the IDs just in case getWinID("MainWindow",'MainID'); getWinID("otherWindows", 'otherWindowsID'); GameInfo change handler overwolf.games.onGameInfoUpdated.addListener( function(data){ var closeOnEnd = <User's settings>; var minimizeOnTab = <User's settings>; var restoreOnTab = <User's settings>; if(closeOnEnd == true){ if(data.runningChanged == true){ overwolf.games.getRunningGameInfo( function(test){ if(test == null) overwolf.windows.close(localStorage.getItem("MainID")); //game closed so close the app }); } } if(data.focusChanged === true){ if(data.gameInfo.isInFocus === true){ if(restoreOnTab === true){ //game is in focus so restore all restoreAllWindows(); } }else{ if(minimizeOnTab === true){ //game is out of focus so minimize all minimizeAllWindows(); } } } }); Detecting app auto-launches The first step is to set up the launch settings in the manifest. { "data": { "launch_events": [{ "event": "GameLaunch", "event_data": { game_ids": [7784] }, "start_minimized": true }], ... ... ... } } After you have set the app to launch minimized, you can use a function like this. I run it shortly after launching: function initLaunch(){ var launch = {}; //Will store all the information gathered about the state of the game and app upon launching overwolf.windows.getCurrentWindow(function(data){ launch.autoLaunch = !data.window.isVisible; /*Because we set the autolaunch to minimize automatically we can assume that not being visible indicates an autolaunch (as long as you didn't make the main window visible prior to running this function).*/ checkRunningGame(); }); function checkRunningGame(){ overwolf.games.getRunningGameInfo(function(data){ if(data !== null){ //this could be shortened of course, but I like my truey falsey launch.focused = data.isInFocus; launch.playing = data.isRunning; }else{ launch.playing = false; launch.focused = false; } // If user doesn't want app to autolaunch, and it autolaunched, close app. if(JSON.parse(localStorage.getItem("userWantsToAutolaunch")) == false && launch.autoLaunch === true) overwolf.windows.close(localStorage.getItem('MainID')); if(launch.autoLaunch === true) console.log("auto-launch"); else if(launch.autoLaunch === false && launch.playing === false) console.log("app launched before the game"); else if(launch.playing === true) console.log("app launched after game") overwolf.windows.restore(localStorage.getItem('MainID')); }); } }; The formatting on this is getting to be a pain and I'm scared to lose my progress so I'm going to submit the post now. I'll be making another post that covers the solutions I came up with regarding recordings.
  7. Its almost over!

    I did the same thing for the deadlines, I worked on my app like crazy the week leading up to the 29th and then hardly touched the app afterwards haha. Thanks! I used Require.js and it seemed like too much of a hassle to get it to cooperate with Angular. I didn't mind codeacademy but I preferred reading the documentation and Eloquent Javascript. It was fun seeing how APIs, libraries, and plugins are added to projects. I was challenged by a few of the algorithms in my program, but the CSS was by far the most frustrating. I had planned to straighten it out and compress it, but as soon as my app looked presentable I never looked back
  8. Its almost over!

    It feels like the contest has been going on forever. This forum has been a great place to find help but there has always been a degree of vagueness if only because of the competition. What division(s) are you guys competing in? How did the contest go for you? I'm also curious how much programming experience the other forum-goers have. This was my first web project ever and I loved making it. I had a little bit of C++ experience in college but I'm still a noob. I started learning Javascript, CSS, and HTML when I heard about this contest. I learned a ton and I think my app turned out ok. I plan on going to a coding bootcamp to pursue web development further. My app is for Warface and it uses the Media API.
  9. Announcing the NVIDIA App Challenge!

    Is the contest truly over now? Almost everywhere said the 29th of November but I just noticed this in the contest rules. ^from http://www.overwolf.com/nvidia-app-challenge/terms.html
  10. App Submission Process

    If we do this, is the update considered our submission to the contest?
  11. false positive for "Replay is already capturing."

    I figure that some of the errors were due to me not using turnOff() before closing the app. Since I changed that the problem hasn't returned. I'm considering it solved unless the problem returns in the future.
  12. Today I have been working and testing my app a lot and it was working without any issues to speak of. Then out of the blue it started giving me the "Replay is already capturing." error and none of my recordings were saving anymore. I closed and reopened the app, but immediately upon calling turnOn() I got the "Already turned on." error. I should mention that I did not have any other Overwolf apps installed and I don't have ShadowPlay or any other recording software set up. (I mention this because one of my beta testers had the same issue and disabling ShadowPlay + restarting his computer fixed it.) I ended up reinstalling Overwolf and deleting everything in AppData/Local/Overwolf. I did not restart my computer, but after reinstalling Overwolf I installed my app and it has been working normally since. This is giving me a great amount of paranoia because I don't have the vaguest notion what caused it. Has anyone else had a similar experience? Edit 1: now I'm getting this as an error when I try to call turnOn() after launching the app: Object {status: "error", error: "Could not start recording.", description: "START_STREAMING_ERROR_ONE_INSTANCE_ALLOW"} Edit 2: I cleared the cache and it didn't fix the problem so I restarted my computer and it hasn't happened again . . . yet.
  13. Game LAUNCH events

    startwindow is set in manifest, that is pretty much all you get to work with.
  14. App Submission Process

    I'm confused about the store_icon option in manifest.json I thought that the pics for the appstore go in the Store folder. Are we supposed to copy Icon.png into the App folder and then put a file path in the manifest as well?
  15. The extend of game events listening

    I recommend looking into the getTextFile() method from Thorwe's IO plugin found here: https://github.com/thorwe/overwolf-plugin-io Regarding image recognition: I haven't messed around with image recognition before and I'm not sure how to start. I found a few APIs but they seem to run your picture against a database to determine if the picture contains puppies. All I want it is to determine if the screenshot is identical or nearly identical to a sample image of a menu in the game since there isn't an event for that. Could someone point me in the right direction?