Jump to content

need help writing a very basic script


Recommended Posts

well basically i need it to find the color of a certain location and click it if it is one color and if it is another color to click another location and loop this action...

i figured id take a stab in the dark and attempt to see if i could make some halfass thing work and it didnt so im bringing it here to ask......this is the information and hopefully yall can see what i was trying to do and fix it up for me :P

if PixelGetColor(595,511) = 2C375A

then mouseclick("left" [,595,511]

if PixelGetColor(595,511) = 292929

then mouseclick("left" [,594,556]

Link to comment
Share on other sites

try,

if PixelGetColor(595,511) = Dec(0x2C375A)

edit: just to clarify why...you got the error because hex values have to start with 0x

and had you read the help file, you would know that PixelGetColor returns decimal anyway.

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

If PixelGetColor(595,511) = 2C375A Then

; SOME CODE HERE

EndIf

no, like i said above, hex values must begin with 0x, and pixelgetcolor returns decimal anyway, so that would never work. Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

well this is what ive managed to piece together but am still not able to get it working.......it opens the window, but then doesnt ever perform the mouseclicks >.< im an autoit noob and need some help lol

if PixelGetColor(595,511) = Dec(0x2C375A) then 
; sleep(1000)
; MouseClick("left",595,511)
EndIf

if PixelGetColor(595,511) = Dec(0x292929) then
; sleep(1000)   
; MouseClick("left",595,511)
EndIf
Link to comment
Share on other sites

well this is what ive managed to piece together but am still not able to get it working.......it opens the window, but then doesnt ever perform the mouseclicks >.< im an autoit noob and need some help lol

if PixelGetColor(595,511) = Dec(0x2C375A) then 
; sleep(1000)
; MouseClick("left",595,511)
EndIf

if PixelGetColor(595,511) = Dec(0x292929) then
; sleep(1000)   
; MouseClick("left",595,511)
EndIf
you do know that putting semicolons in the beginning makes the line a comment...right? Remove the semicolons...

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...