Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Could not update variables

$
0
0
Hi All
I have one project, I want to select button 1, the account will change, but it does not seem to work are looking forward to helping

[ autoit ]         
#include <GUIListBox.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <File.au3> #include <Array.au3> #include <GuiListView.au3> #include <GUIConstants.au3> #include <GuiButton.au3> Global $oError = ObjEvent("AutoIt.Error", "_ErrFunc") Global $version = "1.0.2" Global $hListBox,$origHWND,$lastCopied='',$WM_CLIPUPDATE=0x031D Local $hminh_set, $Account_1, $Account_2, $Account_3, $hGUI, $linklist, $dllist, $listviewcontrols, $username, $password, $retry = 0, $loggedin = 0, $cookies[1][2] = [["", ""]], $f = "account.txt", $processing = 0 ; GUI $hGUI = GUICreate("GetLink Fshare " & $version & " - BeGood.Vn", 800, 600) ;GUISetIcon(@SystemDir & "\mspaint.exe", 0) ; Intercept Windows command messages with out own handler GUIRegisterMsg($WM_COMMAND, "_WM_COMMAND") ;Clipboard monitor $origHWND = DLLCall("user32.dll","int","AddClipboardFormatListener","hwnd",$hGUI) If IsArray($origHWND) Then $origHWND = $origHWND[0] EndIf GUIRegisterMsg($WM_CLIPUPDATE,"OnClipBoardChange") Func OnClipBoardChange($hWnd, $Msg, $wParam, $lParam) ; do what you need when clipboard changes CBmonitor(ClipGet()) EndFunc ; Input link box GUICtrlCreateLabel("Fshare links (Đưa link fshare vào đây, phân cách bởi xuống dòng hoặc space)" & @CRLF & "Nếu có mật khẩu thì thêm vào sau link kèm theo ký tự | (vd : link | matkhau) Nếu không nhập mật khẩu cùng link, tool sẽ tự động hỏi.", 5, 3) $LinkInput = GUICtrlCreateEdit("", 5, 40, 500, 185) ; LIST VIEW Local $iListView = GUICtrlCreateListView("", 5, 235, 790,180) _GUICtrlListView_AddColumn($iListView, "Fshare Link", 200) _GUICtrlListView_AddColumn($iListView, "Download Link", 530) _GUICtrlListView_AddColumn($iListView, "Size", 55) ;buttons $btnStop = GUICtrlCreateButton ("DỪNG LẤY LINK !", 520, 40, 250, 40) _GUICtrlButton_Show($btnStop, False) $btnGetLink = GUICtrlCreateButton ("Lấy Link Download >>>", 520, 40, 250, 40) $btnClearlinks = GUICtrlCreateButton ("Xóa danh sách download", 520, 420, 180, 45) _GUICtrlButton_Enable($btnClearlinks, False) $btnSendToIDM = GUICtrlCreateButton ("Gửi link sang IDM", 520, 475, 180, 45) _GUICtrlButton_Enable($btnSendToIDM, False) $btnCopy = GUICtrlCreateButton ("Copy links download", 520, 530, 180, 45) _GUICtrlButton_Enable($btnCopy, False) ;checkbox ;GUICtrlCreateCheckbox("Xóa list cũ", 710, 20, 80, 20) ;GUICtrlSetState(-1, $GUI_CHECKED) ; Listbox Progress $hListBox = _GUICtrlListBox_Create($hGUI, "", 5, 420, 500, 170, BitOR($LBS_NOSEL, $WS_VSCROLL, $WS_HSCROLL, $LBS_HASSTRINGS)) GUISetState(@SW_SHOW) _GUICtrlListBox_ResetContent($hListBox) ;_GUICtrlListBox_InitStorage($hListBox, 100, 4096) addText("GetLink Fshare " & $version & ' - BeGood.Vn',$hListBox); addText("Phần mềm này được xây dựng dựa trên code của bạn lnt900, chỉnh sửa và phát triển thêm bởi Mr.Minh",$hListBox) addText("Mọi thắc mắc các bạn có thể gửi về Email: huuminh@begood.vn, Phần mềm này được chia sẻ và",$hListBox) addText("download duy nhất tại địa chỉ http://begood.vn. Hãy đóng góp account cho chúng tôi bằng cách",$hListBox) addText("gửi tài khoản về địa chỉ email trên hoặc gửi tin nhắn FSHARE VIP 1572606 gửi đến 8777",$hListBox) addText("Cám ơn các bạn !",$hListBox) addText("----------------------------------------------------------------------------------------",$hListBox) ;function to add text and scroll listbox to bottom Func addText($txt,$listBox)      _GUICtrlListBox_InsertString($listBox, $txt, -1) $num = _SendMessage($hListBox, 0x18B, 0, 0) _GUICtrlListBox_SetCurSel($listBox, $num -1) EndFunc ;account info Dim $aRecords If Not _FileReadToArray($f, $aRecords) Then $username = "" $password = "" ElseIf $hminh_set == 1 Then $username = "aaaa" $password = "aaaa" ElseIf $hminh_set == 2 Then $username = "bbbb" $password = "bbbb" ElseIf $hminh_set == 3 Then $username = "ccccc" $password = "cccc" ElseIf $aRecords[0] > 1 Then $usernamed = $aRecords[1] $passwordd = $aRecords[2] addText("[Account] Sử dụng tài khoản " & $username & " ...",$hListBox) EndIf ; Add Link $account_link = GUICtrlCreateButton ("More Account", 710, 420, 80, 45) $homepage_link = GUICtrlCreateButton ("HomePage", 710, 475, 80, 45) $visit_info = GUICtrlCreateButton ("Check Version", 710, 530, 80, 45) ;Account GUIStartGroup() $Account_1 = GUICtrlCreateRadio("Tài khoản 1", 530, 213, 80, 20) $Account_2 = GUICtrlCreateRadio("Tài khoản 2", 610, 213, 80, 20) $Account_3 = GUICtrlCreateRadio("Account.txt", 690, 213, 75, 20) GUICtrlSetState($Account_1, $GUI_CHECKED) ; GROUP / Input fshare account GUICtrlCreateGroup("Thông tin Fshare Account", 520, 80,250,155) GUICtrlCreateLabel("Email :", 540, 100) $txtAccEmail = GUICtrlCreateInput($username, 540, 115, 210, 22) GUICtrlCreateLabel("Mật khẩu :", 540, 140) $txtAccPassword = GUICtrlCreateInput($password, 540, 155, 210, 22, 0x0020) $btnSaveAccInfo = GUICtrlCreateButton ("Lưu lại", 600, 185, 100, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group ;function to save account to tzt file Func saveAcc($usr, $pw,$file) $usrx = GUICtrlRead($usr) $pwx = GUICtrlRead($pw) FileDelete($file) $fxx = FileOpen($file, 1) FileSetPos($fxx,0,0) FileFlush($fxx) If Random() < 0.5 Then $Letter0 = Chr(Random(Asc("A"), Asc("Z"), 1)) $Letter1 = Chr(Random(Asc("a"), Asc("z"), 1)) $Letter2 = Chr(Random(Asc("A"), Asc("Z"), 1)) $Letter3 = Chr(Random(Asc("A"), Asc("Z"), 1)) $Letter4 = Chr(Random(Asc("a"), Asc("z"), 1)) $Letter5 = Chr(Random(Asc("A"), Asc("Z"), 1)) Else $Letter0 = Chr(Random(Asc("a"), Asc("z"), 1)) $Letter1 = Chr(Random(Asc("a"), Asc("z"), 1)) $Letter2 = Chr(Random(Asc("A"), Asc("Z"), 1)) $Letter3 = Chr(Random(Asc("a"), Asc("z"), 1)) $Letter4 = Chr(Random(Asc("A"), Asc("Z"), 1)) $Letter5 = Chr(Random(Asc("A"), Asc("Z"), 1)) Endif $lt = $Letter0 & $Letter1 & $Letter2 & $Letter3 & $Letter4 & $Letter5 FileWrite($fxx, $usrx & @CRLF) FileWrite($fxx, $pwx & @CRLF) FileClose($fxx) addText("[Account] Đã lưu thông tin tài khoản fshare ...",$hListBox) EndFunc ;function logout of fshare Func logoutF() addText("[Fshare] Logout khỏi fshare ...",$hListBox) $res = getHTTP("http://www.fshare.vn/logout.php", mkCookies()) $res = getHTTP("http://www.fshare.vn/", mkCookies(), 'http://www.fshare.vn/logout.php') If StringInStr($res[2], "login.php") <> 0 Then addText(" -> Đã thoát.",$hListBox) $loggedin = 0 Else addText("[Lỗi] chưa thoát được khỏi fshare !",$hListBox) EndIf EndFunc ;Function Login to Fshare Func loginF() $user = GUICtrlRead($txtAccEmail) $pword = GUICtrlRead($txtAccPassword) addText("[Fshare] Đăng nhập vào Fshare ...",$hListBox) $res = getHTTP("https://www.fshare.vn/login.php?url_refe=https%3A%2F%2Fwww.fshare.vn%2Findex.php&login_useremail=" & URLEncode($user) & '&login_password=' & URLEncode($pword), mkCookies(),"https://www.fshare.vn/login.php",0, 1, 0) $res = getHTTP("http://www.fshare.vn/", mkCookies()) If StringInStr($res[2], "logout.php") <> 0 Then addText(" -> Đăng nhập thành công !",$hListBox) If StringInStr($res[2], "VIP.gif") <> 0 Then addText(" -> Tài khoản VIP ... OK !",$hListBox) $loggedin = 1 Else addText(" -> Không phải tài khoản VIP. Thoát khỏi Fshare ...",$hListBox) logoutF() EndIf Else addText(" -> Đăng nhập thất bại, kiểm tra lại tk fshare",$hListBox) EndIf EndFunc ;function to parse links input Func parseLinks($input, $loggoutthen = 1) If $processing = 0 Then $links = StringReplace($input, @CRLF, " ") $links = StringReplace($links, @TAB, " ") $aLink = StringSplit($links, " ") $hasfsharelinks = StringRegExp($links,'http:/(.*?)fshare.vn/(.*?)') If $hasfsharelinks = 1 Then _GUICtrlButton_Show($btnGetLink, False) _GUICtrlButton_Show($btnStop, True) ;_GUICtrlButton_SetText($btnGetLink, "DỪNG LẤY LINK !") $processing = 1 If $loggedin = 0 Then ;Login to Fshare loginF() EndIf If $loggedin = 1 Then For $x=1 To $aLink[0]      If $loggedin = 1 And $processing = 1 Then      $retry = 0      parseLink($aLink[$x])      EndIf Next EndIf If $loggoutthen = 1 And $loggedin = 1 Then logoutF() EndIf If $retry < 4 And $processing = 1 Then addText("[OK] Đã xử lý xong tất cả các links !",$hListBox) ElseIf $retry < 4 And $processing = 0 Then addText("[Fshare] Đã ngừng lấy link !",$hListBox) Else addText("[Lỗi] trùng phiên đăng nhập quá 4 lần, vui lòng thử lại sau vài phút !",$hListBox) $retry = 0 EndIf ;_GUICtrlButton_SetText($btnGetLink, "Lấy Link Download >>>") _GUICtrlButton_Enable($btnStop, True) _GUICtrlButton_Show($btnStop, False) _GUICtrlButton_Show($btnGetLink, True) $processing = 0 Else addText("[Lỗi] Không có link fshare trong danh sách link !",$hListBox) EndIf EndIf EndFunc ;function to get fshare download link Func parseLink($lnk) If $processing = 1 Then $validLink = StringRegExp($lnk,'http:/(.*?)fshare.vn/file(.*?)') $isfolder = StringRegExp($lnk,'http:/(.*?)fshare.vn/folder(.*?)') If $validLink = 1 Then If StringInStr($lnk, '|') <> 0 Then ;$lnk = StringReplace($lnk, '*', '|') $plink = StringSplit($lnk, '|') $lnk = $plink[1] $dlpw = $plink[2] Else $dlpw = '' EndIf If StringInStr($lnk, '?') <> 0 Then $plink = StringSplit($lnk, '?') $slink = $plink[1] addText("[Fshare] Lấy link cho file " & $slink & " ...",$hListBox) $res = getHTTP($lnk, mkCookies(), $slink, 1, 1) Else $slink = $lnk addText("[Fshare] Lấy link cho file " & $slink & " ...",$hListBox) $res = getHTTP($lnk, mkCookies(), '', 1) EndIf If (StringInStr($res[2], "logout.php") <> 0) Or ($res[1] = 1) Then $filesize = "unknown" If $res[1] = 1 Then      ;GUICtrlSetData($LinkInput,GUICtrlRead($LinkInput) & @CRLF & "Có redir đến " & $res[0])      $size = InetGetSize($res[0])      If $size > 1000000000 Then      $filesize = Round($size/(1024^3),2) & " GB"      ElseIf $size > 1000000 Then      $filesize = Round($size/(1024^2),2) & " MB"      ElseIf $size > 1000 Then      $filesize = Round($size/(1024),2) & " KB"      EndIf      $listviewcontrols = arradd($listviewcontrols, GUICtrlCreateListViewItem($slink & "|" & $res[0] & "|" & $filesize, $iListView))      $linklist = arradd($linklist, $res[0])      $dllist = arradd($dllist, $slink)      _GUICtrlButton_Enable($btnClearlinks, True)      _GUICtrlButton_Enable($btnCopy, True)      _GUICtrlButton_Enable($btnSendToIDM, True)      addText(" -> Done.",$hListBox) ElseIf StringInStr($res[2], "vip_package_bt.png") <> 0 AND StringInStr($res[2], "fshare.vn/vip") <> 0 Then      $arr = StringRegExp($res[2], '<form action="(.*?)" method="post" name="frm_download">', 3)      If UBound($arr) > 0 Then      ;GUICtrlSetData($LinkInput,GUICtrlRead($LinkInput) & @CRLF & "Lấy được link download " & $arr[0])      $size = InetGetSize($arr[0])      If $size > 1000000000 Then      $filesize = Round($size/(1024^3),2) & " GB"      ElseIf $size > 1000000 Then      $filesize = Round($size/(1024^2),2) & " MB"      ElseIf $size > 1000 Then      $filesize = Round($size/(1024),2) & " KB"      EndIf      $listviewcontrols = arradd($listviewcontrols, GUICtrlCreateListViewItem($slink & "|" & $arr[0] & "|" & $filesize, $iListView))      $linklist = arradd($linklist, $arr[0])      $dllist = arradd($dllist, $slink)      _GUICtrlButton_Enable($btnClearlinks, True)      _GUICtrlButton_Enable($btnCopy, True)      _GUICtrlButton_Enable($btnSendToIDM, True)      addText(" -> Done.",$hListBox)      EndIf ElseIf StringInStr($res[2], "vip_package_bt.png") <> 0 AND StringInStr($res[2], '<input type="text" name="link_file_pwd_dl"/>') <> 0 Then      addText(" -> Link Download có mật khẩu ...",$hListBox)      If StringInStr($res[2], '<ul class="message-error">') <> 0 Then      $announce = 'Mật khẩu không đúng. Nhập lại ?'      Else      $announce = 'File này yêu cầu nhập mật khẩu để tải.'      EndIf      if $dlpw = '' Then      $filename = StringRegExp($res[2], '<p><b>(.*?):</b>(.*?)</p>', 3)      $pos = WinGetPos($hGUI)      $dlpw = InputBox("Mật khẩu", $slink & @CRLF & '-> ' & $filename[1] & @CRLF & @CRLF & $announce & ' Bỏ trống hoặc Cancel để bỏ qua link này. Nếu không nhập mật khẩu sau 15 giây sẽ tự động bỏ qua', '', '', - 1, 240, $pos[0]+200, $pos[1]+200, 15)      If $dlpw = '' Then      $err = '[Fshare] Bỏ qua link ' & $slink & ' -> unknown error !'      Select      Case @error = 0          $err = '[Fshare] Bỏ qua link ' & $slink & ' -> bởi người dùng'      Case @error = 1          $err = '[Fshare] Bỏ qua link ' & $slink & ' -> bởi người dùng'      Case @error = 2          $err = '[Fshare] Bỏ qua link ' & $slink & ' -> Timeout 15s'      EndSelect      EndIf      EndIf      If $dlpw = '' Then      addText($err ,$hListBox)      Else      $fileid = StringRegExp($res[2], '<input type="hidden" name="file_id" value="(.*?)"/>', 3)      $newlnk = $lnk & '?action=download_file&file_id=' & $fileid[0] & '&link_file_pwd_dl=' & URLEncode($dlpw)      parseLink($newlnk)      EndIf ElseIf StringInStr($res[2], '<ul class="message-error">') <> 0 Then      addText("[Fshare][Lỗi] Có thể đang trùng phiên đăng nhập với người khác !",$hListBox)      logoutF()      addText(" -> Đợi xử lý lại sau 1 phút ...",$hListBox)      $retry += 1      If $retry < 4 Then      Sleep(60000)      loginF()      parseLink($lnk)      EndIf Else      addText("[Fshare] Error: No Download Link !",$hListBox) EndIf EndIf ;Sleep(200) ElseIf $isfolder = 1 Then addText("[Fshare] Link " & $lnk & " là thư mục !",$hListBox) $res = getHTTP($lnk, mkCookies(), '', 1) If StringInStr($res[2], "fshare.vn/file/") <> 0 Then $arr = StringRegExp($res[2], '<a href="(.*?)" target="_blank"><span class="filename">', 3) addText("[Fshare] Có " & UBound($arr) & " file trong thư mục ...",$hListBox) ;parseLinks(_ArrayToString($arr, " "), 0) For $i = 0 To UBound($arr) - 1      parseLink($arr[$i]) Next Else addText("[Fshare] Thư mục trống !",$hListBox) EndIf EndIf Else logoutF() ;_GUICtrlButton_Enable($btnStop, False) ;_GUICtrlButton_SetText($btnGetLink, "Đang dừng ...") EndIf EndFunc ;function to get/post http links Func getHTTP($lnk, $cookie = '', $refer = '', $ignorecookies = 0, $post = 0, $redir = 0) $method = "GET" $weblink = StringSplit($lnk, '?') ;addText($weblink[2],$hListBox) If $post = 1 Then $method = "POST" $linklink = $weblink[1] $poststring = $weblink[2] Else $linklink = $lnk EndIf $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") If $redir = 0 Then $oHTTP.Option(6) = False EndIf $oHTTP.Open($method, $linklink , False) $oHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0") If StringLen($refer)>1 Then $oHTTP.SetRequestHeader("Referer", $refer) EndIf If StringLen($cookie)>1 Then $oHTTP.SetRequestHeader("Cookie", $cookie) EndIf If $post = 1 Then $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.SetRequestHeader("Content-Length", StringLen($poststring)) $oHTTP.Send($poststring) Else $oHTTP.Send() EndIf $oHTTP.WaitForResponse $HeaderResponses = $oHTTP.GetAllResponseHeaders() If $ignorecookies = 0 Then ; Handle Cookies $array = StringRegExp($HeaderResponses, 'Set-Cookie: (.+)\r\n', 3) ;$cookies = '' for $i = 0 to UBound($array) - 1 ; Add all cookies to a single string, and then clean it up. $cook = $array[$i] & ';' ; Removing parts we do not use.. $cook = StringRegExpReplace($cook, "( path| domain| expires)=[^;]+", "") $cook = StringRegExpReplace($cook, " HttpOnly", "") $cook = StringRegExpReplace($cook, "[;]{2,}", ";") $cook1 = StringSplit($cook,";") For $k=1 To $cook1[0] If StringInStr($cook1[$k],"=") Then      $cook2 = StringSplit(StringReplace($cook1[$k]," ", ""),"=")      if $cookies[0][0] == "" Then      $cookies[0][0] = $cook2[1]      $cookies[0][1] = $cook2[2]      Else      $inserted = 0      for $j = 0 to UBound($cookies) - 1      If $cook2[1] == $cookies[$j][0] Then      $cookies[$j][1] = $cook2[2]      $inserted = 1      ElseIf ($j == (UBound($cookies) - 1)) And ($inserted == 0) Then      ReDim $cookies[UBound($cookies) + 1][2]      $cookies[UBound($cookies) - 1][0] = $cook2[1]      $cookies[UBound($cookies) - 1][1] = $cook2[2]      EndIf      Next      EndIf EndIf Next Next EndIf Dim $ret[4] If StringInStr($HeaderResponses, "Location:") <> 0 Then $ret["0"] = $oHTTP.GetResponseHeader("Location") $ret["1"] = 1 Else $ret["0"] = "" $ret["1"] = 0 EndIf $ret["2"] = $oHTTP.Responsetext ;$ret["method"] = $method $ret["3"] = $oHTTP.GetAllResponseHeaders() Return $ret EndFunc ;function to encode url for websurfing Func URLEncode($urlText) $url = "" For $i = 1 To StringLen($urlText)      $acode = Asc(StringMid($urlText, $i, 1))      Select          Case ($acode >= 48 And $acode <= 57) Or _                  ($acode >= 65 And $acode <= 90) Or _                  ($acode >= 97 And $acode <= 122)              $url = $url & StringMid($urlText, $i, 1)          Case $acode = 32              $url = $url & "+"          Case Else              $url = $url & "%" & Hex($acode, 2)      EndSelect Next Return $url EndFunc ;function to make cookies from array Func mkCookies() $rt = "" for $j = 0 to UBound($cookies) - 1 $rt = $rt & $cookies[$j][0] & "=" & $cookies[$j][1] If $j <> (UBound($cookies) - 1) Then $rt = $rt & "; " EndIf Next Return $rt EndFunc ;function to add element to array ( fuck autoit ) Func arradd($array, $value) If IsArray($array) Then _ArrayAdd($array, $value) Return $array Else Dim $rt[1] = [$value] Return $rt EndIf EndFunc ;function to clear links list Func ClearLinks() $linklist = 0 $dllist = 0 GUICtrlSetData($LinkInput,'') For $i = 0 to UBound($listviewcontrols) - 1 GUICtrlDelete($listviewcontrols[$i]) Next $listviewcontrols = 0 _GUICtrlButton_Enable($btnClearlinks, False) _GUICtrlButton_Enable($btnCopy, False) _GUICtrlButton_Enable($btnSendToIDM, False) EndFunc ;function to send download links to IDM Func SendToIDM() If UBound($linklist) > 0 Then $clsid = "{AC746233-E9D3-49CD-862F-068F7B7CCCA4}" $idd = "{4BD46AAE-C51F-4BF7-8BC0-2E86E33D1873}" $desc = "SendLinkToIDM hresult(bstr;bstr;bstr;bstr;bstr;bstr;bstr;bstr;long);" $idm = ObjCreateInterface($clsid,$idd,$desc) For $i = 0 to UBound($linklist) - 1 $idm.SendLinkToIDM($linklist[$i], $dllist[$i], '', '', '', '','', '', 2) Next addText("[IDM] Đã gửi link download sang IDM",$hListBox) EndIf EndFunc Func _ErrFunc() ConsoleWrite("err.number is: " & @TAB & $oError.number & @CRLF & _          "err.windescription:" & @TAB & $oError.windescription & @CRLF & _          "err.description is: " & @TAB & $oError.description & @CRLF & _          "err.source is: " & @TAB & $oError.source & @CRLF & _          "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _          "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _          "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _          "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _          "err.retcode is: " & @TAB & $oError.retcode & @CRLF & @CRLF) EndFunc ;function executing when clipboard changed Func CBmonitor($data) If $data<>$lastCopied Then $lastCopied=$data $isfsharelink = StringRegExp($data,'http://(.*?)fshare.vn/file(.*?)') $isfsharefolder = StringRegExp($data,'http://(.*?)fshare.vn/folder(.*?)') $data = StringReplace($data, @CRLF, " ") $data = StringReplace($data, @TAB, " ") $datax = StringSplit($data, " ") If $isfsharelink = 1 Or $isfsharefolder = 1 Then dim $tmprt For $i = 0 to $datax[0] $i1 = StringRegExp($datax[$i],'http://(.*?)fshare.vn/file(.*?)') $i2 = StringRegExp($datax[$i],'http://(.*?)fshare.vn/folder(.*?)') If $i1 = 1 Or $i2 = 1 Then      $tmprt = arradd($tmprt, $datax[$i]) EndIf Next $data = _ArrayToString($tmprt, @CRLF) addText("[Clipboard Monitor] Đã lấy link fshare từ clipboard",$hListBox) $ctb = GUICtrlRead($LinkInput) If StringLen($ctb)>0 Then $ctb = $ctb & @CRLF EndIf GUICtrlSetData($LinkInput,$ctb & $data) EndIf EndIf EndFunc ;WM_COMMAND overwrite Func _WM_COMMAND($hWnd, $Msg, $wParam, $lParam) If BitAND($wParam, 0x0000FFFF) = $btnStop Then $processing = 0 _GUICtrlButton_Enable($btnStop, False) EndIf      Return $GUI_RUNDEFMSG EndFunc Func _Base64Encode($sData) Local $oXml = ObjCreate("Msxml2.DOMDocument") If Not IsObj($oXml) Then      SetError(1, 1, 0) EndIf Local $oElement = $oXml.createElement("b64") If Not IsObj($oElement) Then      SetError(2, 2, 0) EndIf $oElement.dataType = "bin.base64" $oElement.nodeTypedValue = Binary($sData) Local $sReturn = $oElement.Text If StringLen($sReturn) = 0 Then      SetError(3, 3, 0) EndIf Return $sReturn EndFunc ;Ma hoa Func _Base64Decode($sData) Local $oXml = ObjCreate("Msxml2.DOMDocument") If Not IsObj($oXml) Then      SetError(1, 1, 0) EndIf Local $oElement = $oXml.createElement("b64") If Not IsObj($oElement) Then      SetError(2, 2, 0) EndIf $oElement.dataType = "bin.base64" $oElement.Text = $sData Local $sReturn = BinaryToString($oElement.nodeTypedValue, 4) If StringLen($sReturn) = 0 Then      SetError(3, 3, 0) EndIf Return $sReturn EndFunc ;==>_Base64Decode ; GUI MESSAGE LOOP $link_site = "xxxxxxxxxxxx" $link_homepage = "xxxxxxxxxxxxx" $link_account = "xxxxxxxxxxxxxxx" While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $btnGetLink parseLinks(GUICtrlRead($LinkInput)) Case $msg = $btnClearlinks ClearLinks() Case $msg = $btnSendToIDM SendToIDM() Case $msg = $btnCopy ;_ArrayToClip($linklist); ClipPut(_ArrayToString($linklist, @CRLF)) addText("[Clipboard Monitor] Đã Copy Link vào clipboard",$hListBox) Case $msg = $btnSaveAccInfo saveAcc($txtAccEmail, $txtAccPassword,$f) Case $msg = $visit_info ShellExecute($link_site) Case $msg = $homepage_link ShellExecute($link_homepage) Case $msg = $account_link ShellExecute($link_account) Case $msg = $Account_1      GUICtrlSetData($hminh_set, "1") Case $msg = $Account_2      GUICtrlSetData($hminh_set, "2") Case $msg = $Account_3      GUICtrlSetData($hminh_set, "3") EndSelect WEnd

