---
title: args
description: Arguments passed to the script.
---

Arguments passed to the script.

Arguments are passed to the script when the script is executed from a share sheet. You can specify the types of arguments a script supports from the script settings.

## Properties

### all

All arguments supplied by a share sheet.

```typescript
all: [any]
```

All arguments supplied by the share sheet.

Read-only.

### fileURLs

File URLs supplied by a share sheet or a shortcut action.

```typescript
fileURLs: [string]
```

All file URLs passed to the script from a share sheet or a shortcut action.

If you have enabled "File URLs" as a share sheet input from the script settings, the script can be run from any share sheet throughout the system that shares URLs pointing to a file.

Shortcut actions run in the Scriptable app process. Share Sheet extensions have less memory available; enable "Always run in app" when sharing large files.

Read-only.

### images

Images supplied by a share sheet or a shortcut action.

```typescript
images: [Image]
```

All images passed to the script from a share sheet or a shortcut action.

If you have enabled "Images" as a share sheet input from the script settings, the script can be run from any share sheet throughout the system that shares images.

Shortcut actions run in the Scriptable app process. Share Sheet extensions have less memory available; enable "Always run in app" when sharing large images.

Read-only.

### length

Number of arguments supplied by a share sheet.

```typescript
length: number
```

The number of arguments passed to the script from the share seeht.

Read-only.

### notification

Notification being handled by the script.

```typescript
notification: Notification
```

The notification that a script is being run in or the application was opened from.

The notification contains all information that was set when the notification was originally scheduled, including the `userInfo` property which can be used to contain custom data that might be relevant when running the script.

Read-only.

### plainTexts

Plain texts supplied by a share sheet or a shortcut action.

```typescript
plainTexts: [string]
```

All plain texts passed to the script from a share sheet or a shortcut action.

If you have enabled "Text" as a share sheet input from the script settings, the script can be run from any share sheet throughout the system that shares plain text.

Read-only.

### queryParameters

Query parameters from a URL scheme.

```typescript
queryParameters: {string: string}
```

Query parameters are supplied to a script when running it from a URL scheme. See the documentation on Scriptables URL schems for more information.

Read-only.

### shortcutParameter

Parameter passed to a Shortcut.

```typescript
shortcutParameter: any
```

When creating a shortcut using the Shortcuts app, you can pass an input parameter that can be read in your script using `args.shortcutParameter`.

This parameter can be any text, list, dictionary or file and will be exposed in your script using the appropriate type. When passing a file, the "Run Script" action will attempt to read the file as JSON or a plain text. If the file cannot be read as JSON or a plain text, a path to the file will be passed as the input parameter.

Read-only.

### siriShortcutArguments

Arguments passed from a Siri Shortcut.

```typescript
siriShortcutArguments: {string: string}
```

When creating a Siri Shortcut in Scriptable, you can define arguments that are passed to the script when the shortcut is run. This lets you differentiate the behavior of a script based on some predefiend arguments.

For example, a script that checks the wather may expect an argument with the key "city". When creating a Siri Shortcut for the script, the argument should be passed with the value containing the name of the city to check the weather for.

Read-only.

### urls

URLs supplied by a share sheet or a shortcut action.

```typescript
urls: [string]
```

All URLs passed to the script from a share sheet or a shortcut action.

If you have enabled "URLs" as a share sheet input from the script settings, the script can be run from any share sheet throughout the system that shares URLs.

Read-only.

### widgetParameter

Parameter passed to a widget.

```typescript
widgetParameter: any
```

When creating a widget on the Home screen, you can define a parameter that can be read in your script using `args.widgetParameter`.

The parameter can be used to differentiate the behavior of multiple widgets.

Read-only.

### widgetAction

Action triggered by a widget control.

```typescript
widgetAction: any
```

A dictionary with the control’s `id`. For a toggle, it also contains `isOn`, the requested Boolean state. This property is `null` during a normal widget render and when running a script elsewhere. Await any asynchronous work in the action before returning. Persist data that the next widget render needs.

Read-only.