Ticket #34: AutoItXTest.au3

File AutoItXTest.au3, 757 bytes (added by Valik, 17 years ago)
Line 
1Global $g_bRegistered = False
2Global Const $nDest = @ScriptDir & "\AutoItX3.dll"
3
4Local Const $x = 0, $y = 0, $w = 100, $h = 100
5Local $oAutoIt = ObjCreate("AutoItX3.Control")
6If Not IsObj($oAutoIt) Then
7        If MsgBox(4100, "", "Install AutoItX?") = 6 Then
8                FileInstall("D:\Program Files\AutoIt3\AutoItX\AutoItX3.dll", $nDest)
9                DllCall($nDest, "int", "DllRegisterServer")
10                $g_bRegistered = True
11                $oAutoIt = ObjCreate("AutoItX3.Control")
12        EndIf
13EndIf
14
15If Not IsObj($oAutoIt) Then
16        Exit MsgBox(4096, "", "Unable to create object.")
17EndIf
18
19MsgBox(4096, "", $oAutoIt.PixelCheckSum($x, $y, $w, $h) & @CRLF & PixelChecksum($x, $y, $w, $h))
20
21Func OnAutoItExit()
22        If $g_bRegistered Then DllCall($nDest, "int", "DllUnregisterServer")
23EndFunc