You probably miss some sleep times between your Leftclicks. Another thing would be to use WinWait("Perfect World International: Eclipse") after WinActivate. That way you're waiting till the window is actually activated.
If you want to use the method of sending packages then i put a test code together which does your DailySign here:
#include <NomadMemory.au3>
HotKeySet("{DELETE}", "_exit")
HotKeySet("{F1}", "SignIn")
func SignIn()
$pid = ProcessExists('elementclient.exe')
_DailySign($pid)
EndFunc
Func _DailySign($pid)
$packet = '9C00'
sendPacket($packet, 2, $pid)
EndFunc ;==>_DailySign
Func _Exit()
Exit
EndFunc ;==>_Exit
While 1
Sleep(10)
WEnd
Func _FloatToHex($floatval)
$sF = DllStructCreate("float")
$sB = DllStructCreate("ptr", DllStructGetPtr($sF))
If $floatval = "" Then Exit
DllStructSetData($sF, 1, $floatval)
$return = DllStructGetData($sB, 1)
Return $return
EndFunc ;==>_FloatToHex
Func _Hex($VALUE, $SIZE = 8, $TYPE = "int")
Local $tmp1, $tmp2, $i
If ($TYPE = "int") Then
$tmp1 = StringRight("000000000" & Hex($VALUE), $SIZE)
ElseIf ($TYPE = "float") Then
$tmp1 = StringRight("000000000" & _FloatToHex($VALUE), $SIZE)
EndIf
For $i = 0 To StringLen($tmp1) / 2 - 1
$tmp2 = $tmp2 & StringMid($tmp1, StringLen($tmp1) - 1 - 2 * $i, 2)
Next
Return $tmp2
EndFunc ;==>_Hex
Func memopen($pid)
;~ MsgBox("","in memopen","")
$kernel32 = DllOpen('kernel32.dll')
Local $mid = DllCall($kernel32, 'int', 'OpenProcess', 'int', 0x1F0FFF, 'int', 1, 'int', $pid)
Return $mid[0]
EndFunc ;==>memopen
Func memclose($mid)
$kernel32 = DllOpen('kernel32.dll')
DllCall($kernel32, 'int', 'CloseHandle', 'int', $mid)
EndFunc ;==>memclose
Func sendPacket($packet, $packetSize, $pid)
;//Declare local variables
Dim $pRemoteThread, $vBuffer, $loop, $result, $OPcode, $processHandle, $packetAddress
;//Open process for given processId
$kernel32 = DllOpen('kernel32.dll')
$processHandle = memopen($pid)
;//Allocate memory for the OpCode and retrieve address for this
$functionAddress = DllCall($kernel32, 'int', 'VirtualAllocEx', 'int', $processHandle, 'ptr', 0, 'int', 0x46, 'int', 0x1000, 'int', 0x40)
;//Allocate memory for the packet to be sent and retrieve the address for this
$packetAddress = DllCall($kernel32, 'int', 'VirtualAllocEx', 'int', $processHandle, 'ptr', 0, 'int', $packetSize, 'int', 0x1000, 'int', 0x40)
$ADDRESS_SENDPACKET = 0x7B8970
$ADDRESS_BASE = 0xDA433C
;//Construct the OpCode for calling the 'SendPacket' function
$OPcode &= '60' ;//PUSHAD
$OPcode &= 'B8' & _Hex($ADDRESS_SENDPACKET) ;//MOV EAX, sendPacketAddress
$OPcode &= '8B0D' & _Hex($ADDRESS_BASE) ;//MOV ECX, DWORD PTR [revBaseAddress]
$OPcode &= '8B4920' ;//MOV ECX, DWORD PTR [ECX+20]
$OPcode &= 'BF' & _Hex($packetAddress[0]) ;//MOV EDI, packetAddress //src pointer
$OPcode &= '6A' & _Hex($packetSize, 2) ;//PUSH packetSize //size
$OPcode &= '57' ;//PUSH EDI
$OPcode &= 'FFD0' ;//CALL EAX
$OPcode &= '61' ;//POPAD
$OPcode &= 'C3' ;//RET
;//Put the OpCode into a struct for later memory writing
$vBuffer = DllStructCreate('byte[' & StringLen($OPcode) / 2 & ']')
For $loop = 1 To DllStructGetSize($vBuffer)
DllStructSetData($vBuffer, 1, Dec(StringMid($OPcode, ($loop - 1) * 2 + 1, 2)), $loop)
Next
;//Write the OpCode to previously allocated memory
DllCall($kernel32, 'int', 'WriteProcessMemory', 'int', $processHandle, 'int', $functionAddress[0], 'int', DllStructGetPtr($vBuffer), 'int', DllStructGetSize($vBuffer), 'int', 0)
;//Put the packet into a struct for later memory writing
$vBuffer = DllStructCreate('byte[' & StringLen($packet) / 2 & ']')
For $loop = 1 To DllStructGetSize($vBuffer)
DllStructSetData($vBuffer, 1, Dec(StringMid($packet, ($loop - 1) * 2 + 1, 2)), $loop)
Next
;//Write the packet to previously allocated memory
DllCall($kernel32, 'int', 'WriteProcessMemory', 'int', $processHandle, 'int', $packetAddress[0], 'int', DllStructGetPtr($vBuffer), 'int', DllStructGetSize($vBuffer), 'int', 0)
;//Create a remote thread in order to run the OpCode
$hRemoteThread = DllCall($kernel32, 'int', 'CreateRemoteThread', 'int', $processHandle, 'int', 0, 'int', 0, 'int', $functionAddress[0], 'ptr', 0, 'int', 0, 'int', 0)
;//Wait for the remote thread to finish
Do
$result = DllCall('kernel32.dll', 'int', 'WaitForSingleObject', 'int', $hRemoteThread[0], 'int', 50)
Until $result[0] <> 258
;//Close the handle to the previously created remote thread
DllCall($kernel32, 'int', 'CloseHandle', 'int', $hRemoteThread[0])
;//Free the previously allocated memory
DllCall($kernel32, 'ptr', 'VirtualFreeEx', 'hwnd', $processHandle, 'int', $functionAddress[0], 'int', 0, 'int', 0x8000)
DllCall($kernel32, 'ptr', 'VirtualFreeEx', 'hwnd', $processHandle, 'int', $packetAddress[0], 'int', 0, 'int', 0x8000)
;//Close the Process
memclose($processHandle)
Return True
EndFunc ;==>sendPacket
With this you can do your Sign in via F1 and close the program again with the delete key :)
A completely different way would be to use ImageSearch to find the buttons, that way it would work basically always.