SRL Archive - C/C++ Help and Tutorials

Problems searching the screen!


R0b0t1

2008-05-04 20:15:25

Okay, so when I run that program I just posted about… Well, open it up in Dev-C++ and see yourself (the .exe is an archive… No "I can't get it on my linx distro!' it won't work right without Dev-C++). My screen is 1048x768 or whatever… :( Not nearly the coords it says they are…


Results ( 0, 2099 ) found in 30 milliseconds.

Good news is that it gets about 40ms on my crappy computer :) (actually, if I use subtraction on gettickcount, does it return milliseconds or something smaller?), even if it is scanning wrong… I bet it has to do with the HWND.

Bobarkinator

2008-05-04 22:29:39

What is your problem? Not finding the color?

BTW What installer was that? I like that simple unpacking.

R0b0t1

2008-05-04 22:37:03

Well, my problem is it finds the color… At the location 0, 2099 on a 1024x768 screen :p


I used Peazip to make a .7z file with the 'self-extracting' box ticked, and picked the console GUI.

Bobarkinator

2008-05-04 23:10:10

Well it found the color at 0,2099 on a 1280 x 800 screen also ;) So its a problem with your code.

R0b0t1

2008-05-05 16:57:16

Awww… Damn.


I wonder how I'll fix this one. YAKMAN. Post. Now.

Bobarkinator

2008-05-05 20:27:00

From: R0b0t1
Awww… Damn.


I wonder how I'll fix this one. YAKMAN. Post. Now.


He usually responds if you do that on IRC :p
I'll take a look at your code….maybe.

boberman

2008-05-06 12:31:54

From: R0b0t1
Okay, so when I run that program I just posted about… Well, open it up in Dev-C++ and see yourself (the .exe is an archive… No "I can't get it on my linx distro!' it won't work right without Dev-C++). My screen is 1048x768 or whatever… :( Not nearly the coords it says they are…


Results ( 0, 2099 ) found in 30 milliseconds.

Good news is that it gets about 40ms on my crappy computer :) (actually, if I use subtraction on gettickcount, does it return milliseconds or something smaller?), even if it is scanning wrong… I bet it has to do with the HWND.


heh, gettickcount basically returns the number of clocks the CPU does. So it isn't measurement of time per say. There is a function like convertTickCountToMS or something like that out there. If I remember correctly, getTickCount is somewhat broken on duel core machines (I think, not sure) so it might not be the best method of measuring time.

BTW, not going to run an EXE without the source, I have writen too many viru… I mean, seen too many viruses distributed that way :D. Please make a 7z file or something simular.

R0b0t1

2008-05-06 16:49:19

Bob, you WILL read my code.

[Actually, a member has already DL'ed and run it, but you could try opening it in the WinRAR or 7z explorer windows – if that doesn't work, it should say '7z console sfx' under the file in the Windows Explorer.]

I am going to the the wiz… yakman, the wonderful yakman of oz.

boberman

2008-05-06 17:36:57

Ok, ran the code and got the same results as everyone else. Maybe this is some sort of error code MS give off by default. (1680x1050 for the record..). Haven't looked through the code yet, will in a sec.

R0b0t1

2008-05-06 17:58:43

Man, this is depressing.