John117 Posted February 26, 2009 Posted February 26, 2009 Hey, Im looking for a quick way to click buttons in flash, they move so clicking the same spot over and over wont work. I wast thinking of a script that made the mouse position move and click over and over. -maybe cover a square area. any other better ideas? Thanks!
anunes Posted February 26, 2009 Posted February 26, 2009 (edited) Hey, Im looking for a quick way to click buttons in flash, they move so clicking the same spot over and over wont work. I wast thinking of a script that made the mouse position move and click over and over. -maybe cover a square area. any other better ideas? Thanks! Try to use pixel color. When the pixel move the mouse moves together. Here's the code I made weeks ago to play flash games: expandcollapse popupHotKeySet( "{F2}", "on_off" ) HotKeySet("!a", "mouse_pos_1") HotKeySet("!q", "mouse_pos_2") HotKeySet("!c", "color_set") HotKeySet("{esc}", "sair") Global $ON = False Global $mousePos1 = MouseGetPos() Global $mousePos2 = MouseGetPos() Global $mouseColor = MouseGetPos() Global $cor = PixelGetColor($mouseColor[0],$mouseColor[1]) Global $cor_hex = "0x"&Hex($cor, 6) While 1 If $ON = True Then $coord = PixelSearch($mousePos1[0], $mousePos1[1], $mousePos2[0], $mousePos2[1], $cor_hex, 15) If IsArray($coord) = 1 Then MouseMove($coord[0], $coord[1], 0) Sleep(2) MouseClick("left") EndIf EndIf WEnd Func on_off() If $ON = True Then $ON = False Else $ON = True EndIf EndFunc Func mouse_pos_1() $mousePos1 = MouseGetPos() MsgBox(0, "Posição", "A posição 1 é: " & $mousePos1[0] & "," & $mousePos1[1]) EndFunc Func mouse_pos_2() $mousePos2 = MouseGetPos() MsgBox(0, "Posição", "A posição 2 é: " & $mousePos2[0] & "," & $mousePos2[1]) EndFunc Func color_set() $mouseColor = MouseGetPos() $cor = PixelGetColor($mouseColor[0],$mouseColor[1]) $cor_hex = "0x"&Hex($cor, 6) MsgBox(0, "Cor", "A cor do pixel nesta posição é: " & $cor_hex) EndFunc Func sair() Exit EndFunc How to use this script: - Press Alt + A to get the right upper corner of the area; - Press Alt + Q to get the left down corner of the area; - Press Alt + C to get the pixel color; - F2 to start the mouse move and click; - F2 to stop the mouse move and click; - Esc to Close the script; Edited February 26, 2009 by anunes
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