Hi to all :wave:
i am trying to make a simple scripter. my scripter has a Run button to run the written scripts in a RichTextBox.But in new version of my program i want to make a RealTime run scripter, So don't need to a run button and scripts should process when user type in richtexbox.
a way that i had used in my program is this :
i use this code in richtextbox TEXTCHANGED sub, So in every change of text, program save the text in a .txt file and then open this .txt file to input lines and check the lines.
if lines start with some key word like : "PageName" then process some things.
Syntax of this scripter is this :
Keyword Contents
For example this code :
PageName welcome
process check line and if line start with "PageName" will detect contents of this code by CODE, So this code will be change the name of RUN page.
but i don't want to use OUTPUT/INPUT commands to save and load the text and process, because this work decrease speed of my program !!
So please help me to make a REAL TIME RUN SCRIPT code without OUTPUT/INPUT codes.
I hope that understood my mean
i am trying to make a simple scripter. my scripter has a Run button to run the written scripts in a RichTextBox.But in new version of my program i want to make a RealTime run scripter, So don't need to a run button and scripts should process when user type in richtexbox.
a way that i had used in my program is this :
VB.NET:
On Error Resume Next
FileOpen(1, "c:\windows\magico(test).txt", OpenMode.Output)
PrintLine(1, frmMain.page_script.txtScript.Text)
FileClose(1)
FileOpen(1, "c:\windows\magico(test).txt", OpenMode.Input)
For i = 1 To frmMain.page_script.txtScript.Lines.LongCount
line = LineInput(1)
position = line.IndexOf(" ")
code = Mid(line, position + 2, line.Length)
If Trim(line.ToLower.StartsWith("pageset")) Then
FileClose(1)
FileOpen(1, "c:\windows\magico(test).txt", OpenMode.Input)
For j = 1 To frmMain.page_script.txtScript.Lines.LongCount
line = LineInput(1)
position = line.IndexOf(" ")
code = Mid(line, position + 2, line.Length)
If Trim(line.ToLower.StartsWith("pagename")) Then frmMain.page_run.Text = code
If Trim(line.ToLower.StartsWith("pagewidth")) Then frmMain.page_run.Width = Convert.ToInt32(code)
If Trim(line.ToLower.StartsWith("pageheight")) Then frmMain.page_run.Height = Convert.ToInt32(code)
If Trim(line.ToLower.StartsWith("pagecolor")) Then frmMain.page_run.BackColor = Color.FromName(code)
Next j
End If
Next i
FileClose(1)
i use this code in richtextbox TEXTCHANGED sub, So in every change of text, program save the text in a .txt file and then open this .txt file to input lines and check the lines.
if lines start with some key word like : "PageName" then process some things.
Syntax of this scripter is this :
Keyword Contents
For example this code :
PageName welcome
process check line and if line start with "PageName" will detect contents of this code by CODE, So this code will be change the name of RUN page.
but i don't want to use OUTPUT/INPUT commands to save and load the text and process, because this work decrease speed of my program !!
So please help me to make a REAL TIME RUN SCRIPT code without OUTPUT/INPUT codes.
I hope that understood my mean