Support > Forums > OpenBots Studio > Run Task Command : Set variables in the Script File Path
Hi Team,
Appreciate it if you could help us to check the following requirement.
Please note that, we're required to call scripts in a Main Script which is in the Project Folder and the calling scripts are placed in a separate folder. We noticed that the entire script path need to be hard corded and even if there is a requirement of development environment (Creator Machine) change; we had to change the script file path and assign arguments again. It's not possible to even set a variable in the script path and when we do so, the arguments could not be assigned.
Hence, it would be great if there is a way of changing the file path by using Environment/System variables, so that there will be no code changes required.
Thanks & Regards, Thamali Jayaweera.
This forum has 317 topics, 687 replies, and was last updated 4 months ago by Nataly Alvarado...
Hi Thamalij,
Thanks for submitting your support query.
Yes, you can use variables as part of your path when using the Run Task command. Just make sure that the path variable contains the corresponding value when generating the Arguments.
For example, if the child script is inside Project Path, you can concatenate the ProjectPath variable generated in every Studio project to get the relative path to the root project folder.
If the child script is placed in an external folder, you can indicate a variable and define the value in the variable manager. This will allow you to generate the Arguments and define them. Once you have the values set in the command, you can delete the default variable value.
In addition, note that we have commands which allow you to get your environment values dynamically. You can find them as "Environment Variable" command.
Hope this helps!
You are not authorized to reply, please click here to login and add your reply to this topic.