---
title: "getGlobalBooleanVar"
canonical: "https://help.vicon.com/space/Shogun18/13668356/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/Shogun18/pages/13668772)
- [getGlobalFloatVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun18/pages/13668354)
- [getGlobalIntVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun18/pages/13668352)
- [getGlobalStringVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun18/pages/13668350)
- [getGlobalVarExists](https://vicon-help.atlassian.net/wiki/spaces/Shogun18/pages/13668380)
- [getGlobalVectorVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun18/pages/13668378)
- [setGlobalVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun18/pages/13674954)