---
title: "getCurrentScript"
canonical: "https://help.vicon.com/space/Shogun112/31228252/getCurrentScript"
format: markdown
---
# Description

Gets the name of the script currently in the Script Editor, optionally providing the full path.

## Functional area

Interface

# Command syntax

## Syntax

|  |
| --- |
| `getCurrentScript [-fullPath]` |

### Arguments

None

### Flags

| **Name** | **Flag arguments** | **Argument type** | **Exclusive to** | **Comments** |
| --- | --- | --- | --- | --- |
| `fullPath` | 0 | — | — | Gets the full path for the current script |

## Return value

string

## Examples

```plaintext
//Print the full path of the current script to the log.
string $s = `getCurrentScript –fullPath`;
print $s;
```

# Additional information

## Related commands

- [runScript](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31235144)
- [setScriptPaths](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31229119)