forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How to I pass info into a VDS prog when I run it?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Mon Mar 24, 2003 7:35 pm    Post subject: How to I pass info into a VDS prog when I run it? Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Mon Mar 24, 2003 7:45 pm    Post subject: Reply with quote

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.

Smile

_________________
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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Mon Mar 24, 2003 7:45 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Mon Mar 24, 2003 7:53 pm    Post subject: Reply with quote

Thanks guys -- knew it was too simple. Must be under stress from my puppy getting bitten by another dog this weekend.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group