RunTask.GetArgument
-------------------

Queries the argument with given index.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [RunTask](component_RunTask.md) | [3.1](newinversion31.md) | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ❌ No |

### Deprecated

This function was [deprecated](deprecated.md). Use [Shell](component_Shell.md) functions instead.

MBS( "RunTask.GetArgument"; Index ) 

**MBS**( **"RunTask.GetArgument";** /\* Queries the argument with given index. \*/  
**$Index**) /\* The index of the argument to query. Range from 0 to [RunTask.GetArgumentCount](RunTaskGetArgumentCount.md)-1. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Index | The index of the argument to query. Range from 0 to [RunTask.GetArgumentCount](RunTaskGetArgumentCount.md)-1. | $index |

### Result

Returns argument text or error message.

### Description

Queries the argument with given index.  
On Windows we have only one argument string, so index is ignored and you receive all arguments.  
### See also

- [RunTask.AddArgument](RunTaskAddArgument.md)
- [RunTask.GetArgumentCount](RunTaskGetArgumentCount.md)
- [RunTask.SetArguments](RunTaskSetArguments.md)

This function checks for a license.

Created 18th August 2014 , last changed 13th June 2020

  
[RunTask.AddArgument](RunTaskAddArgument.md) - [RunTask.GetArgumentCount](RunTaskGetArgumentCount.md)

[HTML Version](RunTaskGetArgument.shtml)