Well, technically the "If prg" block should go inside the "If CreateFile" block,
because if the file was never created then there's no need to do an "If prg"
check. Also, I'd make the code create the file in the TEMP dir, so the user
is never aware of it.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
No, you have to make a separate check, to cover two eventualities: couldn't create the file, couldn't load the scripting host. Agreed on the TEMP dir though, good idea. I'm also looking to see if I can stream the command line into the host, no file needed. Should be doable, if anyone knows how, pls post before I spend a lot of time on it
> two eventualities: couldn't create the file, couldn't load the scripting host
Yes, but if CreateFile fails, there's no need to check "prg". But if CreateFile
worked, then you can go ahead and check "prg" in the same block, so both
cases are covered with only one decision and not two.
Here's two "Visustin" flowcharts to show what I mean: