Jump to content

Passing parameters


Casandra Kumsung
 Share

You are about to reply to a thread that has been inactive for 4172 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

In a dos bat file you can run the bat file with parameters. ie "clean.bat 2 34 48 "

I need to be able to change parameters ie /23  23 49 48

23 being a number used like a time

49  another number being used in the script

and 48 another number being used else where

Is this possible?  I could not find any examples of how to do this.

There is a  way with one command but means a lot of if then elses!

 

Link to comment
Share on other sites

other than hard coding the parameters you want to run with, you would need some method to import run parameters for a script. the common methods are via notecard reads (script reads the notecard at startup or on demand), or via a command interface (listen/chat being the most popular, you would send a command with your parametrs after it, other like dialog, http, etc are also possible), and then the script would parse those out.

Link to comment
Share on other sites

If all of your parameters are numeric, you could use an llDialog and make a menu that looks like a 10-button numeric keypad.  if you have multiple parameters to set, you could have 2 levels of llDialog:  One to select which parameter that you want to set, followed by the numeric keypad to input the actual parameter.

Link to comment
Share on other sites

If you're going to be using th same parameter values over and over again, then I think it's cleanest to put them on a notecard that you read in and parse each time you run the script.  You're less likely to make typing errors if you only have to record the values one time.  If the numbers are likely to change from one time to another, I'd suggest entering them as a single string with a llTextBox and then parsing them in the listen event.  It's a bit more straightforward than using llDialog .

Link to comment
Share on other sites

If you have just a few parameters, you can assign variables to hold the information and then call those variables when you need to. If there are more than  few paramaters, you can store them in a list. In either case, you can dynamically change your data-- unlike a notecard, which can only be read.

 

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4172 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...