Sharkpad Posted June 16, 2017 Share Posted June 16, 2017 im new with autoit how can i add here hotkey. $Variable = PixelSearch(500, 67, 714, 400, 0x02591E) If IsArray($Variable) = True Then MouseClick("Left", $Variable [0], $Variable [1], 1) Else $Variable = PixelSearch(500, 67, 714, 400, 0x239A2A) If IsArray($Variable) = True Then MouseClick("Left", $Variable [0], $Variable [1], 1) Else $Variable = PixelSearch(500, 67, 714, 400, 0x93574E) If IsArray($Variable) = True Then MouseClick("Left", $Variable [0], $Variable [1], 1) Else $Variable = PixelSearch(500, 67, 714, 400, 0x3A0247) If IsArray($Variable) = True Then MouseClick("Left", $Variable [0], $Variable [1], 1) EndIf EndIf EndIf EndIf everytime when i press f2 to start this script once then when i press again f2 to start again unlimited. Link to comment Share on other sites More sharing options...
Sharkpad Posted June 16, 2017 Author Share Posted June 16, 2017 everytime when i press f2 to start once and stop then if i press f2 again to go once again,hope someone will help me. Link to comment Share on other sites More sharing options...
anthonyjr2 Posted June 16, 2017 Share Posted June 16, 2017 Can you reiterate what you mean? If you want a hotkey you need to use HotKeySet("{F2}", "search") Func search() $Variable = PixelSearch(500, 67, 714, 400, 0x02591E) If IsArray($Variable) = True Then MouseClick("Left", $Variable [0], $Variable [1], 1) Else $Variable = PixelSearch(500, 67, 714, 400, 0x239A2A) If IsArray($Variable) = True Then MouseClick("Left", $Variable [0], $Variable [1], 1) Else $Variable = PixelSearch(500, 67, 714, 400, 0x93574E) If IsArray($Variable) = True Then MouseClick("Left", $Variable [0], $Variable [1], 1) Else $Variable = PixelSearch(500, 67, 714, 400, 0x3A0247) If IsArray($Variable) = True Then MouseClick("Left", $Variable [0], $Variable [1], 1) EndIf EndIf EndIf EndIf EndFunc UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI= Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now