Jump to content
lazure

script froze aftre opening exe file

Recommended Posts

lazure

hi, 

i'm new to autoit, below is a simple script, however the script froze after (script line hi-lighted in red), there is no error shown.

please help.

 

#include <ImageSearch2015.au3>
#include <AutoItConstants.au3>

Global $x1 = 0
Global $y1 = 0

$picture = "C:\Users\home\Desktop\auto\ab.png"
Do
 $result = _ImageSearch($picture, 1, $x1, $y1, 0, 10)

 ConsoleWrite($result)
 Until $result = 1 ;
 If $result = 1 Then

 MouseClick($MOUSE_CLICK_PRIMARY, $x1, $y1, 2)

 Else
 MsgBox(0, "MSG", "END")

 EndIf

Sleep(1000)

MouseClick($MOUSE_CLICK_PRIMARY, 804, 515, 1)

Sleep(5000)

MouseClick($MOUSE_CLICK_PRIMARY, 46, 278, 1)

Sleep(5000)

MouseClick($MOUSE_CLICK_PRIMARY, 88, 469, 1)

MsgBox(0,"activation complete","Enjoy")

Share this post


Link to post
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

×