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 


Params

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Mon Aug 12, 2002 7:07 pm    Post subject: Params Reply with quote

Is it possible to read the parameters by which your program is started?
I mean something like:
format C: \q

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Mon Aug 12, 2002 7:09 pm    Post subject: Reply with quote

Parameters will be stored in variables %1 .. %9 - %0 is always the full path to the EXE itself.

Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Mon Aug 12, 2002 7:11 pm    Post subject: Stupid me! Reply with quote

Tnx Dr. Dread!
Stupid that I forget that Embarassed

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Mon Aug 12, 2002 7:14 pm    Post subject: Reply with quote

You can also use the SHIFT command to be able to access more than 9 parameters.
Each time after using that, the 'virtual' value of "%10" will be moved to %9, the value of %9 to %8 etc.

This could for example be used like this:

Code:

%%param = %1
info Parameter 1 = %%param
shift
%%param = %1
info Parameter 2 = %%param



Or even automated:

Code:

repeat
  %%param = %%param%1" "
  shift
until @not(%1)
info Parameters:@cr()%%param



In order to test parameter functionality without compiling your script, you can use the Run->Command Line menu item.

If parameters from the commandline are enclosed by double quote characters ("),
they will be interpreted as a single parameter by VDS.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Mon Aug 12, 2002 7:24 pm    Post subject: Thanx Reply with quote

Thanks for the tip Tommy!
_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Aug 12, 2002 10:35 pm    Post subject: Reply with quote

Speaking of parameters...

I posted a simple utility I use to retrieve command parameters
from Windows programs:

http://www.vdsworld.com/forum/viewtopic.php?p=2929#2929

It captures up to 9 parameters (if ya need more, just use a
loop with the SHIFT command Tommy mentioned).

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Que
Valued Newbie


Joined: 25 Aug 2001
Posts: 38
Location: Newaygo, MICH

PostPosted: Tue Aug 13, 2002 2:47 pm    Post subject: Reply with quote

Mac, I'm afraid I don't understand what this script does. Confused
I have access to a windows program that was written for our network. It has three edit boxes. Mail Recipient, Subject, & Filename. I tried to run it on a command line with spaces, as follows:
Code:

runh mailto.exe someguy subject send.txt

but all three params showed up in the first edit box and the command failed. Is this an application for the script you posted Question

_________________
Que
Back to top
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Aug 13, 2002 8:22 pm    Post subject: Reply with quote

Hey Que,

The program I posted is designed to retrieve the
parameters sent to programs by the Windows OS.

For example when a screensaver runs, Windows
sends various parameters to the screensaver,
depending on whether it's calling it at the time
delay, setup, etc. This is in fact how I learned the
parameters listed in the VDS screensavers I've
posted.

Make any sense?

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Que
Valued Newbie


Joined: 25 Aug 2001
Posts: 38
Location: Newaygo, MICH

PostPosted: Wed Aug 14, 2002 12:29 pm    Post subject: Reply with quote

yep, I understand. I thought it might be something like that, but I wasn't real sure.

Thanks!

_________________
Que
Back to top
View user's profile Send private message Send e-mail
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