Hello!
I used to use autohotkey, but since it is not possible to use on the server I play, i have found autoit. It is completely new for me. After few days of reading I have created my own script where
1)pixel should be read at given coordinates
2)if pixel is not there F4 should be sent
Script should be working over and over. Unfortunately for me -
script is not doing anything.
If i use "Not @error" then it is pressing f4 all the time even I'm 100% sure pixel is there.
To explain what this script should do - use mana potion in Lineage2 when mp gets lower.
Can anybody please guide me through the wrong part of my code?
I used to use autohotkey, but since it is not possible to use on the server I play, i have found autoit. It is completely new for me. After few days of reading I have created my own script where
1)pixel should be read at given coordinates
2)if pixel is not there F4 should be sent
Script should be working over and over. Unfortunately for me -
script is not doing anything.
If i use "Not @error" then it is pressing f4 all the time even I'm 100% sure pixel is there.
To explain what this script should do - use mana potion in Lineage2 when mp gets lower.
Can anybody please guide me through the wrong part of my code?
Code:
Func _WinWaitActivate($title,$text,$timeout=0)
WinWait($title,$text,$timeout)
If Not WinActive($title,$text) Then WinActivate($title,$text)
WinWaitActive($title,$text,$timeout)
EndFunc
_WinWaitActivate("Lineage*II * ","")
HotKeySet("{ESC}", "Terminate")
While 1
PixelSearch( 234, 54, 0, 0, 0x234B88)
If @error Then
Send("{F4}")
Sleep (500)
EndIf
WEnd
Func Terminate()
Exit 0
EndFunc