Turkplaya1 Posted October 4, 2007 Share Posted October 4, 2007 (edited) hi all, well im really new to this , hope some of you could help me... and check if this script is correct ? While 1 If pixelgetcolor(87,37) = 0xE70018 then sleep(1000) MouseClick("right",493,994) If pixelgetcolor(87,37) = 0x151715 Then sleep(1000) send ("Enter") EndIf WEnd Edited October 4, 2007 by Turkplaya1 Link to comment Share on other sites More sharing options...
Valuater Posted October 4, 2007 Share Posted October 4, 2007 While 1 If PixelGetColor(87, 37) = 0xE70018 Then Sleep(1000) MouseClick("right", 493, 994) EndIf If PixelGetColor(87, 37) = 0x151715 Then Sleep(1000) Send("Enter") EndIf WEnd 8) Link to comment Share on other sites More sharing options...
Turkplaya1 Posted October 4, 2007 Author Share Posted October 4, 2007 wow rly fast answer thanks a lot.. . just another question, how i can change it , so that he just hit 2-3 times they key, and not alle the time :/ Link to comment Share on other sites More sharing options...
Valuater Posted October 4, 2007 Share Posted October 4, 2007 expandcollapse popup; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "ShowMe") ;;;; Body of program would go here ;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Func Terminate() Exit 0 EndFunc ;==>Terminate Func ShowMe() Local $times = 0 While $times <= 3 If PixelGetColor(87, 37) = 0xE70018 Then Sleep(1000) MouseClick("right", 493, 994) $times = $times + 1 EndIf If PixelGetColor(87, 37) = 0x151715 Then Sleep(1000) Send("Enter") $times = $times + 1 EndIf WEnd EndFunc ;==>ShowMe 8) Link to comment Share on other sites More sharing options...
AlmarM Posted October 4, 2007 Share Posted October 4, 2007 Try it with GUICtrlCreateButton() What I mean is try to make 2 - 3 buttons in a GUICreate() with name 1 2 3 or something and if you click them it will do the thing you want Example: $Gui = GUICreate() GUISetState($Gui, @SW_SHOW) $Button_1 = GUICtrlCreateButton() $Button_2 = GUICtrlCreateButton() $Button_3 = GUICtrlCreateButton() Etc Case $msg = $Button_1 If PixelGetColor(87, 37) = 0xE70018 Then Sleep(1000) MouseClick("right", 493, 994) EndIf If PixelGetColor(87, 37) = 0x151715 Then Sleep(1000) Send("Enter") EndIf And do that... Just try something with that Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Turkplaya1 Posted October 4, 2007 Author Share Posted October 4, 2007 wahh, i love you all thank you so much, testing it now Link to comment Share on other sites More sharing options...
Turkplaya1 Posted October 4, 2007 Author Share Posted October 4, 2007 Line 0 Error: "While" statement has no matching "Wend" statement how to solve it Link to comment Share on other sites More sharing options...
Turkplaya1 Posted October 4, 2007 Author Share Posted October 4, 2007 srrryyy my fault it works perfecccccccccctttt Link to comment Share on other sites More sharing options...
Valuater Posted October 4, 2007 Share Posted October 4, 2007 srrryyy my fault it works perfeccccccccccttttWelcome8) 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