Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic looking for tips on AHK image recongition (Read 5294 times)
Toke
Stormreaver Piker
*
Offline


... or maybe I was just
smoking something.

Posts: 744
Joined: Jan 7th, 2014
looking for tips on AHK image recongition
Sep 21st, 2016 at 2:48pm
Print Post  
I've tried for well over 30 minutes to get the image search function in AHK to recognize a sub image of the DDO screen without success.  I have been able to get it to recognize the sub image when I open the original screen capture.  Also been able to successfully send key substitutions and just blind key send commands to DDO.
I tried to pick a piece of the screen with a non translucent background and nothing that moves.
If you have any tips on maybe the color tolerance options or maybe file resolutions to help make this work, I would appreciate it.
  

If you can roll it you can smoke it.  If you can carve it you can smoke with it.
Back to top
 
IP Logged
 
5 Foot Step
Completionist (i.t.p.)
******
Offline


I Hate Idiots!

Posts: 11119
Location: USA
Joined: Mar 8th, 2014
Gender: Male
Re: looking for tips on AHK image recongition
Reply #1 - Sep 21st, 2016 at 7:30pm
Print Post  
Make your own images. Someone else's are bound to be a different resolution.

Print screen, ms paint, paste, crop.
  

Build links
Endgame Gear Guide
Cannith Crafting Planner link

Warning: May contain outdated cultural depictions.
Back to top
 
IP Logged
 
Toke
Stormreaver Piker
*
Offline


... or maybe I was just
smoking something.

Posts: 744
Joined: Jan 7th, 2014
Re: looking for tips on AHK image recongition
Reply #2 - Sep 21st, 2016 at 7:39pm
Print Post  
Yeah, I did that.  I tried a piece of the map and a snip where my character name was.  Sigh.

I run DDO windowed with a pretty random size.  I assumed the aspect ratio stayed constant and the game used the OS resolution.
  

If you can roll it you can smoke it.  If you can carve it you can smoke with it.
Back to top
 
IP Logged
 
Toke
Stormreaver Piker
*
Offline


... or maybe I was just
smoking something.

Posts: 744
Joined: Jan 7th, 2014
Re: looking for tips on AHK image recongition
Reply #3 - Sep 21st, 2016 at 7:55pm
Print Post  
Moving on.

I got it to work using alt-printscreen, pasting into paint and cutting my little piece out to save as a png file.

One of those two made the difference.  Too lazy to figure out which one Tongue

Edit: I had been using the game's print screen, opening in paint and saving as bitmap.
« Last Edit: Sep 21st, 2016 at 7:55pm by Toke »  

If you can roll it you can smoke it.  If you can carve it you can smoke with it.
Back to top
 
IP Logged
 
eighnuss
Epic Poster
*****
Offline


ด้้้้้ ͩͩͩͩͩͩͩͩͩͩ
ÍŠÍŠÍŠÍŠÍŠÍŠ

Posts: 3468
Location: ด้้้้้็็็็็้้้้้็็็็็  ͩͩͩͩͩͩͩ
Joined: Jan 30th, 2013
Re: looking for tips on AHK image recongition
Reply #4 - Sep 22nd, 2016 at 11:37am
Print Post  
Toke wrote on Sep 21st, 2016 at 7:55pm:
Moving on.

I got it to work using alt-printscreen, pasting into paint and cutting my little piece out to save as a png file.

One of those two made the difference.  Too lazy to figure out which one Tongue

Edit: I had been using the game's print screen, opening in paint and saving as bitmap.


game saves screenies as jpg, jpg is a gay file type that compresses (edits your picture from original version to make it require less data to store a visually similar image)

the science behind your experiences is that the "jpg image" and "in game image" did not match because colors got merged and blended through this compression. the picture matched the picture which is why it worked out of game. the picture did not match the game which is why it failed. by copying with a real printscreen, the image to your clipboard and then pasting and saving, you got the exact image from the screen unaffected by the compression of the jpg encoding that ddo was performing

just an explanation- life works better when u understand why a thing occurred instead of simply that a thing did occur
  

͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊͊DISCLAIMER: This post is provided �as is� for informational purposes only. The Department of Vault
Security (DVS) does not provide any warranties of any kind regarding any information contained within. DVS
does not endorse any commercial product or service referenced in this post or otherwise.ďżźďżź
Back to top
 
IP Logged
 
harharharhar
Epic Poster
*****
Offline


Girthless Trolllicker

Posts: 3421
Joined: Aug 31st, 2012
Gender: Male
Re: looking for tips on AHK image recongition
Reply #5 - Sep 22nd, 2016 at 1:08pm
Print Post  
I'm curious what are you using AHK and image recognition to do?
  
Back to top
 
IP Logged
 
5 Foot Step
Completionist (i.t.p.)
******
Offline


I Hate Idiots!

Posts: 11119
Location: USA
Joined: Mar 8th, 2014
Gender: Male
Re: looking for tips on AHK image recongition
Reply #6 - Sep 22nd, 2016 at 1:16pm
Print Post  
harharharhar wrote on Sep 22nd, 2016 at 1:08pm:
I'm curious what are you using AHK and image recognition to do?


Don't ask, don't tell.
  

