[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ShellExecute api call
- To: <hobbit (at) hswn.dk>
- Subject: ShellExecute api call
- From: "Jeffcoat, Al" <Al.Jeffcoat (at) orhs.org>
- Date: Mon, 8 May 2006 12:37:59 -0400
- Thread-index: AcZyvYpCapW2Ay1dRXGomI5ftEQjSA==
- Thread-topic: ShellExecute api call
Hello All,
I've got a programmer here trying to send a status message to hobbit
from a windows machine. He's having a problem executing the bb code. I
myself am not a programmer, so I figured I'd pass on his e-mail and see
if anyone else knows the answer to his problem.
TIA,
Al
--- Quote ---
There is a problem doing this from within a program. The shellexecute
function requires you to pass the program name and parameters seperate.
E.G.,
program = "bb.exe"
parameters = "hobbit status kn306109.dtr-status red
<center>DTR-STATUS</center><br>Last Failure = 05/04/20 06 00:00:01 Last
Success = 05/08/2006 00:00:01<br>Copies = 50"
(hobbit is not part of the program name and that is why it can't be part
of program name)
If I try to simulate this on command line with
bb "hobbit status kn306109.dtr-status red
<center>DTR-STATUS</center><br>Last Failure = 05/04/20 06 00:00:01 Last
Success = 05/08/2006 00:00:01<br>Copies = 50"
I get
bb: incorrect number of arguments
--- /Quote ---
I know the format of a message, and if I change his message to read
bb hobbit "status kn306109.dtr-status red
<center>DTR-STATUS</center><br>Last Failure = 05/04/20 06 00:00:01 Last
Success = 05/08/2006 00:00:01<br>Copies = 50"
It works fine.
My thought was to write a "wrapper" batch file.
I'm open to any other ideas.