ScriptWorkspace.CurrentTabTogglePreview
---------------------------------------

Toggles the preview button on the current tab.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [ScriptWorkspace](component_ScriptWorkspace.md) | [16.4](newinversion164.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "ScriptWorkspace.CurrentTabTogglePreview" ) ### Parameters

none

### Result

Returns OK or error.

### Description

Toggles the preview button on the current tab.  
Returns an error in case the preview button is not found.  
### See also

- [ScriptWorkspace.CurrentTabIsPreview](ScriptWorkspaceCurrentTabIsPreview.md)
- [ScriptWorkspace.CurrentTabToggleClose](ScriptWorkspaceCurrentTabToggleClose.md)

### Release notes

- **Version 16.4**
    - Added ScriptWorkspace.CurrentTabPreview function to check if the current script is a preview and ScriptWorkspace.CurrentTabTogglePreview to click the preview button.

This function is free to use.

Created 28th July 2026 , last changed 28th July 2026

  
[ScriptWorkspace.CurrentTabToggleClose](ScriptWorkspaceCurrentTabToggleClose.md) - [ScriptWorkspace.ExpandScriptFolders](ScriptWorkspaceExpandScriptFolders.md)

[HTML Version](ScriptWorkspaceCurrentTabTogglePreview.shtml)