Hadez 0 Posted December 17, 2010 Im trying to read a shoutbox in real time on a website. It will read each line and then if it sees a string within that line, it will respond. I used: $sUrl = "http://site.com" $oIE = _IECreate($sUrl) $oHWND = _IEPropertyGet($oIE, "hwnd") WinSetState($oHWND, "", @SW_MAXIMIZE) $oForm = _IEFormGetCollection($oIE, 1) $oShoutbox = _IEGetObjByName($oForm, 'shoutbox_form') $sText = _IEBodyReadText($oShoutbox) filewrite(@scriptdir & "\write.txt", $sText) $shoutstring = fileread(@scriptdir & "\write.txt") _Main() Func _Main() Local $aArray1 = _StringBetween($shoutstring, ">>>>>>", "<<<<<<") ;_ArrayDisplay($aArray1, 'Default Search') ;$aArray1[0] = StringReplace($aArray1[0], @CRLF & @CRLF, @CRLF) $aArray1[0] = StringStripWS($aArray1[0], 3) filewrite(@scriptdir & "\filewrite.txt",$aArray1[0]) EndFunc ;==>_Main This gets the correct section for the shoutbox, but i dont know how to only write new lines to the text file. Since i need it to be able to respond when it reads a line, i need it to only read new lines, 1 by 1. Any idea how i go about this? Thanks for any help. Share this post Link to post Share on other sites