Normal Topic Passing Shell paramaters (Read 628 times)
obfusc88
Full Member
***
Offline


No personal text

Posts: 194
Joined: Dec 17th, 2005
Passing Shell paramaters
Jul 27th, 2008 at 11:37pm
Print Post Print Post  
How can I start an executable program and send its parameters?  
And I need to prevent the black DOS box.

I tried @Shell but that gives me the DOS box that is unwanted.
I tried @AsynchShell, but that does not send the parameters.

The following command line with three variables works good from a DOS prompt:
Volume.exe /15 /1800 /30

But when I use @AsynchShell I get a message that it cannot find the file "Volume.exe /15 /1800 /30"

I have tried the following, but they fail.
n = @AsynchShell("C:\Program Files\CADD\Volume.exe /15 /1800 /30")
n = @AsynchShell("C:\Program Files\CADD\Volume.exe" + " /15 /1800 /30")

This starts the program OK without the parameters:
n = @AsynchShell("C:\Program Files\CADD\Volume.exe")

It is intended to have the three variables passed over from variables calculated by Sesame.  But I can't even get it to work with hardcoded values first.  I tried putting the command line above into a batch file and call the batch file with @AsynchShell but I get the black DOS box then.  IS there a way to make the black box disappear when the batch file runs?  It could run minimized, because the result from the executable will be written to a text file.  I will be using Sesame to read the text file result after running the executable.

Although this is a specific question, I think that it is of general need for any other programs that need variables passed to them.  What is the secret?
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Passing Shell paramaters
Reply #1 - Jul 28th, 2008 at 12:15am
Print Post Print Post  
If you have Version 2.06, then try using CreateAProcess like this:

CreateAProcess("C:\Program Files\CADD\Volume.exe /15 /1800 /30")

I know that command is in earlier versions of 2.x, but not sure which one. 
I am pretty sure it is not in Version 1.x

See my recent posting at http://www.lantica.com/Forum3/cgi-bin/yabb2/YaBB.pl?num=1216758276/0#5 for an example.
« Last Edit: Jul 28th, 2008 at 7:16pm by Bob_Hansen »  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged