AutoItScript Au3 language package for SublimeText including syntax highlighting, comments toggling, auto-completions, build systems for run and compile, Tidy command, IncludeHelper command.
Func DeathByCaptchaDecode($username, $password, $captchaFileName, $timeout)
Local $result[2] = [0, ""]
$result[0] = DeathByCaptchaUpload($username, $password, $captchaFileName)
If 0 < $result[0] Then
Local $deadline = $timeout * 1000
While 0 = StringLen($result[1]) AND 0 < $deadline ;OVER HERE. Change this to '==' or else it breaks
Sleep(10000)
$deadline -= 10000
$result[1] = DeathByCaptchaGetText($result[0])
WEnd
If 0 = StringLen($result[1]) Then
$result[0] = 0
EndIf
EndIf
Return $result
EndFunc
Also, in the 'Func _DeathByCaptchaCall($buf)' , add a sleep(2000) right before '$buf = StringTrimLeft($buf, $n)'. I'm not sure why this would matter, but it was affecting the integrity of the code and was giving me 400 error on an http test.
Func DeathByCaptchaDecode($username, $password, $captchaFileName, $timeout) Local $result[2] = [0, ""] $result[0] = DeathByCaptchaUpload($username, $password, $captchaFileName) If 0 < $result[0] Then Local $deadline = $timeout * 1000 While 0 = StringLen($result[1]) AND 0 < $deadline ;OVER HERE. Change this to '==' or else it breaks Sleep(10000) $deadline -= 10000 $result[1] = DeathByCaptchaGetText($result[0]) WEnd If 0 = StringLen($result[1]) Then $result[0] = 0 EndIf EndIf Return $result EndFunc
Also, in the 'Func _DeathByCaptchaCall($buf)' , add a sleep(2000) right before '$buf = StringTrimLeft($buf, $n)'. I'm not sure why this would matter, but it was affecting the integrity of the code and was giving me 400 error on an http test.