 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
tyrzz Guest
|
Posted: Mon Jun 06, 2005 1:03 am Post subject: Help on pixel and random key please |
|
|
i the command when it detects a pixel it press a key
also the command to press a random "f1 - f7" key with a delay of 10 minutes please help |
|
| Back to top |
|
 |
Serenity
Joined: 07 Nov 2004 Posts: 1276
|
Posted: Tue Jun 07, 2005 11:21 am Post subject: |
|
|
*untested*
1. Use Pixelsearch with If in a loop like so:
| Code: | loop
{
pixelsearch, , , 0, 0, 800, 600, 0x44ff99, 10, Fast RGB
if errorlevel <> 0
send, {space}
} |
2. Use the Random command with SetTimer, eg:
| Code: | settimer, gen, 600000 ; 10 mins
gen:
random, key, 1, 7
if key = 1
send, {F1}
if key = 2
send, {F2}
if key = 3
send, {F3}
; etc |
_________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Jun 09, 2005 12:23 am Post subject: |
|
|
thx
i dont really get the pixel part, can you put in as a command thing
like
pixeldetect, <color>, <x, y> |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Jun 09, 2005 2:56 am Post subject: |
|
|
k get the thing now
PixelSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ColorID [, Variation, RGB]
but can someone tell me what OutputVarX, OutputVarY, X1, Y1, X2, Y2 is |
|
| Back to top |
|
 |
Decarlo110
Joined: 15 Dec 2004 Posts: 303 Location: United States
|
|
| Back to top |
|
 |
Guest
|
Posted: Fri Jun 10, 2005 3:27 am Post subject: |
|
|
hm im still having some problem with the pixel detect thing
im using pixelgetcolor, would this be better? cause the pixelsearch confuse me..
my command is
Loop
{
PixelGetColor, 0X619A6D, 75, 346
if ErrorLevel = 0
Send, {CTRLDOWN}{CTRLUP}
else
Sleep, 1
}
but even when there is no color 0X619A6D at the coordinate (75, 346) it would still shoot and it doesnt shop either
another question, i took a screenshot and used a pixel color detecter to detect the color in paint, would that be ok? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Sat Jun 11, 2005 10:47 am Post subject: |
|
|
| Correct the syntax: The first parameter of PixelGetColor should be the output variable. |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Jun 15, 2005 12:46 am Post subject: |
|
|
so.. like 0X619A6D, PixelGetColor, 75, 346 o_O
also would the screen shot then get pixel work..? cause when i freeze the pixel program it wouldnt record the pixel the the game when i alt tab out |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Wed Jun 15, 2005 1:14 am Post subject: |
|
|
See the bottom of the PixelGetColor page in the help file for an example of how to use the syntax.
Also, the following hotkey might help in getting pixel colors from a game while it's running. Each time you press Win+Z, it will put the color under the mouse cursor onto the clipboard:
| Code: | #z:: ; Win+Z
MouseGetPos, X, Y
; Move the cursor out of the way so that it doesn't block the pixel we want.
MouseMove, 10, 10, 5, R ; Move down and to the right a little.
Sleep, 50 ; Might need time to make it reliable.
PixelGetColor, color, %X%, %Y%
MouseMove, %X%, %Y%, 2
clipboard = %clipboard%X%X% Y%Y% Color = %color%`n
return |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|