|
-
May 14th, 2007, 06:23 PM
#1
Thread Starter
New Member
Major Help
Hello everyone, Basically i need the source code in Visual Basic for a
20 x 20 = 40 pixil sqaure area around the mouse to check for the following colours:
Colour 1:
red: 0xF40404
yellow: 0xE87824
Orange: 0xE87824
Colour 2:
teal: 0x209070
blue: 0x083498
white: 0xCCE0D0
As soon as any of those colours are found; the letter "A" keystroke is sent followed by a "Left" mouse click. And this is to be looped forever.. Would be great if you can get this toggle on the 2 different sides (Colour 1 and Colour 2) based on Hotkeys.
I'm asking for a lot but hopefully there are other out there who are looking for something like this as well; Thanks in advance if anyone can help. Also if anybody likes here's my version of it in AutoIT, but just to let you know it's SUPER slow, that's why i'm requesting it in VB
http://img201.imageshack.us/img201/1...lcolourdi3.jpg
-
May 15th, 2007, 02:53 AM
#2
Re: Major Help
Where are you checking the colour with the mouse, on a specific control, on a complete form (with all its controls) or even outside your application?
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
May 15th, 2007, 02:58 AM
#3
Hyperactive Member
Re: Major Help
Look up GetPixel() for getting the colour of the pixel.
-> Go to Start->Microsoft Visual Studio 6.0->Microsoft Visual Studio tools-> API viewer
Note: you may need to load a text file called win32API.txt
If GetPixel is not fast enough try GetDIBits
-> http://www.codeguru.com/vb/gen/vb_graphics/gdi/article.php/c2381/
VB prefers if you specify your colours like &HF40404 rather than 0xF40404.
Look up SetKeyboardState() as well, that allows you to force keystrokes.
-> http://www.mvps.org/access/api/api0046.htm
 Originally Posted by user751139
I'm asking for a lot but hopefully there are other out there who are looking for something like this as well; Thanks in advance if anyone can help. Also if anybody likes here's my version of it in AutoIT, but just to let you know it's SUPER slow, that's why i'm requesting it in VB
If you want some serious speed go further down to C++ or C.....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|