I'm referring to the

This UI
[ autoit ]      
GUIStartGroup() $Account_1 = GUICtrlCreateRadio("Tài khoản 1", 530, 213, 80, 20) $Account_2 = GUICtrlCreateRadio("Tài khoản 2", 610, 213, 80, 20) $Account_3 = GUICtrlCreateRadio("Account.txt", 690, 213, 75, 20) GUICtrlSetState($Account_1, $GUI_CHECKED)

I set the data by

[ autoit ]         
While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $btnGetLink parseLinks(GUICtrlRead($LinkInput)) Case $msg = $btnClearlinks ClearLinks() Case $msg = $btnSendToIDM SendToIDM() Case $msg = $btnCopy ;_ArrayToClip($linklist); ClipPut(_ArrayToString($linklist, @CRLF)) addText("[Clipboard Monitor] Đã Copy Link vào clipboard",$hListBox) Case $msg = $btnSaveAccInfo saveAcc($txtAccEmail, $txtAccPassword,$f) Case $msg = $visit_info ShellExecute($link_site) Case $msg = $homepage_link ShellExecute($link_homepage) Case $msg = $account_link ShellExecute($link_account) Case $msg = $Account_1      GUICtrlSetData($hminh_set, "1") Case $msg = $Account_2      GUICtrlSetData($hminh_set, "2") Case $msg = $Account_3      GUICtrlSetData($hminh_set, "3") EndSelect WEnd [/code] and it is not work at [code] Dim $aRecords If Not _FileReadToArray($f, $aRecords) Then $username = "" $password = "" ElseIf $hminh_set == 1 Then $username = "aaaa" $password = "aaaa" ElseIf $hminh_set == 2 Then $username = "bbbb" $password = "bbbb" ElseIf $hminh_set == 3 Then $username = "ccccc" $password = "cccc" ElseIf $aRecords[0] > 1 Then $usernamed = $aRecords[1] $passwordd = $aRecords[2] addText("[Account] Sử dụng tài khoản " & $username & " ...",$hListBox) EndIf

Thanks for All

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>