Skip to content

Applescript Utilities.applescript

antoniondc edited this page Oct 29, 2025 · 1 revision

description: QLab Applescript Utility Library with shared variables, functions, QLab version management, and debug mode control. author: Ben Smith version: "1.3" source: testedqlab: "4.7" testedmacos: 10.15.7 separateprocess: "true"

A funcionalidade de escolher a versão do QLab está sendo mais difícil de implementar em sua totalidade para todos os scripts, por limitações da própria linguagem applescript.

Change Log

Version Date Author Description
1.4 2025.07.19 Antonio Nunes globals expanded and auto-initializer added
1.3 Antonio Nunes + implemented debugMode management with default false and access functions
1.2 Ben Smith + added strict validation for QLab versions 3,4,5 with default 4
1.1 Ben Smith + added QLab version management functions (userLevel, userPrefix)
+ improved error handling and code clarity
1.0 yyyy-mm-dd Ben Smith Initial version

Overview

Utilitário e ferramentas para todos os scripts funcionarem em conjunto. Variáveis globais, temporary cue list switch, noteVariable entre outras ferramentas. Aqui voce define a versão do seu Qlab instalada no seu Mac.


Parameters / User Variables

Variable Type Default Description
userQLabVersion Number 4 Default version: 3, 4, or 5
userWorkspaceName String "Default V4" Default workspace name

Code Example

Exemplo de handles

--------------------------------------------------------------------------------

-- 🛠️ Loader, Utility Init, and Globals Injection

--------------------------------------------------------------------------------

**global** APPEND_TARGET_TO_NAME, USE_DIRECT_SELECTION_TARGET, TARGET_LIST_NAME, AUTO_CUE_TYPE

  

-- Configurations for Cue List creation

**global** SKIP_IF_LIST_EXISTS, CREATE_LIST_IF_MISSING, SHOW_CREATION_POPUP, AUTO_CUE_TYPE, TARGET_LIST_NAME

  

**set** utils **to** getScriptFromLibrary("Applescript Utilities.scpt")

utils's initGlobals()


--------------------------------------------------------------------------------

-- 🛠️ Script loader from user Library

--------------------------------------------------------------------------------

**on** getScriptFromLibrary(relativeSubPath)

**return** **load script** _file_ ((**path to** _library folder_ from _user domain_ as _text_) & "Script Libraries:Qlab:" & relativeSubPath)

**end** getScriptFromLibrary

What It Does

  • Deixa a variável global disponível para todos os scripts utilizarem

  • A funcionalidade de escolher a versão do QLab está sendo mais difícil de implementar em sua totalidade para todos os scripts, por limitações da própria linguagem applescript. Provavelmente em um futuro terá versões distintas para cada versão do QLab.


Related Scripts


Menu

=================== < Back To Repo > ===================

Clone this wiki locally