AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help on pixel and random key please

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
tyrzz
Guest





PostPosted: Mon Jun 06, 2005 1:03 am    Post subject: Help on pixel and random key please Reply with quote

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

PostPosted: Tue Jun 07, 2005 11:21 am    Post subject: Reply with quote

*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
View user's profile Send private message Visit poster's website
Guest






PostPosted: Thu Jun 09, 2005 12:23 am    Post subject: Reply with quote

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






PostPosted: Thu Jun 09, 2005 2:56 am    Post subject: Reply with quote

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

PostPosted: Thu Jun 09, 2005 4:08 am    Post subject: Reply with quote

PixelSearch
http://www.autohotkey.com/docs/commands/PixelSearch.htm

Right-click the AutoHotkey icon in the system tray and choose Help.
Take time reading through it... it's the best Helpfile i've seen.
_________________
1) The Open Source Definition http://www.opensource.org/docs/definition_plain.php

2) Intuitive. Logical. Versatile. Adaptable. <<AutoHotkey>>
Back to top
View user's profile Send private message
Guest






PostPosted: Fri Jun 10, 2005 3:27 am    Post subject: Reply with quote

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

PostPosted: Sat Jun 11, 2005 10:47 am    Post subject: Reply with quote

Correct the syntax: The first parameter of PixelGetColor should be the output variable.
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Wed Jun 15, 2005 12:46 am    Post subject: Reply with quote

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

PostPosted: Wed Jun 15, 2005 1:14 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group