Psvxe Posted May 5, 2015 Share Posted May 5, 2015 Well basically I need to store data of interfaces. The problem is that it's too slow and the interface is gone by the time it actually 'shoots' the image. Which leaves me with a screenshot of nothing useful. ImageIO.write(ctx.getColorPicker().getBufferedImage(), "JPG", new File(System.getProperty("user.home") + "\\OSBot\\Data\\screenshots\\" + i.getId() + ".jpg"))){ So next thing what came up in my mind was to get the widgets of the interface, which was pretty useless since the parts I'd need from the interface couldn't be stored. And yes, I know the code only works for windows. Quote Link to comment Share on other sites More sharing options...
Botre Posted May 5, 2015 Share Posted May 5, 2015 Which widget/data do you need? Quote Link to comment Share on other sites More sharing options...
Psvxe Posted May 5, 2015 Author Share Posted May 5, 2015 (edited) Which widget/data do you need? Clue map data i was thinking if I could find specific patterns in the map I could figure out which map is the right one with corresponding id. However, that is not needed at all if I could screenshot the map. Edited May 5, 2015 by Psvxe Quote Link to comment Share on other sites More sharing options...
Botre Posted May 5, 2015 Share Posted May 5, 2015 Clue map data i was thinking if I could find specific patterns in the map I could figure out which map is the right one with corresponding id. However, that is not needed at all if I could screenshot the map. But... you basically have full control over the visibility of that interface, just don't close it until your screenshot is ready :p Quote Link to comment Share on other sites More sharing options...
Psvxe Posted May 5, 2015 Author Share Posted May 5, 2015 But... you basically have full control over the visibility of that interface, just don't close it until your screenshot is ready I tried. I'd put the whole damn script on wait for a whole 10 second and it's still too slow. I mean, what the fuck? hahah Quote Link to comment Share on other sites More sharing options...
Botre Posted May 5, 2015 Share Posted May 5, 2015 (edited) How are you checking if the image was written? Also why do you need to write it at all in the first place ? Oo Edited May 5, 2015 by Botre Quote Link to comment Share on other sites More sharing options...
Psvxe Posted May 5, 2015 Author Share Posted May 5, 2015 How are you checking if the image was written? Also why do you need to write it at all in the first place ? Oo return if dir contains screenshot file. Well, I'm writing up a cluesolver. However, I don't have the right tiles for every clue id. This is way I need to gather the id's and figure out the 'clue'. Quote Link to comment Share on other sites More sharing options...
Botre Posted May 5, 2015 Share Posted May 5, 2015 return if dir contains screenshot file. Well, I'm writing up a cluesolver. However, I don't have the right tiles for every clue id. This is way I need to gather the id's and figure out the 'clue'. Your dir checking might be the issue. I know why you want to analyze the image, but why do you need to write it to disk for that? Quote Link to comment Share on other sites More sharing options...
Psvxe Posted May 5, 2015 Author Share Posted May 5, 2015 Your dir checking might be the issue. I know why you want to analyze the image, but why do you need to write it to disk for that? Cause I need to figure out which tile I've to go when I've a specific map clue. The clue doesn't give you automatic the right tile. Quote Link to comment Share on other sites More sharing options...
Botre Posted May 5, 2015 Share Posted May 5, 2015 Cause I need to figure out which tile I've to go when I've a specific map clue. The clue doesn't give you automatic the right tile. My question isn't "why are you analyzing the image?" but rather: "why are you writing the image to the disk (ImageIO.write) to analyze it?". Quote Link to comment Share on other sites More sharing options...
Psvxe Posted May 5, 2015 Author Share Posted May 5, 2015 My question isn't "why are you analyzing the image?" but rather: "why are you writing the image to the disk (ImageIO.write) to analyze it?". Well, so I could automatic gather information overnight and analyze by the next day. Is the question now answered? Don't really get it. Is there a different or better way to do it? O.o Quote Link to comment Share on other sites More sharing options...
Mysteryy Posted May 5, 2015 Share Posted May 5, 2015 Are you going to try and run image recognition on the images to determine which one it is? :facepalm: Quote Link to comment Share on other sites More sharing options...
Botre Posted May 5, 2015 Share Posted May 5, 2015 Well, so I could automatic gather information overnight and analyze by the next day. Is the question now answered? Don't really get it. Is there a different or better way to do it? O.o Image comparison algorithms rarely if ever require you to store the image on disk :p You do realize that there are more than 450 different clues right? Most of them visually very similar too. Even if you are just doing one tier, say easy clues, then you better come up with a really efficient algorithm :p If you are just capturing images to be able to statically link a scroll ID to a specific clue, I really wouldn't recommend doing that, Jagex could break your script in less than 10 seconds (this actually happened last year-ish). Image comparison for maps + OCR for text-based clues = thumbs up. Quote Link to comment Share on other sites More sharing options...
Psvxe Posted May 5, 2015 Author Share Posted May 5, 2015 Image comparison algorithms rarely if ever require you to store the image on disk You do realize that there are more than 450 different clues right? Most of them visually very similar too. Even if you are just doing one tier, say easy clues, then you better come up with a really efficient algorithm If you are just capturing images to be able to statically link a scroll ID to a specific clue, I really wouldn't recommend doing that, Jagex could break your script in less than 10 seconds (this actually happened last year-ish). Image comparison for maps + OCR for text-based clues = thumbs up. Well, I was thinking of grabbing the text messages from a clue and have them compared with the widget text of clue. Then I could search up the right id and have them linked. You get me? haha Quote Link to comment Share on other sites More sharing options...
Alek Posted May 5, 2015 Share Posted May 5, 2015 Utilities.takeScreenshot() Quote Link to comment Share on other sites More sharing options...