Jump to content

Autoit Txt Ye Yazılan Son Satırı Okutma Sorunu


Amilo
 Share

Recommended Posts

@DivaneTR 

 

öncelikle cevabın için çok  teşekkür ederim ancak yanlıs anlamazsanız bir maruzatım daha var

 

örnek vermek gerekirse ;

 

#include <FileConstants.au3>
$Open = FileOpen("deneme.txt", $FO_READ)
$Read = FileReadToArray($Open)
$SonSatir = FileReadLine($Open, UBound($Read))
 
while 1
MsgBox(64,"",$SonSatir)
Sleep(5000)
WEnd

 

 

 
 
 
böyle bir döngü olması gerekiyor. ancak hep aynı son mesaj karşıma cıkıyor . acaba şu şekil yapabilirmiyiz. Mesela program en son mesajı okudu onun altına yenisi gelene kadar okuma yapmayacak 
 
bu arada tekrar teşekkür ederim cevap yazdığın için
Link to comment
Share on other sites

AdlibRegister(_Oku, 5000) ;5 saniyede bir tekrarlar

Func _Oku()
	$Open = FileOpen(@ScriptDir & "\deneme.txt", 0)
	$Read = FileReadToArray($Open)
	$SonSatir = FileReadLine($Open, UBound($Read))
	MsgBox(64,"",$SonSatir)
EndFunc   ;==>_Oku

While 1
WEnd
Link to comment
Share on other sites

Local $fileFullPath = @DesktopDir & "\abc.txt", $fileLastEndLine

While True
$fileTotalLine = StringSplit(FileRead($fileFullPath), @CR)[0]
$fileEndLine = FileReadLine($fileFullPath, $fileTotalLine)
If $fileEndLine <> $fileLastEndLine Then _
ConsoleWrite(StringFormat("EndLine.Updated: " & $fileEndLine & "\n"))
$fileLastEndLine = $fileEndLine
Sleep(500) ; // Optional.
WEnd

İstediğin şey tam olarak bu.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...