<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Chris,<br>
<br>
I made a prototype of a module which would split the inputline. The
EXE is called "<i>twolines.exe</i>"; <br>
The command line would be e.g. <br>
<i>twolines.exe</i><i> "d:/musix/telemann/telemann.xml"
"d:/musix/telemann/telemann.pmx"</i><br>
<br>
====================================================<br>
MODULE InOut;<br>
<br>
IMPORT Kernel32,Strings; <br>
<br>
CONST EOR = 0DX; NL = 0AX; BLANK = 20X; TAB = 09X; DBLQUOTE =
22X; <br>
<br>
VAR<br>
cl: Kernel32.LPSTR; <br>
commandLine: ARRAY 255 OF CHAR; pos : LONGINT;<br>
infilename, outfilename : ARRAY 64 OF CHAR; <br>
<br>
PROCEDURE strbetween(s : ARRAY OF CHAR; VAR name : ARRAY OF
CHAR;VAR pos : LONGINT);<br>
(* Finds strings delimited by doublequote *)<br>
VAR i,j : LONGINT;<br>
BEGIN<br>
i:= pos; WHILE (i < Strings.Length(s) ) & ( s[i] #
DBLQUOTE ) DO INC(i) END; <br>
j := 0; INC(i); <br>
WHILE(i < Strings.Length(s) ) & (s[i] # DBLQUOTE) DO<br>
name[j] := s[i]; INC(i); INC(j) END; pos := i +1; name[j+1]
:= 0X;<br>
END strbetween;<br>
(* PROCEDURE InOut*;<br>
VAR comline : ARRAY 255 OF CHAR; infile, outfile : ARRAY 64 OF
CHAR; i, pos : LONGINT;<br>
S : Texts.Scanner; R : Texts.Reader; c : CHAR;<br>
BEGIN<br>
Texts.OpenReader(R,Oberon.Par.text,Oberon.Par.pos);
Texts.Read(R,c);<br>
i := 0;<br>
WHILE ~R.eot DO comline[i] := c; Texts.Read(R,c); INC(i) END; <br>
comline[i] := 0X;<br>
pos := 0;<br>
strbetween(comline,infilename,pos); <br>
Out.String(infilename); Out.Ln();<br>
strbetween(comline,outfilename,pos); <br>
Out.String(outfilename); <br>
END InOut; *)<br>
<br>
<br>
BEGIN<br>
cl := Kernel32.GetCommandLine();<br>
Kernel32.CopyString(cl, commandLine);<br>
pos := 0;<br>
strbetween(commandLine,infilename,pos); <br>
Kernel32.Str(infilename); Kernel32.Ln();<br>
<br>
strbetween(commandLine,outfilename,pos); <br>
Kernel32.Str(outfilename); Kernel32.Ln(); <br>
<br>
END InOut.InOut "d:/musix/telemann/telemann.xml"
"d:/musix/telemann/telemann.pmx"~<br>
<br>
=============================================================== <br>
I modified the HelloCon.Link as best, as I could think off, like:<br>
===========================================================<br>
PROGRAM twolines<br>
SUBSYSTEM CUI<br>
IMGVERSION 2.5<br>
HEAPSIZE 010000H<br>
MODULES<br>
Kernel32, Kernel, ADVAPI32, Registry, FileDir, AosIO, Files,
Modules, Strings, InOut<br>
IMPORTS<br>
Kernel.bootHeapAdr = HeapAdr,<br>
Kernel.bootHeapSize = HeapSize,<br>
Kernel.isEXE = isEXE,<br>
Kernel32.AllocConsole = KERNEL32.AllocConsole,<br>
<i> in between same as HelloCon.Link</i><br>
ADVAPI32.VerQueryValue = Version.VerQueryValueA<br>
ICONS<br>
Oberon = Oberon.ico<br>
VERSION<br>
CompanyName = "Institute for Computer Systems of ETH Zürich",<br>
FileDescription = "ETH PlugIn Oberon Hello",<br>
FileVersion = "Release 2.5",<br>
LegalCopyright = "(c) 2004 Team of the Institute for Computer
Systems of ETH Zürich",<br>
LegalTrademarks = '"Oberon" and "Gadgets" are trademarks of
Eidgenössische Technische Hochschule, Zürich (ETHZ)',<br>
OriginalFilename = "twolines.EXE"<br>
==============================================================<br>
This yields another trap<br>
==============================================================<br>
TRAP 100 HALT statement in thread Oberon.Loop<br>
<br>
BootLinker.Halt PC = 1857<br>
msg = "Imported module not loaded"<br>
BootLinker.ReadImport PC = 10781<br>
R = 00416E98H Files.Rider<br>
m = 0273AE80H BootLinker.ModuleDesc<br>
BootLinker.LoadModule PC = 16007<br>
R = 00416E98H Files.Rider<br>
base = 4305628<br>
body = NIL<br>
ch = 00000000X<br>
e = 0<br>
i = 0<br>
imp = 00000000H (BootLinker.ModuleDesc)<br>
j = 0<br>
k = 0<br>
m = 0273AE80H BootLinker.ModuleDesc<br>
mname = "Dates"<br>
mno = 0<br>
nofDataLinks = 4<br>
nofLinks = 1<br>
symSize = 932<br>
t = 0<br>
tmp = 960<br>
BootLinker.Load PC = 18567<br>
R = 00416E98H Files.Rider<br>
base = 4305628<br>
f = 02915B60H Files.File<br>
fname = "Strings.Obj"<br>
imp = 00000000H (BootLinker.ModuleDesc)<br>
m = 0273AE80H BootLinker.ModuleDesc<br>
name = "Strings"<br>
tag = 000000AFX<br>
PELinker.DoLink PC = 22134<br>
F = 026FA2A0H Files.File<br>
R = 00416E98H Files.Rider<br>
T = 0299A520H Texts.TextDesc<br>
base = 4305628<br>
context = 0042DB98H Exceptions.Context<br>
done = FALSE<br>
mod = 0273AE80H BootLinker.ModuleDesc<br>
name = 029C2CE0H PELinker.NameList<br>
offs = 0<br>
sections = 3<br>
PELinker.Link PC = 23391<br>
S = 00447158H Texts.Scanner<br>
T = 0299A520H Texts.TextDesc<br>
done = FALSE<br>
Oberon.Call PC = 5931<br>
Mod = 026C3C00H Kernel.ModuleDesc<br>
P = PELinker.Link PC = 22948<br>
cur = 027327C0H Windows.Window (Displays.Display)<br>
f = 028761E0H Desktops.DocViewerDesc (Objects.ObjDesc)<br>
i = 9<br>
j = 13<br>
name = "Link"<br>
new = FALSE<br>
par = 026EA540H Oberon.ParRec<br>
res = 1<br>
<br>
<br>
<br>
Builder.Compile \s InOut.Mod ~<br>
<br>
PELinker.Link InOut.Link ~<br>
<br>
RegistryTools.Load InOut.reg<br>
<br>
<br>
</body>
</html>