Build links
Endgame Gear Guide
Cannith Crafting Planner link

Warning: May contain outdated cultural depictions.
Back to top
 
IP Logged
 
Toke
Stormreaver Piker
*
Offline


... or maybe I was just
smoking something.

Posts: 744
Joined: Jan 7th, 2014
Re: looking for tips on AHK image recongition
Reply #7 - Sep 22nd, 2016 at 2:22pm
Print Post  
harharharhar wrote on Sep 22nd, 2016 at 1:08pm:
I'm curious what are you using AHK and image recognition to do?

I like to bow to the founders' fountain everytime I walk by it.
  

If you can roll it you can smoke it.  If you can carve it you can smoke with it.
Back to top
 
IP Logged
 
Alex DeLarge
Epic Poster
*****
Offline


Get ready for some of
the 'ol in-out, in-out

Posts: 3464
Location: Foggy Albion
Joined: May 11th, 2013
Gender: Male
Re: looking for tips on AHK image recongition
Reply #8 - Sep 22nd, 2016 at 11:55pm
Print Post  
Toke wrote on Sep 22nd, 2016 at 2:22pm:
I like to bow to the founders' fountain everytime I walk by it.


A buddy of mine made a universal script (with png files too) back in the Crucible days.
Granted, I really suck at AHK but even I figured it out, eventually )))
  

Back to top
 
IP Logged
 
fr8o
Dragon Raider
***
Offline



Posts: 274
Joined: Mar 17th, 2014
Re: looking for tips on AHK image recongition
Reply #9 - Sep 24th, 2016 at 4:26pm
Print Post  
Usually I use a combination of ram value reading and image recognition to make a more more or less universal bots for stuff.
  
Back to top
 
IP Logged
 
5 Foot Step
Completionist (i.t.p.)
******
Offline


I Hate Idiots!

Posts: 11119
Location: USA
Joined: Mar 8th, 2014
Gender: Male
Re: looking for tips on AHK image recongition
Reply #10 - Sep 26th, 2016 at 12:31pm
Print Post  
fr8o wrote on Sep 24th, 2016 at 4:26pm:
Usually I use a combination of ram value reading and image recognition to make a more more or less universal bots for stuff.


Ram value...that's awesome. I think I would like to subscribe to your newsletter.
  

Build links
Endgame Gear Guide
Cannith Crafting Planner link

Warning: May contain outdated cultural depictions.
Back to top
 
IP Logged
 
fr8o
Dragon Raider
***
Offline



Posts: 274
Joined: Mar 17th, 2014
Re: looking for tips on AHK image recongition
Reply #11 - Sep 26th, 2016 at 1:40pm
Print Post  
I am pretty sure I have posted about it before, but
WinActivate, Dungeons and Dragons Online ahk_class Turbine Device Class
SetFormat, Float, 0.2
ADDRESSY = 0x01817944
ADDRESSX = 0x01817940
DllCall("ReadProcessMemory", "UInt", ProcessHandle, "UInt", ADDRESSX, "Float*", X, "Uint", 4, "Uint*", 0)
DllCall("ReadProcessMemory", "UInt", ProcessHandle, "UInt", ADDRESSY, "Float*", Y, "Uint", 4, "Uint*", 0)
That should be enough to get you started if you are really interested.
  
Back to top
 
IP Logged
 
Toke
Stormreaver Piker
*
Offline


... or maybe I was just
smoking something.

Posts: 744
Joined: Jan 7th, 2014
Re: looking for tips on AHK image recongition
Reply #12 - Sep 26th, 2016 at 10:02pm
Print Post  
fr8o wrote on Sep 26th, 2016 at 1:40pm:
I am pretty sure I have posted about it before, but
WinActivate, Dungeons and Dragons Online ahk_class Turbine Device Class
SetFormat, Float, 0.2
ADDRESSY = 0x01817944
ADDRESSX = 0x01817940
DllCall("ReadProcessMemory", "UInt", ProcessHandle, "UInt", ADDRESSX, "Float*", X, "Uint", 4, "Uint*", 0)
DllCall("ReadProcessMemory", "UInt", ProcessHandle, "UInt", ADDRESSY, "Float*", Y, "Uint", 4, "Uint*", 0)
That should be enough to get you started if you are really interested.

Will have to try that.  Seems like that would be much more reliable than timing keys up and down.
  

If you can roll it you can smoke it.  If you can carve it you can smoke with it.
Back to top
 
IP Logged
 
fr8o
Dragon Raider
***
Offline



Posts: 274
Joined: Mar 17th, 2014
Re: looking for tips on AHK image recongition
Reply #13 - Sep 27th, 2016 at 2:53am
Print Post  
it is, though you have to find the new values each time they patch the servers.  Only takes 5 minutes though.
  
Back to top
 
IP Logged
 
5 Foot Step
Completionist (i.t.p.)
******
Offline


I Hate Idiots!

Posts: 11119
Location: USA
Joined: Mar 8th, 2014
Gender: Male
Re: looking for tips on AHK image recongition
Reply #14 - Sep 30th, 2016 at 3:22pm
Print Post  
Looks like the end of an era...
  

Build links
Endgame Gear Guide
Cannith Crafting Planner link

Warning: May contain outdated cultural depictions.
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint