AutoHotkey Community

It is currently May 27th, 2012, 11:49 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: PixelSearch ?
PostPosted: July 26th, 2010, 6:31 pm 
I have a couple questions about PixelSearch...

First, is there anyway to make it work in a full screen game? I'm guessing there isn't, I've done some searching, but not found anything conclusive other than recommendations to run the game in window mode.

Secondly, when I have my search running, which is very simple code that scans around 30 pixels all on the same row over and over, the game is less smooth, but my framerate is unchanged regardless of whether the search is running or not. It's very strange to me. I would think that any slow down would also result in a frame rate drop.

I'm running Win 7 x64 on a i5 @ 3.2Ghz with 4GB of DDR1600 and 2 ATI 5770's in CrossfireX if that matters.

Thanks a lot.

Bonus question, would the color of a aiming reticule be stored in memory anywhere? I thought about using CE to see if I could find the color of the aiming reticule and use that instead of a PixelSearch as I'm sure it'd be much, much faster and probably not have that slow down affect...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2010, 2:29 pm 
Offline

Joined: June 4th, 2010, 11:57 am
Posts: 13
try this it works for me on my game in full screen
Code:
Coordmode, Pixel, Screen ;these only have to be ran once
Coordmode, Mouse, Screen ; declare the mouse coords as relative to the screen (top left)

stick it at the top of your script. Im not a pro, still noob realy, but hope it helps :wink: cant help with any of the other questions though im afraid


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2010, 11:25 pm 
Yea, my script has that, still doesn't detect pixels while full screen, always returns 000000 no matter what...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2010, 11:41 pm 
Offline

Joined: January 28th, 2008, 9:40 pm
Posts: 140
Location: KC
well....if we had your script to look at we might be able to help better.

_________________
The early bird gets the worm but the second rat gets the cheese!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 28th, 2010, 12:41 am 
What's the game ? Maybe in fullscreen its a brighter picture ?? If it plays in window its not blocked by the anti cheat so maybe Show us some code, it seems like that's the culprit


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 28th, 2010, 12:47 am 
Offline

Joined: June 4th, 2010, 11:57 am
Posts: 13
Forgot to sign in. The last post was me btw :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: PixelSearch ?
PostPosted: July 28th, 2010, 3:26 pm 
Offline

Joined: December 20th, 2005, 4:15 am
Posts: 165
Location: Malaysia
It sure does. Heck, I used to have Ahk scripts for WoW and EQ2 running in full screen. Just assign the task to a hotkey in your script, and launch it before the game.

Some general Ahk tips for games:

- Both PixelSearch and ImageSearch are lightning fast commands. If you're running them in a loop and you don't insert delays, they'll just go full throttle and run hundreds or even thousands of times every second. Hence the performance hit. There's not much point in scanning a game more than 10 times a second, so insert a Sleep, 100 (delay of 100ms) in your loop and performance should improve.

- Check out the variation parameter in ImageSearch

- PixelSearch and ImageSearch are extremely efficient, so feel free to implement backup searches. i.e. you can search for slightly different colors or you can search at nearby coordinates.

- Try to keep your ImageSearch images small - about 25x25 pixels max

- Limit the search area, if possible

- You might want to look up the #InstallKeybdHook and #UseHook commands. Usually you won't need them, but some games will take over the keyboard.

- Lemming


Some? wrote:
First, is there anyway to make it work in a full screen game? I'm guessing there isn't, I've done some searching, but not found anything conclusive other than recommendations to run the game in window mode.

Secondly, when I have my search running, which is very simple code that scans around 30 pixels all on the same row over and over, the game is less smooth, but my framerate is unchanged regardless of whether the search is running or not. [...]


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, MSN [Bot] and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group