Jump to content
Sign in to follow this  
timginter

Finding images on the screen - DTM or an alternative?

Recommended Posts

timginter

Hello everyone. My first post, but I'll jump straight to the gist ;)

I am writing a rather simple script for a game strategic game. There is a map on the main panel and icons appearing on the map. The icons are always the same and are not affected by antialiasting or any other effect.

I am trying to find the icons on the map. Some I can find just by one pixel - the pixel isn't repeated so it's enough, but will I have to write a function to search the whole screen pixel-by-pixel for the specific colour, or is there something better to return an array of coordinates of pixels with the matching colour?

Other images, though, are more complex and I need to look for a pixel pattern. Basic DTMs (Deformable Template Models) are what I have been using so far, but will I have to write my own function to find the main pixel and then search for sub-pixels or is there something similar already?

Or maybe a better way to find those icons? I'm new to memory editing so I don't event know where to start when it comes to finding stuff other than numbers and text. The Window Info tool doesn't show much either:

Class: WindowsForms10.Window.8.app.0.33c0d9d
Instance: 1
ClassnameNN: WindowsForms10.Window.8.app.0.33c0d9d1
Name: dxBasePanel
Advanced (Class): [NAME:dxBasePanel]
ID: 1311936
Text:
Position: 0, 92
Size: 1480, 911
ControlClick Coords: 804, 305
Style: 0x56000000
ExStyle: 0x00010000
Handle: 0x00000000001404C0

Nothing changes when I hover over an icon. The visible and hidden texts refer only to stuff outside of the main panel.

Does anyone have a different idea on how to handle it? I'll be grateful for any help

Share this post


Link to post
Share on other sites
timginter

Sorry, didn't expect one of the most obvious application for automation to be a taboo here ;)

I script to learn only. The game was just an example - a tool and environment to learn the language. Sorry for violating the rules, anyway

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×