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

> Macro (scroll-tablelayout)

|  |
| --- |
| `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/ShogunPost121/pages/1253736470)
- [getGlobalFloatVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736728)
- [getGlobalIntVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738121)
- [getGlobalStringVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737639)
- [getGlobalVarExists](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736894)
- [getGlobalVectorVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737705)
- [setGlobalVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253739295)