1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Func _News()
Local $dData = InetRead('https://www.newsletterXX.com/news.php')
If @error Then ConsoleWrite('Error: InetRead - ' & @error & @CRLF)
Local $sData = BinaryToString($dData, 4)
Local $iDelete = FileDelete(@ScriptDir & '\news.php')
Local $hFile = FileOpen(@ScriptDir & '\news.php', 259)
FileWrite($hFile, $sData)
FileClose($hFile)
Local $aArray = IniReadSection(@ScriptDir & '\news.php', 'NEWS')
If @error Then ConsoleWrite('Error: IniReadSection - ' & @error & @CRLF)
For $i = 0 To UBound($aArray) - 1
$previousJournalNews = GUICtrlRead($journalNews)
If $aArray[$i][1] <> "" Then
GUICtrlSetData($journalNews, $aArray[$i][1] & @CRLF, 0)
EndIf
Next
EndFunc |
Partager