maxkleiner / maXbox4

code compiler script studio
GNU General Public License v3.0
23 stars 10 forks source link

DOSOutput Async #1

Closed maxkleiner closed 1 year ago

maxkleiner commented 7 years ago

to have the wait async in execute command

maxkleiner commented 2 years ago

function executeAndWaitExe(fileName: string; params:string= ''; exceptionIfReturnCodeIsNot0: boolean = false): LongInt;

New CommandLineInterface -c as compile script from shell: C:\maXbox\mx4\mx4_v38\mx4\source>maxbox4_7.exe -c examples\100_weather_australia.txt C:\maXbox\mx4\mx4_v38\mx4\source>maxbox4_7.exe -c examples\440_xml_tutor2.txt

Example: C:\maXbox\mx4\mx4_v38\mx4\source>maxbox4_7.exe -c examples\440_xml_tutor2.txt Version maXbox4 is: 4.7.6.10 compiled... XCompiler Message Count: 3 compiled[Hint] (384:10): Variable 'Result' never used [Hint] (384:10): Variable 'Result' never used compiled[Hint] (31:7): Variable 'FWAIT' never used [Hint] (31:7): Variable 'FWAIT' never used compiled[Hint] (31:7): Variable 'SWITCH' never used [Hint] (31:7): Variable 'SWITCH' never used executed... exec[Hint] (384:10): Variable 'Result' never used exec[Hint] (31:7): Variable 'FWAIT' never used exec[Hint] (31:7): Variable 'SWITCH' never used Welcode Coder: memo1 is editor - memo2 is output C:\maXbox\works2021\maxbox4\examples\1134_syn_dat_pop.txt File loaded DataExecutionPrevention DEP active .ini: 21:05:04 Version on Internet checked!

Start Command of IE: InternationalDate: dd/mm/yyyy InternationalLongDate: dd nnnnnnnnn yyyy InternationalTime: hh:mm United Kingdom hasParent: False Medium Resolution Size (512) mem from dll 60391424 proc all from dll 60391424 proc all from dll 60391424 proc peak workingset 84432 BAMHPFNQZZTOONYJTYGTWKVXVZFRIDCXOIOQVVIGRS AADAEPHEFIMIJHGHMAZWTTOFGPZFYNKBROAWCYHCUQ

Script examples\440_xml_tutor2.txt finished: 31/07/2022 21:05:08 >>>

maxkleiner commented 1 year ago

{type TTextHandler =} procedure TTextHandlerQ(const aText: string); begin memo2.lines.add(atext); end;

writeln(itoa(JExecute('cmd /C dir .',@TTextHandlerQ, true, false))); writeln(itoa(JExecute1('cmd /C dir .',sr, true, false)));