; <COMPILER: v1.1.28.00>
#NoEnv
SetWorkingDir %A_ScriptDir%
#KeyHistory, 0
#HotKeyInterval -1
#MaxHotkeysPerInterval 200
#InstallKeybdHook
#SingleInstance, Force
SetKeyDelay 0
SetMouseDelay, 0
#Persistent
SetBatchLines, -1
Chek:
{
strComputer := "."
objWMIService := ComObjGet("winmgmts:{impersonationLevel=impersonate}!\\" . strComputer . "\root\cimv2")
colSettings := objWMIService.ExecQuery("Select * from Win32_OperatingSystem")._NewEnum
While colSettings[objOSItem]
{
serialNumber:=objOSItem.SerialNumber
}
if serialNumber = 00331-10000-00001-AA354
{
Goto, S1
}
Else
{
ExitApp
}
Return
}
S1:
Pause
*~XButton2::
If !GetKeyState("XButton2", "P")
{
}
Else
{
}
Search:
If !GetKeyState("XButton2", "P")
{
}
Else
{
{
Search1:
MouseGetPos, xpos, ypos
zX1:=xpos-5,zX2:=xpos+5,zY1:=ypos-5,zY2:=ypos+5
PixelSearch, VarX, VarY,zX1, zY1, zX2, zY2, 0x3E3C2D, 3, Fast RGB
if !ErrorLevel
{
MouseClick , left
}
Else
{
Goto, Search2
}
Return
Search2:
MouseGetPos, xpos, ypos
zX1:=xpos-5,zX2:=xpos+5,zY1:=ypos-5,zY2:=ypos+5
PixelSearch, VarX, VarY,zX1, zY1, zX2, zY2, 0x3E3C2D, 3, Fast RGB
if !ErrorLevel
{
MouseClick , left
}
Else
{
Goto, Search
}
Return
}
}
Return