Are there example codes of how I can run executables and com files with args passed to them from within HLA?
Posted on 2003-11-14 20:07:41 by Kain
The shellexecute function should do the trick :) Here's an example the runs notepad with the hla source file as the commandline parameter.

 

program shellexdemo;

#include ("stdlib.hhf")
#include ("w.hhf")

#asm
includelib \masm32\lib\shell32.lib
#endasm

static

ShellExecute : Procedure
(
hwnd : DWORD;
lpOperation : string;
lpFile : string;
lpParameters : string;
lpDirectory : string;
nShowCmd : DWORD
);
@stdcall;
returns( "eax" );
external( "__imp__ShellExecuteA@24");

begin shellexdemo;

ShellExecute
(
0,"OPEN","notepad.exe",
"shellex.hla","",
w.SW_SHOWNORMAL
);

end shellexdemo;
Posted on 2003-11-15 05:12:33 by Odyssey
The "HowLong.HLA" program in the HLA Examples download demonstrates one way to do this.
Someday, I'll have to add a "system" call to the HLA standard library to trivialize this process.
Cheers,
Randy Hyde
Posted on 2003-11-15 13:36:30 by rhyde
Great! Thanks for the demos.
Posted on 2003-11-15 14:24:09 by Kain