---
title: "getCurrentScript"
canonical: "https://help.vicon.com/space/ShogunPost121/1253738655/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

> Macro (scroll-tablelayout)

|  |
| --- |
| `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;
```

> Macro (16dcb1b2-c6fb-4c23-a096-38455b87e6a8/1fa5e51a-a28e-46e1-9b5c-734b339f025f/static/scroll-pagebreak)

# Additional information

## Related commands

- [runScript](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737250)
- [setScriptPaths](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738188)