---
title: "getGlobalBooleanVar"
canonical: "https://help.vicon.com/space/ShogunPost116/341118239/getGlobalBooleanVar"
format: markdown
---
# Description

Retrieves the value of a specified boolean global variable.

Shogun Post's scripting language supports global variables that are accessible across scripts within a session of Shogun Post. This command retrieves the value of a specified global variable (identified by the name argument of the command) which stores a Boolean.

## Functional area

Data retrieval

# Command syntax

## Syntax

|  |
| --- |
| `getGlobalBooleanVar name` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `name` | string | yes | Name of the variable to retrieve |

### Flags

None

## Return value

boolean

Returns the Boolean value stored in the specified global variable. Can be true or false.

> Macro (scroll-pagebreak)

## Examples

```plaintext
Script A
// Set the special process flag to be used by other scripts
setGlobalVar useSpecialProcess false;
...
Script B
// Check to make sure the special processing flag exists
if (`getGlobalVarExists useSpecialProcess`)
{ 
  // If it exists, use its value to determine what to do 
  if (`getGlobalBooleanVar useSpecialProcess`)
  { 
    print("Using special process"); 
  } 
  else 
  { 
    print("Not using special process"); 
  }
}
else
{ print("Global variable useSpecialProcess not found");
}
```

# Additional information

## Related commands

- [delGlobalVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost116/pages/341117696)
- [getGlobalFloatVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost116/pages/341118245)
- [getGlobalIntVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost116/pages/341118251)
- [getGlobalStringVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost116/pages/341118257)
- [getGlobalVarExists](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost116/pages/341118263)
- [getGlobalVectorVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost116/pages/341118269)
- [setGlobalVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost116/pages/341119914)