1. A bit of help...
- Posted by "Bonn Ortloff (\"LEVIATHAN\")" <ortlofffamily at WORLDNET.ATT.NET> May 24, 1998
- 516 views
-------------------------------- Hi again! Is there some way to open a file from command line into GENERIC.EXW included with Win32lib? If not, do I have to add command_line into GENERIC.EXW, and how do I do it? (I never made sense of it...) I'll give a shot at it, and tell me how i'm doing/help me correct it. Thanx! "LEVIATHAN" sequence cmd_line cmd_line = command_line() so if user types at command prompt: generic.exe c:\magicdat.out cmd_line would me: {"path/generic.exe", "c:\magicdat.out"} ^^^^^^^^^^^^^^^^^ (^ = I want this. How do I get just that segment?)
2. Re: A bit of help...
- Posted by David Cuny <dcuny at LANSET.COM> May 25, 1998
- 526 views
Bonn Ortloff ("LEVIATHAN") wondered: >Is there some way to open a file from command line into GENERIC.EXW >included with Win32lib? If not, do I have to add command_line into >GENERIC.EXW, and how do I do it? (I never made sense of it...) I'll give >a shot at it, and tell me how i'm doing/help me correct it. You are correct, in that command_line is the mechanism to do it. You are guaranteed to get at least two sequences back from command_line(); those you can ignore. You are interested in the third argument. So something along the lines of: sequence parm, fileName parm = command_line() if length(parm) > 2 then -- they entered a file name -- note that only the first name entered is used fileName = parm[3] else -- no file name fileName = "" end if should do the trick. Hope this helps! -- David Cuny