#RequireAdmin #include #include #include #include #include #include #include #include #include #include #include #include #region ### START Koda GUI section ### Form= $Form1 = GUICreate("Combine Auto", 193, 124, 302, 218) $CMB_METHOD = GUICtrlCreateCombo("", 25, 24, 145, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "SAMSUNG UNLOCK|COOLPAD PRL|ZERO OUT") $BTN_START = GUICtrlCreateButton("Start", 45, 60, 100, 50) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### #region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00000409) --- #region --- Internal functions Au3Recorder Start --- Func _Au3RecordSetup() Opt('WinWaitDelay',100) Opt('WinDetectHiddenText',1) Opt('MouseCoordMode',0) Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '') If $aResult[1] <> '00000409' Then MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000409->' & $aResult[1] & ')') EndIf EndFunc Func _WinWaitActivate($title,$text,$timeout=0) WinWait($title,$text,$timeout) If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) EndFunc _AU3RecordSetup() #endregion --- Internal functions Au3Recorder End --- Opt("WinTitleMatchMode", 2) Opt("MouseCoordMode", 0) HotKeySet("{ESC}", "_exit") $s_bar_handle = ControlGetHandle('CDMA Workshop', "", "[CLASS:TStatusBar; INSTANCE:1]") Global $startup = 1 Global $status_old = 0 Global $status_new = 0 Global $cdma_handle = 0 Global $cdma_handle = WinGetHandle("CDMA Workshop v3.9.0") Global $gsm_handle = WinGetHandle("GSM Tool") Global $esn_file = "P:\NEW AUTO\STATION11\esn11.txt" While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit ;~ Case $BTN_OPEN ;~ _load_esn_list() Case $BTN_START _start_patch() EndSwitch WEnd Func _start_patch() $action_select = ControlCommand($Form1, "", $CMB_METHOD, "GetCurrentSelection", "") ToolTip("Start Patching, please ReConnect Phone...", 1, 1, "") For $i = 0 To 100000000 If $i > 0 Then EndIf $changed = False Do $changed = _check_new_phone() Until $changed $changed = False $result = 10 If ($action_select = "SAMSUNG UNLOCK") Then $result = samsung_unlock() EndIf If ($action_select = "COOLPAD PRL") Then $result = coolpad_PRL() EndIf If ($action_select = "ZERO OUT") Then $result = zero_out() EndIf Next ToolTip("All phones patched, please check FAIL list...", 1, 1, "Ph?n m?m Auto by Dr. Tu?ng") EndFunc ;==>_start_patch Func _check_new_phone() ToolTip("Vui ḷng c?m phone m?i vào !!!", -1, -1); $text = ControlGetText("Properties", "", "Edit4") $check = StringInStr($text, "working properly") If $check > 0 Then $status_new = 1 Else $status_new = 0 EndIf If $startup = 1 Then $status_old = $status_new $startup = 0 Return False EndIf If (($status_old <> $status_new) And $status_new = 1) Then $status_old = $status_new Return True ElseIf (($status_old <> $status_new) And $status_new = 0) Then $status_old = $status_new Return False EndIf EndFunc ;==>_check_new_phone Func samsung_unlock() Global $Title = WinGetHandle("CDMA Workshop v3.9.0 (Model ID - FFA-QSC6195)","") WinActivate($Title) WinWaitActive($Title) controlclick($Title,"","[CLASS:TPanel; INSTANCE:3]","left",1,320, 10) sleep(100) controlclick($Title,"","[CLASS:TButton; INSTANCE:4]","left",1,35, 10) sleep(100) WinWaitActive("Information","") Send("{ENTER}") controlclick($Title,"","[CLASS:TButton; INSTANCE:6]","left",1,24, 15) sleep(100) controlclick($Title,"","[CLASS:TPanel; INSTANCE:3]","left",1,320, 10) Return 1; EndFunc ;==>_Zero_out_Kyocera_mesn Func coolpad_PRL() Global $Title = WinGetHandle("Coolpad PST_V3.1") WinActivate($Title) WinWaitActive($Title) controlclick($Title,"","[CLASS:Button; INSTANCE:4]","left",1,121, 26) sleep(1200) controlclick($Title,"","[CLASS:Button; INSTANCE:6]","left",1,57, 32) sleep(800) WinWaitActive("Open") Send("C:\Documents and Settings\Administrator\Desktop\SPRINT_10043.prl{ENTER}") sleep(1200) controlclick($Title,"","[CLASS:Button; INSTANCE:7]","left",1,150, 19) sleep(1200) controlclick($Title,"","[CLASS:Button; INSTANCE:1]","left",1,73, 15) sleep(2500) WinWaitActive($Title) controlclick($Title,"","[CLASS:Button; INSTANCE:5]","left",1,97, 23) sleep(1200) controlclick($Title,"","[CLASS:SysListView32; INSTANCE:2]","left",1,86, 65) sleep(500) Send("{space}") WinWaitActive($Title) MouseClick("left", 344, 176, 1) sleep(700) MouseClick("left", 823, 144, 1) sleep(200) Send("000000{ENTER}") sleep(1500) controlclick($Title,"","[CLASS:Button; INSTANCE:6]","left",1,84, 35) sleep(2000) controlclick($Title,"","[CLASS:Button; INSTANCE:5]","left",1,97, 23) EndFunc Func zero_out() WinWaitActive(" GSM Tool 1.0.0.0019 By GCPRO-KEY Team Date:( 03-09-2015 )","") WinActive(" GSM Tool 1.0.0.0019 By GCPRO-KEY Team Date:( 03-09-2015 )","") MouseClick("left",385,240,2) Send("A100001B9B3051") MouseClick("left",659,260,1) WinWaitActive("GSM Tool GCPROKEY.","") Send("{ENTER}") sleep(72000) WinActive(" GSM Tool 1.0.0.0019 By GCPRO-KEY Team Date:( 03-09-2015 )","") MouseClick("left",385,240,2) Send("807085b0") MouseClick("left",659,260,1) WinWaitActive("GSM Tool GCPROKEY.","") Send("{ENTER}") Return 1; EndFunc ;==>_Zero_out_Kyocera_mesn Func _exit() Exit 0 EndFunc ;==>_exit