lnt900

fshareget.au3

Mar 9th, 2013
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 16.89 KB | None | 0 0
  1. #cs
  2. Fshare Get
  3. Version : 0.2 BETA
  4. ************** Change Log *****************
  5. 0.2 : Changes
  6.     - Clipboard Monitor added, now get links from clipboard when copy
  7.     - Support download links with password
  8.     - Added action to wait 60 secs if duplicated login session with other ones, retry for 4 times
  9.     - Some small fixes
  10.     - Disable/Enable buttons when processing
  11. 0.1 : Initializing
  12. *******************************************
  13. #ce
  14. #include <GUIListBox.au3>
  15. #include <WindowsConstants.au3>
  16. #include <File.au3>
  17. #include <Array.au3>
  18. #include <GuiListView.au3>
  19. #include <GUIConstants.au3>
  20. #include <GuiButton.au3>
  21.  
  22. Global $version = "0.2 BETA"
  23. Global $hListBox,$origHWND,$lastCopied='',$WM_CLIPUPDATE=0x031D
  24. Local $hGUI, $linklist, $dllist, $listviewcontrols, $username, $password, $retry = 0, $loggedin = 0, $cookies[1][2] = [["", ""]], $f = "account.txt"
  25.  
  26. ; GUI
  27. $hGUI = GUICreate("Fshare Get " & $version, 800, 600)
  28. ;GUISetIcon(@SystemDir & "\mspaint.exe", 0)
  29.  
  30. ;Clipboard monitor
  31. $origHWND = DLLCall("user32.dll","int","AddClipboardFormatListener","hwnd",$hGUI)
  32. $origHWND = $origHWND[0]
  33. GUIRegisterMsg($WM_CLIPUPDATE,"OnClipBoardChange")
  34. Func OnClipBoardChange($hWnd, $Msg, $wParam, $lParam)
  35.     ; do what you need when clipboard changes
  36.     CBmonitor(ClipGet())
  37. EndFunc
  38.  
  39. ; Input link box
  40. 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)
  41. $LinkInput = GUICtrlCreateEdit("", 5, 40, 500, 185)
  42.  
  43. ; LIST VIEW
  44. Local $iListView = GUICtrlCreateListView("", 5, 235, 790,180)
  45. _GUICtrlListView_AddColumn($iListView, "Fshare Links", 200)
  46. _GUICtrlListView_AddColumn($iListView, "Download Links", 600)
  47. ;Fshare Links|Download Links
  48.  
  49. ;buttons
  50. $btnGetLink = GUICtrlCreateButton ("Lấy Link Download  >>>", 520,  40, 250, 40)
  51. $btnClearlinks = GUICtrlCreateButton ("Xóa danh sách download", 520,  420, 180, 45)
  52. _GUICtrlButton_Enable($btnClearlinks, False)
  53. $btnSendToIDM = GUICtrlCreateButton ("Gửi link sang IDM", 520,  475, 180, 45)
  54. _GUICtrlButton_Enable($btnSendToIDM, False)
  55. $btnCopy = GUICtrlCreateButton ("Copy links download", 520,  530, 180, 45)
  56. _GUICtrlButton_Enable($btnCopy, False)
  57.  
  58. ;checkbox
  59. ;GUICtrlCreateCheckbox("Xóa list cũ", 710, 20, 80, 20)
  60. ;GUICtrlSetState(-1, $GUI_CHECKED)
  61.  
  62. ; Listbox Progress
  63. $hListBox = _GUICtrlListBox_Create($hGUI, "", 5, 420, 500, 170, BitOR($LBS_NOSEL, $WS_VSCROLL, $WS_HSCROLL, $LBS_HASSTRINGS))
  64. GUISetState(@SW_SHOW)
  65. _GUICtrlListBox_ResetContent($hListBox)
  66. ;_GUICtrlListBox_InitStorage($hListBox, 100, 4096)
  67. addText("Fshare Get " & $version & ' Started ...',$hListBox);
  68. addText("[Info] Open Source Project founded by lnt900 @ HDVietnam forum",$hListBox)
  69. addText("----------------------------------------------------------------------------------------",$hListBox)
  70.  
  71.  
  72. ;function to add text and scroll listbox to bottom
  73. Func addText($txt,$listBox)
  74.      _GUICtrlListBox_InsertString($listBox, $txt, -1)
  75.      $num = _SendMessage($hListBox, 0x18B, 0, 0)
  76.     _GUICtrlListBox_SetCurSel($listBox, $num -1)
  77. EndFunc
  78.  
  79. ;account info
  80. Dim $aRecords
  81. If Not _FileReadToArray($f, $aRecords) Then
  82.     $username = ""
  83.     $password = ""
  84. ElseIf $aRecords[0] > 1 Then
  85.     $username = $aRecords[1]
  86.     $password = $aRecords[2]
  87.     addText("[Account] Sử dụng tài khoản " & $username & " ...",$hListBox)
  88. EndIf
  89.  
  90. ; GROUP / Input fshare account
  91. GUICtrlCreateGroup("Thông tin Fshare Account", 520, 80,250,145)
  92. GUICtrlCreateLabel("Email :", 540, 100)
  93. $txtAccEmail = GUICtrlCreateInput($username, 540, 115, 210, 22)
  94. GUICtrlCreateLabel("Mật khẩu :", 540, 140)
  95. $txtAccPassword = GUICtrlCreateInput($password, 540, 155, 210, 22, 0x0020)
  96. $btnSaveAccInfo = GUICtrlCreateButton ("Lưu lại", 600,  185, 100, 25)
  97. GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group
  98.  
  99. ;function to save account to tzt file
  100. Func saveAcc($usr, $pw,$file)
  101.     $usrx = GUICtrlRead($usr)
  102.     $pwx = GUICtrlRead($pw)
  103.     FileDelete($file)
  104.     $fxx = FileOpen($file, 1)
  105.     FileSetPos($fxx,0,0)
  106.     FileFlush($fxx)
  107.     FileWrite($fxx, $usrx & @CRLF)
  108.     FileWrite($fxx, $pwx & @CRLF)
  109.     FileClose($fxx)
  110.     addText("[Account] Đã lưu thông tin tài khoản fshare ...",$hListBox)
  111. EndFunc
  112.  
  113. ;function logout of fshare
  114. Func logoutF()
  115.     addText("[Fshare] Logout khỏi fshare ...",$hListBox)
  116.     $res = getHTTP("http://www.fshare.vn/logout.php", mkCookies())
  117.     $res = getHTTP("http://www.fshare.vn/", mkCookies(), 'http://www.fshare.vn/logout.php')
  118.     If StringInStr($res[2], "login.php") <> 0 Then
  119.         addText("  -> Đã thoát.",$hListBox)
  120.         $loggedin = 0
  121.     Else
  122.         addText("[Lỗi] chưa thoát được khỏi fshare !",$hListBox)
  123.     EndIf
  124. EndFunc
  125.  
  126. ;Function Login to Fshare
  127. Func loginF()
  128.     $user = GUICtrlRead($txtAccEmail)
  129.     $pword = GUICtrlRead($txtAccPassword)
  130.     addText("[Fshare] Đăng nhập vào Fshare ...",$hListBox)
  131.     $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)
  132.     $res = getHTTP("http://www.fshare.vn/", mkCookies())
  133.     If StringInStr($res[2], "logout.php") <> 0 Then
  134.         addText("  -> Đăng nhập thành công !",$hListBox)
  135.         If StringInStr($res[2], "VIP.gif") <> 0 Then
  136.             addText("  -> Tài khoản VIP ... OK !",$hListBox)
  137.             $loggedin = 1
  138.         Else
  139.             addText("  -> Không phải tài khoản VIP. Thoát khỏi Fshare ...",$hListBox)
  140.             logoutF()
  141.         EndIf
  142.  
  143.     Else
  144.         addText("  -> Đăng nhập thất bại, kiểm tra lại tk fshare",$hListBox)
  145.     EndIf
  146. EndFunc
  147.  
  148. ;function to parse links input
  149. Func parseLinks($input, $loggoutthen = 1)
  150.     ;$links = GUICtrlRead($input)
  151.     $links = StringReplace($input, @CRLF, " ")
  152.     $links = StringReplace($links, @TAB, " ")
  153.     $aLink = StringSplit($links, " ")
  154.     $hasfsharelinks = StringRegExp($links,'htt(.*?):/(.*?)fshare.vn/(.*?)')
  155.  
  156.     If $hasfsharelinks = 1 Then
  157.         _GUICtrlButton_Enable($btnGetLink, False)
  158.         If $loggedin = 0 Then
  159.             ;Login to Fshare
  160.             loginF()
  161.         EndIf
  162.  
  163.         If $loggedin = 1 Then
  164.             For $x=1 To $aLink[0]
  165.                 If $loggedin = 1 Then
  166.                     $retry = 0
  167.                     parseLink($aLink[$x])
  168.                 EndIf
  169.             Next
  170.         EndIf
  171.  
  172.         If $loggoutthen = 1 And $loggedin = 1 Then
  173.             logoutF()
  174.         EndIf
  175.  
  176.         If $retry < 4 Then
  177.             addText("[OK] Đã xử lý xong tất cả các links !",$hListBox)
  178.         Else
  179.             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)
  180.             $retry = 0
  181.         EndIf
  182.         _GUICtrlButton_Enable($btnGetLink, True)
  183.     Else
  184.         addText("[Lỗi] Không có link fshare trong danh sách link !",$hListBox)
  185.     EndIf
  186. EndFunc
  187.  
  188. ;function to get fshare download link
  189. Func parseLink($lnk)
  190.     $validLink = StringRegExp($lnk,'htt(.*?):/(.*?)fshare.vn/file(.*?)')
  191.     $isfolder = StringRegExp($lnk,'htt(.*?):/(.*?)fshare.vn/folder(.*?)')
  192.     If $validLink = 1 Then
  193.  
  194.  
  195.         If StringInStr($lnk, '|') <> 0 Then
  196.             ;$lnk = StringReplace($lnk, '*', '|')
  197.             $plink = StringSplit($lnk, '|')
  198.             $lnk = $plink[1]
  199.             $dlpw = $plink[2]
  200.         Else
  201.             $dlpw = ''
  202.         EndIf
  203.  
  204.         If StringInStr($lnk, '?') <> 0 Then
  205.             $plink = StringSplit($lnk, '?')
  206.             $slink = $plink[1]
  207.             addText("[Fshare] Lấy link cho file " & $slink & " ...",$hListBox)
  208.             $res = getHTTP($lnk, mkCookies(), $slink, 1, 1)
  209.         Else
  210.             $slink = $lnk
  211.             addText("[Fshare] Lấy link cho file " & $slink & " ...",$hListBox)
  212.             $res = getHTTP($lnk, mkCookies(), '', 1)
  213.         EndIf
  214.  
  215.  
  216.         If (StringInStr($res[2], "logout.php") <> 0) Or ($res[1] = 1) Then
  217.             If $res[1] = 1 Then
  218.                 ;GUICtrlSetData($LinkInput,GUICtrlRead($LinkInput) & @CRLF & "Có redir đến " & $res[0])
  219.                 $listviewcontrols = arradd($listviewcontrols, GUICtrlCreateListViewItem($slink & "|" & $res[0], $iListView))
  220.                 $linklist = arradd($linklist, $res[0])
  221.                 $dllist = arradd($dllist, $slink)
  222.                 _GUICtrlButton_Enable($btnClearlinks, True)
  223.                 _GUICtrlButton_Enable($btnCopy, True)
  224.                 _GUICtrlButton_Enable($btnSendToIDM, True)
  225.                 addText("  -> Done.",$hListBox)
  226.             ElseIf StringInStr($res[2], "vip_package_bt.png") <> 0 AND StringInStr($res[2], "fshare.vn/vip") <> 0 Then
  227.                 $arr = StringRegExp($res[2], '<form action="(.*?)" method="post" name="frm_download">', 3)
  228.                 If UBound($arr) > 0 Then
  229.                     ;GUICtrlSetData($LinkInput,GUICtrlRead($LinkInput) & @CRLF & "Lấy được link download " & $arr[0])
  230.                     $listviewcontrols = arradd($listviewcontrols, GUICtrlCreateListViewItem($slink & "|" & $arr[0], $iListView))
  231.                     $linklist = arradd($linklist, $arr[0])
  232.                     $dllist = arradd($dllist, $slink)
  233.                     _GUICtrlButton_Enable($btnClearlinks, True)
  234.                     _GUICtrlButton_Enable($btnCopy, True)
  235.                     _GUICtrlButton_Enable($btnSendToIDM, True)
  236.                     addText("  -> Done.",$hListBox)
  237.                 EndIf
  238.             ElseIf StringInStr($res[2], "vip_package_bt.png") <> 0 AND StringInStr($res[2], '<input type="text" name="link_file_pwd_dl"/>') <> 0 Then
  239.                 addText("  -> Link Download có mật khẩu ...",$hListBox)
  240.                 If StringInStr($res[2], '<ul class="message-error">') <> 0 Then
  241.                     $announce = 'Mật khẩu không đúng. Nhập lại ?'
  242.                 Else
  243.                     $announce = 'File này yêu cầu nhập mật khẩu để tải.'
  244.                 EndIf
  245.  
  246.                 if $dlpw = '' Then
  247.                     $filename = StringRegExp($res[2], '<p><b>(.*?):</b>(.*?)</p>', 3)
  248.                     $pos = WinGetPos($hGUI)
  249.                     $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)
  250.                     If $dlpw = '' Then
  251.                         $err = '[Fshare] Bỏ qua link ' & $slink & ' -> unknown error !'
  252.                         Select
  253.                             Case @error = 0
  254.                                 $err = '[Fshare] Bỏ qua link ' & $slink & ' -> bởi người dùng'
  255.                             Case @error = 1
  256.                                 $err = '[Fshare] Bỏ qua link ' & $slink & ' -> bởi người dùng'
  257.                             Case @error = 2
  258.                                 $err = '[Fshare] Bỏ qua link ' & $slink & ' -> Timeout 15s'
  259.                         EndSelect
  260.                     EndIf
  261.                 EndIf
  262.  
  263.                 If $dlpw = '' Then
  264.                     addText($err ,$hListBox)
  265.                 Else
  266.                     $fileid = StringRegExp($res[2], '<input type="hidden" name="file_id" value="(.*?)"/>', 3)
  267.                     $newlnk = $lnk & '?action=download_file&file_id=' & $fileid[0] & '&link_file_pwd_dl=' & URLEncode($dlpw)
  268.                     parseLink($newlnk)
  269.                 EndIf
  270.             ElseIf StringInStr($res[2], '<ul class="message-error">') <> 0 Then
  271.                 addText("[Fshare][Lỗi] Có thể đang trùng phiên đăng nhập với người khác !",$hListBox)
  272.                 logoutF()
  273.                 addText(" -> Đợi xử lý lại sau 1 phút ...",$hListBox)
  274.                 $retry += 1
  275.                 If $retry < 4 Then
  276.                     Sleep(60000)
  277.                     loginF()
  278.                     parseLink($lnk)
  279.                 EndIf
  280.             Else
  281.                 addText("[Fshare] Error: No Download Link !",$hListBox)
  282.             EndIf
  283.         EndIf
  284.         Sleep(300)
  285.     ElseIf $isfolder = 1 Then
  286.         addText("[Fshare] Link " & $lnk & " là thư mục !",$hListBox)
  287.         $res = getHTTP($lnk, mkCookies(), '', 1)
  288.         If StringInStr($res[2], "fshare.vn/file/") <> 0 Then
  289.             $arr = StringRegExp($res[2], '<a href="(.*?)" target="_blank"><span class="filename">', 3)
  290.             addText("[Fshare] Có " & UBound($arr) & " file trong thư mục ...",$hListBox)
  291.             ;parseLinks(_ArrayToString($arr, " "), 0)
  292.             For $i = 0 To UBound($arr) - 1
  293.                 parseLink($arr[$i])
  294.             Next
  295.         Else
  296.             addText("[Fshare] Thư mục trống !",$hListBox)
  297.         EndIf
  298.     EndIf
  299. EndFunc
  300.  
  301. ;function to get/post http links
  302. Func getHTTP($lnk, $cookie = '', $refer = '', $ignorecookies = 0, $post = 0, $redir = 0)
  303.     $method = "GET"
  304.     $weblink = StringSplit($lnk, '?')
  305.     ;addText($weblink[2],$hListBox)
  306.     If $post = 1 Then
  307.         $method = "POST"
  308.         $linklink = $weblink[1]
  309.         $poststring = $weblink[2]
  310.     Else
  311.         $linklink = $lnk
  312.     EndIf
  313.  
  314.     $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
  315.     If $redir = 0 Then
  316.         $oHTTP.Option(6) = False
  317.     EndIf
  318.     $oHTTP.Open($method, $linklink , False)
  319.     $oHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0")
  320.     If StringLen($refer)>1 Then
  321.         $oHTTP.SetRequestHeader("Referer", $refer)
  322.     EndIf
  323.     If StringLen($cookie)>1 Then
  324.         $oHTTP.SetRequestHeader("Cookie", $cookie)
  325.     EndIf
  326.     If $post = 1 Then
  327.         $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
  328.         $oHTTP.SetRequestHeader("Content-Length", StringLen($poststring))
  329.         $oHTTP.Send($poststring)
  330.     Else
  331.         $oHTTP.Send()
  332.     EndIf
  333.     $oHTTP.WaitForResponse
  334.     $HeaderResponses = $oHTTP.GetAllResponseHeaders()
  335.  
  336.     If $ignorecookies = 0 Then
  337.         ; Handle Cookies
  338.         $array = StringRegExp($HeaderResponses, 'Set-Cookie: (.+)\r\n', 3)
  339.         ;$cookies = ''
  340.         for $i = 0 to UBound($array) - 1
  341.             ; Add all cookies to a single string, and then clean it up.
  342.             $cook = $array[$i] & ';'
  343.             ; Removing parts we do not use..
  344.             $cook = StringRegExpReplace($cook, "( path| domain| expires)=[^;]+", "")
  345.             $cook = StringRegExpReplace($cook, " HttpOnly", "")
  346.             $cook = StringRegExpReplace($cook, "[;]{2,}", ";")
  347.  
  348.             $cook1 = StringSplit($cook,";")
  349.             For $k=1 To $cook1[0]
  350.                 If StringInStr($cook1[$k],"=") Then
  351.                     $cook2 = StringSplit(StringReplace($cook1[$k]," ", ""),"=")
  352.                     if $cookies[0][0] == "" Then
  353.                         $cookies[0][0] = $cook2[1]
  354.                         $cookies[0][1] = $cook2[2]
  355.                     Else
  356.                         $inserted = 0
  357.                         for $j = 0 to UBound($cookies) - 1
  358.                             If $cook2[1] == $cookies[$j][0] Then
  359.                                 $cookies[$j][1] = $cook2[2]
  360.                                 $inserted = 1
  361.                             ElseIf ($j == (UBound($cookies) - 1)) And ($inserted == 0) Then
  362.                                 ReDim $cookies[UBound($cookies) + 1][2]
  363.                                 $cookies[UBound($cookies) - 1][0] = $cook2[1]
  364.                                 $cookies[UBound($cookies) - 1][1] = $cook2[2]
  365.  
  366.                             EndIf
  367.                         Next
  368.                     EndIf
  369.                 EndIf
  370.             Next
  371.  
  372.         Next
  373.     EndIf
  374.  
  375.     Dim $ret[4]
  376.     If StringInStr($HeaderResponses, "Location:") <> 0 Then
  377.         $ret["0"] = $oHTTP.GetResponseHeader("Location")
  378.         $ret["1"] = 1
  379.     Else
  380.         $ret["0"] = ""
  381.         $ret["1"] = 0
  382.     EndIf
  383.     $ret["2"] = $oHTTP.Responsetext
  384.     ;$ret["method"] = $method
  385.     $ret["3"] = $oHTTP.GetAllResponseHeaders()
  386.  
  387.     Return $ret
  388. EndFunc
  389.  
  390. ;function to encode url for websurfing
  391. Func URLEncode($urlText)
  392.     $url = ""
  393.     For $i = 1 To StringLen($urlText)
  394.         $acode = Asc(StringMid($urlText, $i, 1))
  395.         Select
  396.             Case ($acode >= 48 And $acode <= 57) Or _
  397.                     ($acode >= 65 And $acode <= 90) Or _
  398.                     ($acode >= 97 And $acode <= 122)
  399.                 $url = $url & StringMid($urlText, $i, 1)
  400.             Case $acode = 32
  401.                 $url = $url & "+"
  402.             Case Else
  403.                 $url = $url & "%" & Hex($acode, 2)
  404.         EndSelect
  405.     Next
  406.     Return $url
  407. EndFunc
  408.  
  409. ;function to make cookies from array
  410. Func mkCookies()
  411.     $rt = ""
  412.     for $j = 0 to UBound($cookies) - 1
  413.         $rt = $rt & $cookies[$j][0] & "=" & $cookies[$j][1]
  414.         If $j <> (UBound($cookies) - 1) Then
  415.             $rt = $rt & "; "
  416.         EndIf
  417.     Next
  418.     Return $rt
  419. EndFunc
  420.  
  421. ;function to add element to array ( fuck autoit )
  422. Func arradd($array, $value)
  423.     If IsArray($array) Then
  424.         _ArrayAdd($array, $value)
  425.         Return $array
  426.     Else
  427.         Dim $rt[1] = [$value]
  428.         Return $rt
  429.     EndIf
  430. EndFunc
  431.  
  432. ;function to clear links list
  433. Func ClearLinks()
  434.     $linklist = 0
  435.     $dllist = 0
  436.     GUICtrlSetData($LinkInput,'')
  437.     For $i = 0 to UBound($listviewcontrols) - 1
  438.         GUICtrlDelete($listviewcontrols[$i])
  439.     Next
  440.     $listviewcontrols = 0
  441.     _GUICtrlButton_Enable($btnClearlinks, False)
  442.     _GUICtrlButton_Enable($btnCopy, False)
  443.     _GUICtrlButton_Enable($btnSendToIDM, False)
  444. EndFunc
  445.  
  446. ;function to send download links to IDM
  447. Func SendToIDM()
  448.     If UBound($linklist) > 0 Then
  449.         $clsid = "{AC746233-E9D3-49CD-862F-068F7B7CCCA4}"
  450.         $idd = "{4BD46AAE-C51F-4BF7-8BC0-2E86E33D1873}"
  451.         $desc = "SendLinkToIDM hresult(bstr;bstr;bstr;bstr;bstr;bstr;bstr;bstr;long);"
  452.         $idm = ObjCreateInterface($clsid,$idd,$desc)
  453.         For $i = 0 to UBound($linklist) - 1
  454.             $idm.SendLinkToIDM($linklist[$i], $dllist[$i], '', '', '', '','', '', 2)
  455.         Next
  456.         addText("[IDM] Đã gửi link download sang IDM",$hListBox)
  457.     EndIf
  458. EndFunc
  459.  
  460. ;function executing when clipboard changed
  461. Func CBmonitor($data)
  462.     If $data<>$lastCopied Then
  463.         $lastCopied=$data
  464.         $isfsharelinks = StringRegExp($data,'htt(.*?):/(.*?)fshare.vn/(.*?)')
  465.         If $isfsharelinks = 1 Then
  466.             addText("[Clipboard Monitor] Đã lấy link fshare từ clipboard",$hListBox)
  467.             $ctb = GUICtrlRead($LinkInput)
  468.             If StringLen($ctb)>0 Then
  469.                 $ctb = $ctb & @CRLF
  470.             EndIf
  471.             GUICtrlSetData($LinkInput,$ctb & $data)
  472.         EndIf
  473.     EndIf
  474. EndFunc
  475.  
  476. ; GUI MESSAGE LOOP
  477. While 1
  478.     $msg = GUIGetMsg()
  479.     Select
  480.         Case $msg = $GUI_EVENT_CLOSE
  481.             ExitLoop
  482.         Case $msg = $btnGetLink
  483.             parseLinks(GUICtrlRead($LinkInput))
  484.         Case $msg = $btnClearlinks
  485.             ClearLinks()
  486.         Case $msg = $btnSendToIDM
  487.             SendToIDM()
  488.         Case $msg = $btnCopy
  489.             ;_ArrayToClip($linklist);
  490.             ClipPut(_ArrayToString($linklist, @CRLF))
  491.             addText("[Clipboard Monitor] Đã Copy Link vào clipboard",$hListBox)
  492.         Case $msg = $btnSaveAccInfo
  493.             saveAcc($txtAccEmail, $txtAccPassword,$f)
  494.     EndSelect
  495. WEnd
Add Comment
Please, Sign In to add comment