| Author |
Command line problem.
|
|
| Maciej Wolniewicz 2006-03-22, 6:55 pm |
| Hi,
I know that function COMMAND returns parameters, but I don't know how
can I read number of parameters passed from commandline. And second,
how can I print some text in command line, when number of parameters
isn't desired by program. Thanks for help.
| |
| Warwick Paton 2006-03-22, 6:55 pm |
| myapp.exe param1 param2 param3
command(1) returns "param1"
command(2) returns "param2" etc
hth
W
"Maciej Wolniewicz" <maciejwolniewicz@gmail.com> wrote in message
news:1143040763.326512.250050@g10g2000cwb.googlegroups.com...
> Hi,
> I know that function COMMAND returns parameters, but I don't know how
> can I read number of parameters passed from commandline. And second,
> how can I print some text in command line, when number of parameters
> isn't desired by program. Thanks for help.
>
| |
| Maciej Wolniewicz 2006-03-23, 3:55 am |
| Ok, thanks, but I know that. My question is how print something on
command line. SETCOMMAND doesn't do what I want. I want print something
in Windows console. I hope You understand me. Thanks for any response
| |
| Warwick Paton 2006-03-23, 3:55 am |
| Sorry I can't quite follow what you are trying to do.
W
"Maciej Wolniewicz" <maciejwolniewicz@gmail.com> wrote in message
news:1143102526.476530.305970@j33g2000cwa.googlegroups.com...
> Ok, thanks, but I know that. My question is how print something on
> command line. SETCOMMAND doesn't do what I want. I want print something
> in Windows console. I hope You understand me. Thanks for any response
>
| |
| Maciej Wolniewicz 2006-03-23, 7:55 am |
| Ok, so I want to use something like printf("string") in C, or
cout<<"string" in C++ or Console.Write("string") in C#.
| |
|
|
| Warwick Paton 2006-03-23, 9:55 pm |
| OK I think this article will give you what you want
http://www.clarionmag.com/cmag/v8/v...capecodes2.html
W
"Maciej Wolniewicz" <maciejwolniewicz@gmail.com> wrote in message
news:1143107761.769027.217840@e56g2000cwe.googlegroups.com...
> Ok, so I want to use something like printf("string") in C, or
> cout<<"string" in C++ or Console.Write("string") in C#.
>
| |
| clackmannan 2006-03-23, 9:55 pm |
| Use the dependency walker (www.dependencywalker.com) to look at what
procedures the CW runtime DLL exports, or just open it as a binary file
in a text editor
You should find that it exports some procedures that might help,
including _sprintf, _vsprintf & wsprintfa
Other than that you'll need to use the Win32 console API, but I'm not
sure you can use it to write to the current command console without
some work
| |
| Maciej Wolniewicz 2006-03-24, 3:55 am |
| Thanks guys, with Yours help I resolved my problem.
| |
| clackmannan 2006-03-24, 6:55 pm |
| So what was the final solution?
| |
|
|
|
|