Metin Okuyucu Satırına Git
Komut: textReaderGoTo
İşlem başarıyla tamamlanırsa, okuyucuyu belirtilen satıra taşır.
Sözdizimi
textReaderGoTo --linenumber(Numeric) --file(TextFileReader) (Boolean)=value
Girişler
| Komut Dosyası | Tasarımcı | Zorunlu | AcceptedTypes | Açıklama |
|---|---|---|---|---|
| -- linenumber | Satır Numarası | Zorunlu | Sayı | Okumanın başlayacağı metin içindeki satırın dizin değeri (konumu). |
| -- dosya | Metin okuyucu | Zorunlu | Metin Dosyası Okuyucu | Okuyucu taşıma çizgisinin tanımlandığı metin dosyasını içeren değişken. |
Çıkışlar
| Komut Dosyası | Tasarımcı | AcceptedTypes | Açıklama |
|---|---|---|---|
| değer | Satır numarası | Boole | Metin okuyucu çizgi hareketinin başarısını (Doğru) ya da başarısızlığı (False) gösteren değer. |
Örnek
Moves the reader to the indicated line using the Metin Okuyucu Satırına Git command. Daha önce Okunmak üzere Metin Dosyasını Aç komutunu kullanarak metin okumak için metni açmış olarak kullanırmış.
defVar --name textFileReader --type TextFileReader
defVar --name success --type Boolean
// Open the file informed for reading.
// Download the following file to execute the command.
openTextReader --share "Read" --path "binaryFile.txt" --encoding "Default" textFileReader=value
// Move reader to start line "2" within open text file for reading.
textReaderGoTo --linenumber 2 --file ${textFileReader} success=value
logMessage --message "${success}" --type "Info"
// The example returns the success of the move action.
Yukarıdaki komut dosyasının doğru çalışması için, dosyayı aşağı yüklemek ve "Reading Text File for Reading" (Okuma için Metin Dosyasını Aç) komutunun "Path" (Yol) parametresine giriş yolunu girmeniz gerekir.
Notlar
Öncelikle Okunmak üzere Metin Dosyasını Açkomutuyla okumak için bir metin açmanız gerekir.
In case the indicated line in Satır Numarası cannot be found, the return of Satır numarası is False and the reader goes to the default position 1.