zak
20-06-2010, 12:33
Hi
the thinbasic example here C:\thinBasic\SampleScripts\UI\RichEdit\RichEdit_002.tbasic
can be used as an ide for other programming languages who have not an ide, i have added to it a button so its picture is like this:
http://img97.imageshack.us/img97/4522/richedit.png
and attached to the button the following lines:
Case %IDBTN_RUN
Control Get Text CBHNDL, %ID_EDITOR To tbasiccode
FILE_Save("tbfile.tbasic", tbasiccode)
OS_Shell(OS_Environ("COMSPEC") + " /C c:\thinbasic\thinbasic.exe tbfile.tbasic",%OS_WNDSTYLE_NORMAL,%OS_SHELL_SYNC)
Refresh = %TRUE
you write a code in the rich text box , when you click Run... the contents of the box will be saved to a temporary file "tbfile.tbasic", then using the shell running thinbasic.exe over this file. but i do not know which is more correct to call thinbasic.exe or thinbasicc.exe ?
i have tried this richedit program to run perl code successfully, the only shortage is the ability to highlight the keywords. other than that it is a good editor and ide.
attached the modified file, you can change it to run other programs.
the thinbasic example here C:\thinBasic\SampleScripts\UI\RichEdit\RichEdit_002.tbasic
can be used as an ide for other programming languages who have not an ide, i have added to it a button so its picture is like this:
http://img97.imageshack.us/img97/4522/richedit.png
and attached to the button the following lines:
Case %IDBTN_RUN
Control Get Text CBHNDL, %ID_EDITOR To tbasiccode
FILE_Save("tbfile.tbasic", tbasiccode)
OS_Shell(OS_Environ("COMSPEC") + " /C c:\thinbasic\thinbasic.exe tbfile.tbasic",%OS_WNDSTYLE_NORMAL,%OS_SHELL_SYNC)
Refresh = %TRUE
you write a code in the rich text box , when you click Run... the contents of the box will be saved to a temporary file "tbfile.tbasic", then using the shell running thinbasic.exe over this file. but i do not know which is more correct to call thinbasic.exe or thinbasicc.exe ?
i have tried this richedit program to run perl code successfully, the only shortage is the ability to highlight the keywords. other than that it is a good editor and ide.
attached the modified file, you can change it to run other programs.