| View previous topic :: View next topic |
| Author |
Message |
MarkTrubo Contributor


Joined: 27 May 2001 Posts: 148 Location: Long Island, NY
|
Posted: Mon Mar 24, 2003 7:35 pm Post subject: How to I pass info into a VDS prog when I run it? |
|
|
Like if I had a program that needed to know how to set a start and stop time and I wanted to do that something like this -- calling my VDS program from another non-vds program:
onoff.exe /b:9 /e:18
How do I get the 9 and 18 or whatever into my program to use? |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Mon Mar 24, 2003 7:45 pm Post subject: |
|
|
Each bit of data passed to the VDS app from the command line will be
contained in one of the numeric variables. Here's an example:
| Code: |
onoff.exe /b:9 /e:18
|
As soon as the onoff.exe app starts, for this example, check for the existance
of the %1 and %2 variables. "/b:9" will be contained in the %1 variable and
"/e:18" will be contained in the %2 variable.
 _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it."
Last edited by ShinobiSoft on Mon Mar 24, 2003 7:45 pm; edited 1 time in total |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Mon Mar 24, 2003 7:45 pm Post subject: |
|
|
In your example, %1 would hold /b:9 and %2 would hold /e:18
You could then parse them for the switch and number something like:
| Code: |
OPTION FIELDSEP,":"
PARSE "%%Switch;%%Number", %1
IF @EQUAL(%%Switch,/b)
INFO Do something with %%Number
END
PARSE "%%Switch;%%Number", %2
IF @EQUAL(%%Switch,/e)
INFO Do something with %%Number
END
|
_________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
MarkTrubo Contributor


Joined: 27 May 2001 Posts: 148 Location: Long Island, NY
|
Posted: Mon Mar 24, 2003 7:53 pm Post subject: |
|
|
| Thanks guys -- knew it was too simple. Must be under stress from my puppy getting bitten by another dog this weekend. |
|
| Back to top |
|
 |
|