Hi EREL. I want to create a texfile, and write into it some text.
I have a variable "i" and i have to write some lines for 0 to 7 per example.
This is how i have done as far.
How do i create this "1.txt" file, where do i find it, and how to make it work.
Thank you.
I have a variable "i" and i have to write some lines for 0 to 7 per example.
This is how i have done as far.
B4X:
#Region Project Attributes
#MainFormWidth: 500
#MainFormHeight: 500
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim Writer As TextWriter
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
Act
End Sub
Sub Act
Writer.Initialize(File.OpenOutput(File.DirDefaultExternal, "1.txt", False))
For i = 0 To 7
Writer.WriteLine("/* */")
Writer.WriteLine("ALM_NUM: " & i)
Writer.WriteLine("ALM_OUT: 0xF")
Writer.WriteLine("ALM_MASK: 0")
Writer.WriteLine("ALM_CHG: 0")
Writer.WriteLine("ALM_STATUS: 0x11")
Writer.WriteLine("ALM_SCNEW: begin")
Writer.WriteLine(" info")
Writer.WriteLine(" end")
Writer.WriteLine("ALM_SCOLD: begin")
Writer.WriteLine(" info")
Writer.WriteLine(" end")
Next
Writer.Close
End Sub
How do i create this "1.txt" file, where do i find it, and how to make it work.
Thank you.