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 

Can I make it click a colour, then click a button?

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






PostPosted: Sat Oct 10, 2009 9:18 pm    Post subject: Can I make it click a colour, then click a button? Reply with quote

Hey, is it possible to make autohotkey select a colour, click it, and then click another button..

I am playing farmville on facebook, and have made a load of hay bales but want to sell them all.
Back to top
Wandery
Guest





PostPosted: Sat Oct 10, 2009 9:37 pm    Post subject: Reply with quote

You can do that easily with pixelsearch and/or imagesearch depending on what you need it to do.

Look in to both of those, and the Click command

Cheers.
Back to top
jason786



Joined: 10 Oct 2009
Posts: 6

PostPosted: Sat Oct 10, 2009 9:44 pm    Post subject: Reply with quote

Wandery wrote:
You can do that easily with pixelsearch and/or imagesearch depending on what you need it to do.

Look in to both of those, and the Click command

Cheers.


I want it to click an object, and then click on a button that will pop up
Back to top
View user's profile Send private message
Wandery
Guest





PostPosted: Sat Oct 10, 2009 9:52 pm    Post subject: Reply with quote

Then use imagesearch. Look in to it. I'll give you an example.


Code:
CoordMode, Pixel, Screen
ImageSearch, imageX, imageY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, yourimg.bmp ; the smaller and more precise the image the better, you can use printscreen and mspaint to make these easily enough.
If ErrorLevel = 2
 {
    MsgBox, There was a problem with the search
    Return
}
If ErrorLevel = 0
 {
   Click %imageX%, %imageY% right
   return
 }
Else
 {
  Msgbox, There was nothing found.
  Return
 }
Back to top
Free
Guest





PostPosted: Sun Oct 11, 2009 7:01 pm    Post subject: Reply with quote

Here is something that will help you sell your hay bales faster. Right click em and *poof* gone.


If you want a harvester/seller application:
Use the middle mouse button to harvest,
Use the right mouse button to sell.
Press Ctrl-1 to end.



;Farmville Quick Seller and Harvester
;Click the middle mouse button to harvest trees and animals quickly.
;Click the right mouse button to sell something quickly.
;Press Ctrl-1 to end.
;Script by FREE::UsMarineMP@gmail.com



MButton::
{
Click
MouseGetPos, xposi, yposi
yposi+=45
xposi+=10
Click %xposi%, %yposi%
xposi-=10
yposi-=45
MouseMove, %xposi%, %yposi%
}
return

RButton::
{
Click
MouseGetPos, xposi, yposi
yposi+=30
Xposi+=10
Click %xposi%, %yposi%
yposi-=30
xposi-=10
Sleep, 500
Click, 500, 500
MouseMove, %xposi%, %yposi%
}
return



^1::
{
exitapp
}
Back to top
Display posts from previous:   
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