Telling the IDE to load source code using RunProgram()
Posted: Thu Oct 12, 2023 9:58 pm
Hello everyone,
While using my ToolBoxFile manager I have discovered that loading source code to the IDE using RunProgram() don't work anymore. I have used this technique for years without issues and I don't know when it became broken.
Do I need to do something differently ? Something broken in the IDE ? (If so this topic should be moved to Bug - IDE section)
Best regards
StarBootics
While using my ToolBoxFile manager I have discovered that loading source code to the IDE using RunProgram() don't work anymore. I have used this technique for years without issues and I don't know when it became broken.
Do I need to do something differently ? Something broken in the IDE ? (If so this topic should be moved to Bug - IDE section)
Code: Select all
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Project name : Loading source code to IDE
; File Name : Loading Source IDE.pb
; File version: 1.0.0
; Programming : Seems to be OK from this side
; Programmed by : StarBootics
; Date : October 12th, 2023
; Last Update : October 12th, 2023
; PureBasic code : V6.03 LTS
; Platform : Windows, Linux, MacOS X
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Notes
;
; You need to compile this tiny program and set it
; as a custom tool in order to see the problem.
;
; I have used this technique for years without any
; issues, but since recently it no longer work.
; When launched from the Tools menu, I see the
; correct path to the IDE and RunProgram() return
; 1.
;
; What I would like to do is to tell the IDE to
; load a specific source code from another
; program.
;
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
SourceFile.s = GetHomeDirectory() + "MySourceCode.pb"
If CreateFile(0, SourceFile)
WriteString(0, "; Something to see")
CloseFile(0)
EndIf
IDE.s = GetEnvironmentVariable("PB_TOOL_IDE")
MessageRequester("PB_TOOL_IDE", IDE)
If IDE <> ""
Result.i = RunProgram(IDE, SourceFile, GetPathPart(IDE))
MessageRequester("RunProgram", Str(Result))
EndIf
; <<<<<<<<<<<<<<<<<<<<<<<
; <<<<< END OF FILE <<<<<
; <<<<<<<<<<<<<<<<<<<<<<< StarBootics
