Programming is making thing easier for user and harder for programmer isn't ? With all this program, I will look into the conversion of using if-else TTL script to regenerate TXT file. And also thank you, UEZ and Enaiman for your help. I have run the script, and it works like a charms. Local $InFile = 'Reading ' Local $OutFile = "Desired Output.txt" _TTL _TOText ( $InFile, $OutFile ) If FileExists ( $OutFile ) Then ShellExecute ( $OutFile ) Func _TTL _TOText ( ByRef $sFileIn, ByRef $sFileOut ) Local $sInFile, $aX, $aY, $sTemp, $sNew, $hFile If FileExists ( $sFileIn ) = 0 Then Return $sInFile = StringStripCR ( FileRead ( $sFileIn ) ) $aX = StringRegExp ( $sInFile, "(?i)x\h*=\h*'(+)'", 3 ) x value $aY = StringRegExp ( $sInFile, "(?i)y\h*=\h*'(+)'", 3 ) y value $sTemp = StringRegExpReplace ( $sInFile, "(?i)(\h*=\h*'+'\v)|(wait+)", "" ) $sTemp = StringRegExpReplace ( $sTemp, "(?i)(.+?x')()'", "read " & $aY & "\2" ) $hFile = FileOpen ( $sFileOut, 10 ) FileWrite ( $hFile, StringAddCR ( $sNew ) ) FileClose ( $hFile ) Return EndFunc =>_TTL_TOText
#Tera term 4.73 Pc
Now, this app is available for Windows PC users.
![tera term 4.73 tera term 4.73](https://www.cmdvb.fr/wp-content/uploads/2012/03/TeraTerm_05.jpg)
#Tera term 4.73 for windows 10
This generates an exact duplicate of the desired output - for regular exp ression Buffs. Technical Note : Using Tera Term sniffer with a FortiGate to save output to different files every![tera term 4.73 tera term 4.73](https://kb.seeck.jp/wp/wp-content/uploads/2012/03/SHR132086-s.jpg)
Expand collapse popup #include #include Global $TTLarray, $TTLvarArray Global $varTmp, $aCounter = 0, $replace = 0 $myTTLfile = & "\script.ttl" $myTXTfile = & "\script.txt" _FileReadToArray ( $myTTLfile, $TTLarray ) For $i = 1 To $TTLarray If StringInStr ( StringStripWS ( $TTLarray, 8 ), "='" ) Then $varTmp = StringSplit ( $TTLarray, "=" ) $TTLvarArray = StringStripWS ( $varTmp, 3 ) $TTLvarArray = StringReplace ( $varTmp, "'", "" ) $aCounter += 1 EndIf Next ReDim $TTLvarArray For $i = 1 To $TTLarray If StringInStr ( $TTLarray, "sendln" ) Then $replace = 0 For $j = 0 To UBound ( $TTLvarArray ) - 1 If StringInStr ( $TTLarray, "'" & $TTLvarArray & "'" ) Then $TTLarray = StringReplace ( $TTLarray, "'" & $TTLvarArray & "'", $TTLvarArray ) $replace += 1 EndIf Next If $replace = 0 Then $TTLarray = "" Else $TTLarray = StringReplace ( $TTLarray, "sendln", "" ) $TTLarray = StringReplace ( $TTLarray, "'", "" ) EndIf Else $TTLarray = "" ContinueLoop EndIf Next If Not FileExists ( $myTXTfile ) Then FileClose ( FileOpen ( $myTXTfile, 2 ) ) EndIf _FileWriteFromArray ( $myTXTfile, $TTLarray, 1 ) ShellExecute ( $myTXTfile )