Jump to content

Script problem need help :(


Recommended Posts

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 by Turkplaya1
Link to comment
Share on other sites

; 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)

NEWHeader1.png

Link to comment
Share on other sites

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

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...