home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff339.lzh
/
PCQ
/
Examples
/
Icons.p
< prev
next >
Wrap
Text File
|
1990-03-19
|
809b
|
31 lines
program Icons;
{
This program shows how to access the arguments passed to a program
by the Workbench. Compile and link this program, then make a
tool icon for it. Then activate the program by clicking on some
project icons and this icon. In my original archive, I included
a copy of the CLI icon in this directory, so you might be able to
use it.
This program also shows that PCQ will open a default console window
if a program run from the Workbench needs it.
}
{$I ":Include/Parameters.i"}
var
WB : WBStartupPtr;
Arg : Integer;
begin
WB := GetStartupMsg();
if WB <> nil then begin
Writeln('There were ', WB^.smNumArgs, ' arguments.');
for Arg := 1 to WB^.smNumArgs do
writeln(WB^.smArgList^[Arg].waName);
readln;
end else
writeln('Run from the CLI');
end.