• Log in or sign up for an account here: https://www.sythe.org/login

mouse functions & color checker & running in background

  • Thread starter Thread starter drewboards77
  • Start date Start date
D

drewboards77

Guest
i am relatively skilled at C programming but not at making scripts for rs. i know how functions work and how to run programs and am simply looking for the simple necessary functions to create auto programs for rs. heres a list of functions i would like to find:
1. moving mouse to coordinates, clicking at certain times, etc
2. finding what color the mouse is currently on, searching for a color in the screen
3. being able to minimize the program, making rs the "current open window" and still having the program run in the background. if you invoke a color checking function or a click, do you need to tell it to use the rs screen or can you just have it run normally?
 
Le Monkey
Potamus
Prove it!
Sythe Awards 2011 Winner
Tier 1 Prizebox
Tortoise Penis
Trole
UWotM8?
Wait, do you not have an Archer rank?
Use mouse_event for mouse clicks/moving and GetPixel to determine whether or not a certain color is present.

http://colorcop.net/download <- that helps when finding colors.
 
As for minimizing the window, use FindWindow() and SendMessage()
 
Thanks for the help,
Are those all on stdlib.h or stdio.h??
Anything else I could need or any other recommended functions??
 
Le Monkey
Potamus
Prove it!
Sythe Awards 2011 Winner
Tier 1 Prizebox
Tortoise Penis
Trole
UWotM8?
Wait, do you not have an Archer rank?
#include <windows.h>
 
Hi, I am attempting a similar program. I have successully been able to navigate my mouse to any coordinate i choose on my screen. However when i attempt to gather color information i am using this.

GetPixel(NULL, 3901, 15604)

However, every attempt, at changing any numbers, has resulted in this number.

4294967295

Any one have any idea what it is? Im working it out by writing 1 program to move a mouse, then another program to evaluate pixels and give back the RGB value. And when that rgb value has been found, grab the X and Y coordinates and move the mouse there. However the RGB values arent working.

Thanks for the help.
 
Le Monkey
Potamus
Prove it!
Sythe Awards 2011 Winner
Tier 1 Prizebox
Tortoise Penis
Trole
UWotM8?
Wait, do you not have an Archer rank?
The x and y coords are screen coordinates of the color. Unless you're using a 3901x15604 secreen resolution, that won't work at all.

Correct usage:
int color = GetPixel(GetDC(NULL),screenxcoord,screenycoord);

The color value will be stored in color.
 
Ok, scrap what i said earlier, you probably didnt see it. However i have managed to gather colors from coordinates that i give in. However they're comming out in numbers that im not sure what they are. they dont see like they're just 0x00rrggbb, or rrggbb, or some sort of hex number. they're numbers like.



3955356 at 200x200
62207 at 200x500
also at 200x600 and 200x700


However, 200x0 gives me the number 9934739

Thats too many numbers to be a hex.

Any clue what format this is in so i can break it up into something useable?

Thanks for the help
 
Anyone know how i can fix this or get the correct color information?

Thanks
 
COLORREF x=GetPixel(GetDC(0),100,100);
cout<<"Red Value: "<<GetRValue(x)<<endl;
cout<<"Green Value: "<<GetGValue(x)<<endl;
cout<<"Blue Value: "<<GetBValue(x)<<endl;
 
I put that in there isntead of what i had. and i get this

6332377
Red Value: &#9496;
Green Value: Æ’
Blue Value: `

as my output. Im not sure those are workable values =)

Thanks for all your help =D
 
Runescape Gamblingrunescape gambling
Back
Top