youtuber Posted February 15, 2019 Posted February 15, 2019 (edited) I want to delete the similar data after cycle. #include <array.au3> #include <String.au3> _deletesimilar() Func _deletesimilar() $aReadSmilar = _HttpGet("https://duplicatesimilartest.blogspot.com") For $var = 1 To 10 Step 1 $aBetween = _StringBetween($aReadSmilar, '<p>', '</p>') If IsArray($aBetween) Then $aUniques = _ArrayUnique($aBetween) For $i = 1 To UBound($aUniques) - 1 ConsoleWrite($aUniques[$i] & @CRLF) Next EndIf Next EndFunc ;==>_deletesimilar Func _HttpGet($Url) Local $oHTTP = ObjCreate("Microsoft.XMLHTTP") $oHTTP.Open("GET", $Url, False) $oHTTP.Send() If @error Then $error = 1 $oHTTP = 0 Return SetError(1) EndIf If $oHTTP.Status = 200 Then Local $sReceived = $oHTTP.ResponseText $oHTTP = Null Return $sReceived EndIf $oHTTP = Null Return -1 EndFunc ;==>_HttpGet Spoiler Edited February 15, 2019 by youtuber
Nine Posted February 15, 2019 Posted February 15, 2019 You may want to use mode $STR_ENDNOTSTART for _StringBetween. And I don't understand why you need to repeat 10 times the same code. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
youtuber Posted February 15, 2019 Author Posted February 15, 2019 14 minutes ago, Nine said: And I don't understand why you need to repeat 10 times the same code. Func _deletesimilar() For $var = 1 To 10 Step 1 $aReadSmilar = _HttpGet("https://duplicatesimilartest.blogspot.com/p/" & $var & ".html") $aBetween = _StringBetween($aReadSmilar, '<p>', '</p>') If IsArray($aBetween) Then $aUniques = _ArrayUnique($aBetween) For $i = 1 To UBound($aUniques) - 1 ConsoleWrite($aUniques[$i] & @CRLF) Next EndIf Next EndFunc
Nine Posted February 15, 2019 Posted February 15, 2019 ok, but _stringbetween wont give you the right array. use mode like i said previously “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
youtuber Posted February 15, 2019 Author Posted February 15, 2019 @Nine $STR_ENDNOTSTART Does not delete similar later. Spoiler
Nine Posted February 15, 2019 Posted February 15, 2019 show me _ArrayDisplay ($aBetween) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
youtuber Posted February 15, 2019 Author Posted February 15, 2019 The problem is I'd like to delete the following similar ones cycle. Including those added later
Nine Posted February 15, 2019 Posted February 15, 2019 use _arrayadd for each cycle, and a final _arrayUnique “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now