Update: Version 1.1
QUOTE
//Version 1.1 Updated on 10/26 - Ahk
//1.1 changes - Scrape will calculate around the coordinates given
//---Before you probably would have had to compute these yourself, but now it will compute
//---half of the scan before the coordinates given and the other half will be covered as part of the range
//---Removed timestamp for each pixel test, only timestamps at begining and if found.
//You WILL need to update your macro's coordinates to be at the center of the search area.
//1.1 changes - Scrape will calculate around the coordinates given
//---Before you probably would have had to compute these yourself, but now it will compute
//---half of the scan before the coordinates given and the other half will be covered as part of the range
//---Removed timestamp for each pixel test, only timestamps at begining and if found.
//You WILL need to update your macro's coordinates to be at the center of the search area.
I am posting this as it seems to be in popular demand and is a common question.
Plus, I had a use for creating it -- otherwise it probably would not exist
Modify as you wish. Code sample included in comment blocks.
That all said, here's some things I want to say.
Screen Scraping is ONLY useful if you know what you're looking for, and it's actually pretty limited for use with objects. This likely won't be able to find a monster in a 3d game unless you get really lucky, or it has a low-end 2-D graphics engine. For 3-D games, you'll probably need to modify this to search for a pixel color.
Keep your objects as small as possible to speed things up.
It appears ObjLoadWindow does not work for this, so I have not included it with the macro. It may/may not work with color testing.
Save to your AcTool macros folder, or you'll need to put the path of the file in the Include statement...EX: C:\Macros\ScreenScrape.inc
Edit/Note:
This is meant more to be a guide on how you can screen scrape for pixels, objects aren't very useful as far as scraping goes unless you've got an icon like in the example (or other object that doesn't change).
Another note: TimeStamps are hard-coded, and will cause a slight delay, removing them will provide a bit better performance. Don't forget to tweek the delay!
-Ahk
