├── .github └── workflows │ └── deploy-vitepress.yml ├── .gitignore ├── LICENSE ├── README.md ├── docs ├── .vitepress │ └── config.js └── src │ ├── guide │ ├── 4v5.md │ ├── index.md │ └── license.md │ ├── index.md │ └── scripts │ ├── batch-edits │ ├── arming.md │ ├── colors.md │ ├── index.md │ ├── levels-gangs.md │ ├── names-numbers.md │ ├── other.md │ └── stem-files.md │ ├── console-recalls │ ├── digico.md │ └── yamaha.md │ ├── fades.md │ ├── groups.md │ ├── how-to.md │ ├── index.md │ ├── manage-overrides.md │ ├── misc.md │ ├── remote-control.md │ └── triggers.md ├── package-lock.json ├── package.json ├── scripts v4 ├── Add Go To Next Cue to groups.applescript ├── Batch Cue Edits │ ├── Arm Selected.applescript │ ├── Change Patch.applescript │ ├── Clear Gangs.applescript │ ├── Crosspoint Reset.applescript │ ├── Disarm Selected.applescript │ ├── Move number to name.applescript │ ├── Name Cues in Sequence.applescript │ ├── Number Cues in Sequence.appplescript │ ├── Remove file extension from name.applescript │ ├── Set color from list.applescript │ ├── Set group color by child.applescript │ ├── Target Cues in Sequence.applescript │ ├── Toggle Armed of Selected.applescript │ └── Toggle boolean argument of network cue.applescript ├── Complete selected.applescript ├── Copy uniqueID of selected.applescript ├── Create Fades │ ├── Create fade-and-stops for selected.applescript │ └── Create fades for selected.applescript ├── Create Triggers │ ├── Create OSC trigger for cue x.applescript │ ├── Create OSC triggers for selected.applescript │ └── Create Start triggers for selected.applescript ├── DS100 Rig Check Helper.applescript ├── DiGiCo Snapshots │ ├── Create DiGiCo Snapshot Group.applescript │ ├── Create DiGiCo Snapshot.applescript │ └── DiGiCo CC Generator.applescript ├── Group selected individually.applescript ├── Group selected, inherit name.applescript ├── Level changes │ ├── Change all cue levels by dialog.applescript │ ├── Master Decrement.applescript │ ├── Master Increment.applescript │ ├── Master to -inf.applescript │ └── Master to 0dB.applescript ├── Load Parent Group to start of selected Child.applescript ├── Move to cut list.applescript ├── Overrides │ ├── MIDI In Toggle.applescript │ ├── OSC Out Disable.applescript │ ├── OSC Out Enable.applescript │ ├── Show Overrides, Position Bottom Right.applescript │ └── Show Overrides, Position Top Left.applescript ├── Remote Control │ ├── Remote App Launch.applescript │ ├── Remote File Open.applescript │ └── Remote Shutdown.applescript ├── Stem Versioning │ ├── Reveal File Target.applescript │ ├── Target version bump by filename.applescript │ └── Target version bump by folder.applescript ├── Undo Go.applescript ├── Which cues use output x?.applescript └── Yamaha Scenes │ ├── Create Yamaha Scene Group.applescript │ ├── Create Yamaha Scene.applescript │ └── Yamaha 300 Generator.applescript └── scripts v5 ├── Add Go To Next Cue to groups.applescript ├── Batch Cue Edits ├── Arm Selected.applescript ├── Change Network Patch.applescript ├── Clear Gangs.applescript ├── Disarm Selected.applescript ├── Move number to name.applescript ├── Name Cues in Sequence.applescript ├── Remove file extension from name.applescript ├── Set color from list.applescript ├── Set group color by child.applescript ├── Toggle Armed of Selected.applescript └── Toggle boolean argument of network cue.applescript ├── Complete selected.applescript ├── Copy uniqueID of selected.applescript ├── Create Fades ├── Create fade-and-stops for selected.applescript └── Create fades for selected.applescript ├── Create Triggers ├── Create LX MSC Cue.applescript ├── Create OSC trigger for cue x.applescript ├── Create OSC triggers for selected.applescript └── Create Start triggers for selected.applescript ├── DS100 Speaker Check Builder.applescript ├── Device Patch Columns.applescript ├── DiGiCo Snapshots ├── Create DiGiCo Snapshot Group.applescript ├── Create DiGiCo Snapshot.applescript └── DiGiCo CC Generator.applescript ├── Group selected individually.applescript ├── Group selected, inherit name.applescript ├── Level changes ├── Change all cue levels by dialog.applescript ├── Main Decrement.applescript ├── Main Increment.applescript ├── Main to -inf.applescript ├── Main to 0dB.applescript └── Set crosspoint.applescript ├── Load Parent Group to start of selected Child.applescript ├── Move to cut list.applescript ├── Overrides ├── MIDI In Toggle.applescript ├── OSC Out Disable.applescript ├── OSC Out Enable.applescript ├── Show Overrides, Position Bottom Right.applescript └── Show Overrides, Position Top Left.applescript ├── Remote Control ├── Remote App Launch.applescript ├── Remote File Open.applescript └── Remote Shutdown.applescript ├── Set trigger from cue number.applescript ├── Stem Versioning ├── Reveal File Target.applescript ├── Target version bump by filename.applescript └── Target version bump by folder.applescript ├── Undo Go.applescript ├── Which cues use output x.applescript └── Yamaha Scenes ├── Create Yamaha Rivage Decimal-Scene MIDI.applescript ├── Create Yamaha Scene Group.applescript ├── Create Yamaha Scene.applescript ├── Yamaha CL Generator.applescript └── Yamaha Rivage Generator.applescript /.github/workflows/deploy-vitepress.yml: -------------------------------------------------------------------------------- 1 | name: Deploy VitePress site to Pages 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | workflow_dispatch: 7 | 8 | permissions: 9 | contents: read 10 | pages: write 11 | id-token: write 12 | 13 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 14 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 15 | concurrency: 16 | group: pages 17 | cancel-in-progress: false 18 | 19 | jobs: 20 | build: 21 | runs-on: ubuntu-latest 22 | steps: 23 | - name: Checkout 24 | uses: actions/checkout@v4 25 | with: 26 | fetch-depth: 0 # Not needed if lastUpdated is not enabled 27 | - name: Setup Node 28 | uses: actions/setup-node@v4 29 | with: 30 | node-version: 20 31 | cache: npm 32 | - name: Setup Pages 33 | uses: actions/configure-pages@v4 34 | - name: Install dependencies 35 | run: npm ci 36 | - name: Build with VitePress 37 | run: | 38 | npm run docs:build 39 | touch docs/.vitepress/dist/.nojekyll 40 | - name: Upload artifact 41 | uses: actions/upload-pages-artifact@v3 42 | with: 43 | path: docs/.vitepress/dist 44 | 45 | deploy: 46 | environment: 47 | name: github-pages 48 | url: ${{ steps.deployment.outputs.page_url }} 49 | needs: build 50 | runs-on: ubuntu-latest 51 | name: Deploy 52 | steps: 53 | - name: Deploy to GitHub Pages 54 | id: deployment 55 | uses: actions/deploy-pages@v4 56 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | node_modules 4 | 5 | docs/.vitepress/cache 6 | docs/.vitepress/dist -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2021-2024 Sam Schloegel 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 11 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 12 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 13 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 14 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 15 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 16 | SOFTWARE. 17 | 18 | Although it is not explicitly required, the copyright holder prefers that you 19 | do not remove the comment at the top of each script which provides the 20 | repository link and version information. Thanks. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # qlab-scripts 2 | 3 | Complex [QLab](https://qlab.app/) programming can be made much simpler with the use of Applescript automation. This is a collection of scripts I have found useful in various situations. Some are broadly useful, some are very specific to one particular problem. Some I wrote for myself, some I wrote to make someone else's workflow easier. 4 | 5 | The best way to browse the available scripts is to use the documentation site, available here: https://samschloegel.github.io/qlab-scripts/ 6 | 7 | Any questions, suggestions, bug reports, or other feedback - please [submit an issue](https://github.com/samschloegel/qlab-scripts/issues) or [send me an email](mailto:hello@schloegel.nyc)! 8 | 9 | Let me know if you get any use out of these, I'd love to hear about it. 10 | 11 | Cheers, 12 | 13 | Sam 14 | 15 | --- 16 | 17 | Not affiliated with [Figure53](https://figure53.com/). QLab's Applescript documentation can be found [here](https://qlab.app/docs/v5/scripting/applescript-dictionary-v5/). 18 | 19 | --- 20 | 21 | ## LICENSE 22 | 23 | While it is not currently mandated, I would appreciate if you could please not delete the comment lines that are included at the top of each script: 24 | 25 | ``` 26 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 27 | -- Built for QLab X. vXXXXXX-XX 28 | ``` 29 | 30 | As your workspace gets passed around to different users, this comment helps point them back to this repository to make suggestions, report bugs, and ask for help. Please leave it intact. 31 | -------------------------------------------------------------------------------- /docs/.vitepress/config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitepress"; 2 | 3 | export default defineConfig({ 4 | title: "Sam's QLab Scripts", 5 | description: "", 6 | base: "/qlab-scripts/", 7 | srcDir: "src", 8 | cleanUrls: true, 9 | markdown: { 10 | lineNumbers: true, 11 | }, 12 | themeConfig: { 13 | nav: [ 14 | { text: "Home", link: "/" }, 15 | { text: "Guide", link: "/guide/" }, 16 | ], 17 | sidebar: [ 18 | { 19 | text: "Guide", 20 | items: [ 21 | { text: "How To", link: "/guide/" }, 22 | { text: "License", link: "/guide/license" }, 23 | { text: "QLab 5 vs QLab 4", link: "/guide/4v5" }, 24 | ], 25 | }, 26 | { 27 | text: "Scripts", 28 | items: [ 29 | { 30 | text: "Batch Editing", 31 | collapsed: false, 32 | items: [ 33 | { 34 | text: "Using batch editing", 35 | link: "/scripts/batch-edits/", 36 | }, 37 | { text: "Arming", link: "/scripts/batch-edits/arming" }, 38 | { 39 | text: "Names & Numbers", 40 | link: "/scripts/batch-edits/names-numbers", 41 | }, 42 | { text: "Colors", link: "/scripts/batch-edits/colors" }, 43 | { 44 | text: "Levels & Gangs", 45 | link: "/scripts/batch-edits/levels-gangs", 46 | }, 47 | { 48 | text: "Stem File Versioning", 49 | link: "/scripts/batch-edits/stem-files", 50 | }, 51 | { text: "Other", link: "/scripts/batch-edits/other" }, 52 | ], 53 | }, 54 | 55 | { text: "Fades", link: "/scripts/fades" }, 56 | { text: "Groups", link: "/scripts/groups" }, 57 | { text: "Triggers", link: "/scripts/triggers" }, 58 | { 59 | text: "Console Recalls", 60 | collapsed: false, 61 | items: [ 62 | { 63 | text: "Yamaha Scenes", 64 | link: "/scripts/console-recalls/yamaha", 65 | }, 66 | { 67 | text: "DiGiCo Snapshots", 68 | link: "/scripts/console-recalls/digico", 69 | }, 70 | ], 71 | }, 72 | { text: "Manage Overrides", link: "/scripts/manage-overrides" }, 73 | { text: "Remote Control of macOS", link: "/scripts/remote-control" }, 74 | { text: "Miscellaneous", link: "/scripts/misc" }, 75 | ], 76 | }, 77 | ], 78 | socialLinks: [ 79 | { icon: "github", link: "https://github.com/samschloegel/qlab-scripts" }, 80 | ], 81 | outline: { 82 | level: "deep", 83 | }, 84 | search: { 85 | provider: "local", 86 | }, 87 | externalLinkIcon: true, 88 | lastUpdated: { 89 | text: "Last updated", 90 | formatOptions: { 91 | dateStyle: "short", 92 | }, 93 | }, 94 | editLink: { 95 | pattern: 96 | "https://github.com/samschloegel/qlab-scripts/tree/main/docs/src/:path", 97 | text: "Suggest an edit on GitHub", 98 | }, 99 | }, 100 | }); 101 | -------------------------------------------------------------------------------- /docs/src/guide/4v5.md: -------------------------------------------------------------------------------- 1 | # QLab 4 vs QLab 5: 2 | 3 | The scripts that appear in this guide are written for QLab 5. Versions which are compatible with QLab 4 can be found in the repo [here](https://github.com/samschloegel/qlab-scripts/tree/main/scripts%20v4). 4 | 5 | ::: warning COMPATIBILITY AND UPDATES 6 | Over time, I will be spending less time consciously updating scripts for QLab 4. Most of the v4 scripts were last used/tested before the release of QLab 4.7.0. 7 | ::: 8 | -------------------------------------------------------------------------------- /docs/src/guide/index.md: -------------------------------------------------------------------------------- 1 | # How To 2 | 3 | ## Using this guide 4 | 5 | Script contents appear in a code block, as shown below. You can select and copy the contents, or hover over the top-right corner to find a "Copy" button. 6 | 7 | Some scripts have "User Parameters", generally located at the top of the script. User Parameters are explained in a box above the code block, and are highlighted within the code block. For example: 8 | 9 | ::: tip USER PARAMETERS 10 | 11 | `variable_name` explanation 12 | 13 | ::: 14 | 15 | ```applescript{4} 16 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 17 | -- Built for QLab 5. vYYMMDD-XX 18 | 19 | set variable_name to "some value" 20 | 21 | tell application id "com.figure53.QLab.5" to tell front workspace 22 | ... 23 | end tell 24 | ``` 25 | 26 | ## Using Script Cues 27 | 28 | Many of the scripts here are best used in a Script Cue, with an assigned hotkey trigger. 29 | 30 | 1. Create a cue list called "Hotkeys" 31 | 1. Create a new Script Cue 32 | 1. Inspector > Triggers tab > Enter your preferred hotkey trigger 33 | 1. Inspector > Script tab > Paste script in and click "Compile Script" 34 | 35 | ## Using macOS Script Editor 36 | 37 | 1. Applications > Utilities > Script Editor > New Script 38 | 1. Paste script in and click "Compile" (Cmd-K) 39 | 1. Do what you need to in QLab (such as selecting relevant cues) 40 | 1. In Script Editor, click Run (Cmd-R) 41 | 42 | ## Learning to write your own scripts 43 | 44 | I learned to write AppleScript for QLab primarily by trying to use and interpret other people's scripts - which is why I am sharing and documenting my own scripts here. AppleScript is relatively human-readable on its own, which makes it very accessible to inexperienced users. 45 | 46 | Here are some useful guides and documentation: 47 | 48 | - QLab's official AppleScript dictionary can be found [here](https://qlab.app/docs/v5/scripting/applescript-dictionary-v5/) 49 | 50 | - If you have QLab installed, you can access the dictionary with the macOS Script Editor. Go to File > Open Dictionary... > QLab.app 51 | 52 | - Apple's AppleScript Language Guide can be found [here](https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html) 53 | -------------------------------------------------------------------------------- /docs/src/guide/license.md: -------------------------------------------------------------------------------- 1 | # License 2 | 3 | While it is not currently mandated, I would appreciate if you could please not remove the comment lines that are included at the top of each script: 4 | 5 | ``` 6 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 7 | -- Built for QLab X. vXXXXXX-XX 8 | ``` 9 | 10 | As your workspace gets passed around to different users, this comment helps point them back to this repository to make suggestions, report bugs, and ask for help. Please leave it in place. 11 | 12 | The full license text is available [here](https://github.com/samschloegel/qlab-scripts/blob/main/LICENSE) 13 | -------------------------------------------------------------------------------- /docs/src/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: home 3 | 4 | hero: 5 | name: "Sam's QLab Scripts" 6 | tagline: Complex QLab programming can be much easier with AppleScript automation. 7 | actions: 8 | - theme: brand 9 | text: Start Here 10 | link: /guide/ 11 | - theme: alt 12 | text: View Repo 13 | link: https://github.com/samschloegel/qlab-scripts 14 | - theme: alt 15 | text: schloegel.nyc 16 | link: https://schloegel.nyc 17 | --- 18 | 19 | This is a collection of scripts I have found useful in various situations. Some are broadly useful, some are very specific to one particular problem. Some I wrote for myself, some I wrote to make someone else's workflow easier. 20 | 21 | ::: info FEEDBACK 22 | Please let me know what you think! 23 | 24 | If you have questions, suggestions, bug reports, or other feedback - please [submit an issue](https://github.com/samschloegel/qlab-scripts/issues) or [email me](mailto:hello@schloegel.nyc) 25 | 26 | ::: 27 | 28 | --- 29 | 30 | Not affiliated with [Figure53](https://figure53.com/). QLab's AppleScript documentation can be found [here](https://qlab.app/docs/v5/scripting/applescript-dictionary-v5/). 31 | 32 | --- 33 | -------------------------------------------------------------------------------- /docs/src/scripts/batch-edits/arming.md: -------------------------------------------------------------------------------- 1 | 4 | 5 | # Arming 6 | 7 | ## Arm 8 | 9 | Arms selected cues 10 | 11 | <<< @/../../scripts v5/Batch Cue Edits/Arm Selected.applescript 12 | 13 | ## Disarm 14 | 15 | Disarms selected cues 16 | 17 | <<< @/../../scripts v5/Batch Cue Edits/Disarm Selected.applescript 18 | 19 | ## Toggle Armed State 20 | 21 | Toggles the armed state of selected cues. Evaluates state cue-by-cue. 22 | 23 | <<< @/../../scripts v5/Batch Cue Edits/Toggle Armed of Selected.applescript 24 | -------------------------------------------------------------------------------- /docs/src/scripts/batch-edits/colors.md: -------------------------------------------------------------------------------- 1 | # Colors 2 | 3 | ## Set color from list 4 | 5 | Navigating to the color selector of the **Basics** tab is tedious. Instead, add your list of favorite colors here, and then set color from a list without touching the mouse. 6 | 7 | <<< @/../../scripts v5/Batch Cue Edits/Set color from list.applescript 8 | 9 | ## Set group color by child 10 | 11 | If the children of the selected groups only contain one color (other than 'none'), set the selected group to that color as well. 12 | 13 | Only works on direct children, not grandchildren etc (not recursive). 14 | 15 | > **Example:** 16 | > All MIDI triggers to LX are color-coded red. The selected group has an LX trigger in it, and none of the other children have a color set, so the group is set to red as well, indicating that it contains an LX trigger. 17 | 18 | <<< @/../../scripts v5/Batch Cue Edits/Set group color by child.applescript 19 | -------------------------------------------------------------------------------- /docs/src/scripts/batch-edits/index.md: -------------------------------------------------------------------------------- 1 | # Batch Cue Edits 2 | 3 | ## How to use batch-editing scripts 4 | 5 | 1. Copy the script into a Script Cue 6 | 1. In the **Triggers** tab of the **Inspector**, set your preferred hotkey or other trigger 7 | 1. Select the cues you want to batch-edit 8 | 1. Trigger the script cue with your chosen method 9 | 10 | ## `Template` 11 | 12 | To write your own batch-editing scripts, you can start with the following template. 13 | 14 | ```applescript 15 | tell application id "com.figure53.QLab.5" to tell front workspace 16 | set theSelection to (selected as list) 17 | 18 | repeat with eachCue in theSelection 19 | -- Do something here 20 | end repeat 21 | 22 | end tell 23 | ``` 24 | -------------------------------------------------------------------------------- /docs/src/scripts/batch-edits/levels-gangs.md: -------------------------------------------------------------------------------- 1 | # Levels & Gangs 2 | 3 | ## Main Level Increment 4 | 5 | ::: tip USER PARAMETERS 6 | 7 | `userIncrement` is the number of decibels by which the 'Main' level of the selected cues will be incremented 8 | 9 | ::: 10 | 11 | <<< @/../../scripts v5/Level changes/Main Increment.applescript 12 | 13 | ## Main Level Decrement 14 | 15 | ::: tip USER PARAMETERS 16 | 17 | `userDecrement` is the number of decibels by which the 'Main' level of the selected cues will be decremented 18 | 19 | ::: 20 | 21 | <<< @/../../scripts v5/Level changes/Main Decrement.applescript 22 | 23 | ## Main Level to 0dB 24 | 25 | <<< @/../../scripts v5/Level changes/Main to 0dB.applescript 26 | 27 | ## Main Level to -inf 28 | 29 | <<< @/../../scripts v5/Level changes/Main to -inf.applescript 30 | 31 | ## Change all cue levels by dialog 32 | 33 | - A dialog asks for an increment value (can be negative, to decrement) and then changes all cue output fader values of a single selected cue by that amount. 34 | 35 | - There are probably better ways to accomplish the same goal here, but maybe you're working for someone who wants to do it this way, and this can save you the headache. 36 | 37 | ::: tip USER PARAMETERS 38 | 39 | `defaultChange` is the pre-filled value for the user-input dialog 40 | 41 | `minLevel` should be set to match the value in Workspace Settings > Audio > Volume Limits > Min. This is the level at or below which cue levels will be considered '-inf'. 42 | 43 | ::: 44 | 45 | <<< @/../../scripts v5/Level changes/Change all cue levels by dialog.applescript {4-5} 46 | 47 | ## Clear Gangs 48 | 49 | ::: tip USER PARAMETERS 50 | 51 | `outputCount` is the number of cue outputs you are using (or wish to remove gangs from) 52 | 53 | ::: 54 | 55 | <<< @/../../scripts v5/Batch Cue Edits/Clear Gangs.applescript 56 | 57 | ## Set crosspoint 58 | 59 | Batch editing to set a specific cue level matrix crosspoint to a fixed number. While QLab provides lots of useful batch editing features, this will allow you to select large numbers of cues which may not all be audio cues specifically - but will then work on all audio cues within that selection. 60 | 61 | Note that this will only adjust audio cues, and not fades or mic cues. 62 | 63 | ::: tip USER PARAMETERS 64 | 65 | `userLevel` The desired crosspoint level 66 | 67 | `userRow` The audio file channel; 0 is the cue output fader, 1 is typically Left, 2 Right 68 | 69 | `userColumn` The cue output channel; 0 is the main column, 1 is the first cue output, etc. 70 | 71 | ::: 72 | 73 | <<< @/../../scripts v5/Level changes/Set crosspoint.applescript 74 | -------------------------------------------------------------------------------- /docs/src/scripts/batch-edits/names-numbers.md: -------------------------------------------------------------------------------- 1 | # Names & Numbers 2 | 3 | ## Name in Sequence 4 | 5 | <<< @/../../scripts v5/Batch Cue Edits/Name Cues in Sequence.applescript 6 | 7 | ## Number in Sequence 8 | 9 | No script needed! Just use QLab's built-in tools. Go to `Tools > Renumber selected cues...` or press `Cmd-R` 10 | 11 | ## De-Number, Move to Name 12 | 13 | <<< @/../../scripts v5/Batch Cue Edits/Move number to name.applescript 14 | 15 | ## Remove extension from name 16 | 17 | <<< @/../../scripts v5/Batch Cue Edits/Remove file extension from name.applescript 18 | -------------------------------------------------------------------------------- /docs/src/scripts/batch-edits/other.md: -------------------------------------------------------------------------------- 1 | # Other 2 | 3 | ## Change Network Patch 4 | 5 | Change the patch of selected cues, without touching the mouse. 6 | 7 | ::: tip USER PARAMETERS 8 | 9 | `networkPatchQty` is the integer quantity of network patches used in your workspace 10 | 11 | ::: 12 | 13 | <<< @/../../scripts v5/Batch Cue Edits/Change Network Patch.applescript{4} 14 | 15 | ## Toggle boolean argument of network cue 16 | 17 | If the last character of the custom message of a network cue is 1 or 0, toggle it. This is useful for OSC messages which change mute states or other boolean states. 18 | 19 | <<< @/../../scripts v5/Batch Cue Edits/Toggle boolean argument of network cue.applescript 20 | -------------------------------------------------------------------------------- /docs/src/scripts/batch-edits/stem-files.md: -------------------------------------------------------------------------------- 1 | # Stem File Versioning 2 | 3 | ## Bump Version by Folder 4 | 5 | Keep the filenames of the audio files identical apart from the version number at the end. They can be in separate folders or the same folder. 6 | 7 | This script will ask you to select the folder of the new stem files, and request the current and new version numbers. It is important that you enter the correct number of digits, including leading zeroes. "1" will not be treated the same as "01". The old and new version do not need to have the same number of digits; it is possible to update from "01" to "2" or even from "005" to "04". 8 | 9 | The script then re-targets your audio cues. This way, you don't lose the integrated fade envelope and other cue settings you've already built, but can batch re-target all your stems quickly and save tedious busy-work. 10 | 11 | ::: warning 12 | Do not use slashes in your filenames. This script uses 'POSIX' /paths/to/files so adding slashes to the file names will break the current version of this script. 13 | ::: 14 | 15 | ::: warning 16 | Make sure to use the correct number of digits / leading zeroes for both the old version and the new version numbers. 17 | ::: 18 | 19 | <<< @/../../scripts v5/Stem Versioning/Target version bump by folder.applescript{4} 20 | 21 | ## Reveal File Target 22 | 23 | This will reveal the file target of the last selected Audio cue in the Finder. QLab also provides a built-in tool for this in **Tools > Reveal target file in Finder** but it does not have an associated hotkey. 24 | 25 | <<< @/../../scripts v5/Stem Versioning/Reveal File Target.applescript 26 | 27 | ## Bump Version by File Name 28 | 29 | This script is not as good as the one above as it is more restrictive. But feel free to try it if you want.... 30 | 31 | You have a group of audio cues, which are stems for a piece of music. The filenames all end in "v03" or something similar. You just bounced new stem files called "v04" but you don't want to tediously manually re-target them all. No one wants to hold for sound. Use this script instead! All the "v04" files must be located in the same folder as the "v03" files. 32 | 33 | ::: tip USER PARAMETERS 34 | 35 | `versionLength` is the number of digits used for version numbers. 2 is recommended: v1 / v01 36 | 37 | ::: 38 | 39 | <<< @/../../scripts v5/Stem Versioning/Target version bump by filename.applescript{4} 40 | -------------------------------------------------------------------------------- /docs/src/scripts/console-recalls/digico.md: -------------------------------------------------------------------------------- 1 | # Console Recalls 2 | 3 | ## How to use 4 | 5 | These scripts operate together as a set. 6 | 7 | ::: info IMPORTANT 8 | **DiGiCo SD Theatre consoles do not have a default MIDI-to-snapshot routing map out of the box.** 9 | 10 | This set of scripts assumes a MIDI routing scheme where: 11 | 12 | - Snapshots are numbered `XX.YY` 13 | - Related MIDI triggers are Control Changes with Control Number `XX` and Control Value `YY` 14 | 15 | You do not have to stick to this scheme in an absolute manner - just as a starting point for generating triggers. The generated trigger list can be altered and supplemented manually after initial creation. 16 | 17 | ::: 18 | 19 | 1. Run the "list generator" script (preferably from [Script Editor](/guide/#using-macos-script-editor)) in a new empty "Console Cues" cue list 20 | 1. Add the "Add Snapshot to Cue List" scripts to your "Hotkeys" cue list 21 | 1. In your Main cue list, use the hotkey scripts to add console recalls to your show 22 | 23 | ## DiGiCo Control-Change List Generator 24 | 25 | ::: tip USER PARAMETERS 26 | `userPrefix` is a cue-number prefix for the generated MIDI cues and should not be left blank 27 | 28 | `userNamePrefix` is a cue-name prefix for the generated MIDI cues 29 | 30 | `showMIDIInfo` is a boolean which toggles including the MIDI details in the cue names of the generated cues 31 | 32 | `userCount` is the number of snapshot triggers you need to generate. The current version of this script does not work with a value above 384. 33 | 34 | ::: 35 | 36 | <<< @/../../scripts v5/DiGiCo Snapshots/DiGiCo CC Generator.applescript{4-7} 37 | 38 | ## Add Snapshot to Cue List 39 | 40 | ::: tip USER PARAMETERS 41 | `userColor` see list generator script above - must match 42 | 43 | `userPrefix` see list generator script above - must match 44 | 45 | `userNameParent` If set to 'true', the parent group of the newly created cue will be color coded and have a suffix added to indicate the presence of a console cue 46 | 47 | ::: 48 | 49 | <<< @/../../scripts v5/DiGiCo Snapshots/Create DiGiCo Snapshot.applescript 50 | 51 | ## Add Snapshot Group to Cue List 52 | 53 | ::: tip USER PARAMETERS 54 | `userColor` see list generator script above - must match 55 | 56 | `userPrefix` see list generator script above - must match 57 | 58 | `userNameParent` If set to 'true', the parent group of the newly created cue will be color coded and have a suffix added to indicate the presence of a console cue 59 | 60 | ::: 61 | 62 | <<< @/../../scripts v5/DiGiCo Snapshots/Create DiGiCo Snapshot Group.applescript 63 | -------------------------------------------------------------------------------- /docs/src/scripts/console-recalls/yamaha.md: -------------------------------------------------------------------------------- 1 | # Yamaha Console Recalls 2 | 3 | ## How to use 4 | 5 | These scripts operate together as a set. 6 | 7 | 1. Choose the appropriate "list generator" script for your console - CL Series or Rivage 8 | 1. Run the "list generator" script (preferably from [Script Editor](/guide/#using-macos-script-editor)) in a new empty "Console Cues" cue list 9 | 1. Add the "Add Scene to Cue List" scripts to your "Hotkeys" cue list 10 | 1. In your Main cue list, use the hotkey scripts to add console recalls to your show 11 | 12 | ## CL Series List Generator 13 | 14 | This generates a cue list based on the default MIDI mapping for CL consoles. These have a fixed Program Change to Scene Recall map which is very laborious to edit or replace, so this simply follows that existing format so you don't have to think about it. 15 | 16 | ::: tip USER PARAMETERS 17 | `userPrefix` is a cue-number prefix for the generated MIDI cues and should not be left blank 18 | 19 | `userNamePrefix` is a cue-name prefix for the generated MIDI cues 20 | 21 | `showMIDIInfo` is a boolean which toggles including the MIDI details in the cue names of the generated cues 22 | 23 | ::: 24 | 25 | <<< @/../../scripts v5/Yamaha Scenes/Yamaha CL Generator.applescript 26 | 27 | ## Rivage PM Series List Generator 28 | 29 | <<< @/../../scripts v5/Yamaha Scenes/Yamaha Rivage Generator.applescript 30 | 31 | ### Rivage PM Series Single Decimal-Cue Generator 32 | 33 | For manually adding point-cues to the console cues list 34 | 35 | ::: details Code 36 | <<< @/../../scripts v5/Yamaha Scenes/Create Yamaha Rivage Decimal-Scene MIDI.applescript 37 | ::: 38 | 39 | ## Add Scene to Cue List 40 | 41 | <<< @/../../scripts v5/Yamaha Scenes/Create Yamaha Scene.applescript 42 | 43 | ## Add Scene Group to Cue List 44 | 45 | <<< @/../../scripts v5/Yamaha Scenes/Create Yamaha Scene Group.applescript 46 | -------------------------------------------------------------------------------- /docs/src/scripts/fades.md: -------------------------------------------------------------------------------- 1 | # Create Fades 2 | 3 | ## Fades for Selected Cues 4 | 5 | ::: tip USER PARAMETERS 6 | 7 | `userDuration` is the duration in seconds of the generated fade cues 8 | 9 | ::: 10 | 11 | <<< @/../../scripts v5/Create Fades/Create fades for selected.applescript{4} 12 | 13 | ## Fade-and-Stops for Selected Cues 14 | 15 | ::: tip USER PARAMETERS 16 | 17 | `userDuration` is the duration in seconds of the generated fade cues 18 | 19 | ::: 20 | 21 | <<< @/../../scripts v5/Create Fades/Create fade-and-stops for selected.applescript{4} 22 | -------------------------------------------------------------------------------- /docs/src/scripts/groups.md: -------------------------------------------------------------------------------- 1 | # Create Groups 2 | 3 | ## Group Selected Individually 4 | 5 | Encapsulate each selected cue within its own group. 6 | 7 | <<< @/../../scripts v5/Group selected individually.applescript 8 | 9 | ## Group Selected, Inherit Name 10 | 11 | Puts selected cues in a group together. 12 | 13 | Why use this instead of the New Group Cue hotkey? Because it works even if there is only one cue selected - and in that case, it will copy the cue's name to the group's name. 14 | 15 | <<< @/../../scripts v5/Group selected, inherit name.applescript 16 | -------------------------------------------------------------------------------- /docs/src/scripts/how-to.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samschloegel/qlab-scripts/0214ddbca695c9eabf675b1ff0166aba2a89e277/docs/src/scripts/how-to.md -------------------------------------------------------------------------------- /docs/src/scripts/index.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samschloegel/qlab-scripts/0214ddbca695c9eabf675b1ff0166aba2a89e277/docs/src/scripts/index.md -------------------------------------------------------------------------------- /docs/src/scripts/manage-overrides.md: -------------------------------------------------------------------------------- 1 | # Manage Overrides 2 | 3 | ## Toggle MIDI Input 4 | 5 | <<< @/../../scripts v5/Overrides/MIDI In Toggle.applescript 6 | 7 | ## OSC Output Enable 8 | 9 | <<< @/../../scripts v5/Overrides/OSC Out Enable.applescript 10 | 11 | ## OSC Output Disable 12 | 13 | <<< @/../../scripts v5/Overrides/OSC Out Disable.applescript 14 | 15 | ## Show Overrides Window, Position Bottom Right 16 | 17 | <<< @/../../scripts v5/Overrides/Show Overrides, Position Bottom Right.applescript 18 | 19 | ## Show Overrides Window, Position Top Left 20 | 21 | <<< @/../../scripts v5/Overrides/Show Overrides, Position Top Left.applescript 22 | -------------------------------------------------------------------------------- /docs/src/scripts/misc.md: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | 3 | ## Add go to next cue to groups 4 | 5 | A weird fix for a weird cueing workflow. If you're using MIDI triggers that are specific to each cue fired, but still want selective advance-playhead control, this might be for you. 6 | 7 | <<< @/../../scripts v5/Add Go To Next Cue to groups.applescript 8 | 9 | ## Complete Selected 10 | 11 | That one long cue takes forever, you're in tech, and you need the cue to complete in order to get in place to continue. This script loads the selected cue to 99.9% complete, and then fires it. Let's move on. 12 | 13 | <<< @/../../scripts v5/Complete selected.applescript 14 | 15 | ## Load Parent Group to Start of Selected Child 16 | 17 | You have a big, long-running timeline group. You're in tech and need to start from the beginning of the fourth child in the timeline. Select that child cue, and run this script using a hotkey. It will put you in the right place. 18 | 19 | ::: tip USER PARAMETERS 20 | 21 | `userPreRoll` is the number of seconds prior to the start of the selected child at which to begin playback. 22 | 23 | ::: 24 | 25 | <<< @/../../scripts v5/Load Parent Group to start of selected Child.applescript{4} 26 | 27 | ## "Undo Go" 28 | 29 | You hit 'GO' too soon and you're panicking. But don't panic all those cues that were already running! Just assign this as a hotkey near your panic button to only stop the cues from the most recently-triggered sequence. 30 | 31 | ::: warning 32 | 33 | This could have some weird, unintended consequences, and is completely context-dependent. Only use if you know what you're doing. 34 | 35 | ::: 36 | 37 | <<< @/../../scripts v5/Undo Go.applescript 38 | 39 | ## Copy uniqueIDs of Selected 40 | 41 | Copies the uniqueIDs of the selected cues to the clipboard. 42 | 43 | If no cues are selected, copies the unique ID of the cue list. 44 | 45 | If multiple cues are selected, copies them as a list. 46 | 47 | ::: tip USER PARAMETERS 48 | 49 | `userAlert` If true, will display a popup to the user when the script runs. 50 | 51 | `userDelimiter` is used to separate the IDs if there is more than one cue selected. 52 | 53 | ::: 54 | 55 | <<< @/../../scripts v5/Copy uniqueID of selected.applescript{4} 56 | 57 | ## DS100 Speaker Check Builder 58 | 59 | Builds a cue list for checking individual outputs of a DS100, based on a CSV file, using OSC. Further description/explanation to come. Feel free to try it out in the meantime, but maybe not in your show file the first time. 60 | 61 | <<< @/../../scripts v5/DS100 Speaker Check Builder.applescript{4-6} 62 | 63 | ## Move to Cut List 64 | 65 | You need to delete some old cues and clean up your main cue list, but you think some of these might come back in the future, and you don't want to lose your work. Use this script to clean up without deleting. 66 | 67 | The selected cues are moved to the 'cut cues' list you've chosen. They are then Disabled, and their hotkey, MIDI, timecode, and wall clock triggers are turned off. 68 | 69 | ::: tip USER PARAMETERS 70 | 71 | `cutListName` is the name of your "cut cues" cue list. 72 | 73 | ::: 74 | 75 | <<< @/../../scripts v5/Move to cut list.applescript{4} 76 | 77 | ## Which Cues Use Output X? 78 | 79 | This will comb through the selected cues to look for ones that use a given cue output that you're wondering about, then tell you how many cues use it, and select only those cues. 80 | 81 | This might help answer questions like: 82 | 83 | - Wow, did the sound designer really need and use ALL these cue outputs? 84 | - Oh no, I need another cue output - but I've already maxed out my interface channels! But wait - did I even use that one output? Maybe I can re-allocate it. 85 | 86 | ::: tip USER PARAMETERS 87 | 88 | `userThresh` should be set to match the value in Workspace Settings > Audio > Volume Limits > Min. This is the level at or below which cue levels will be considered '-inf'. 89 | 90 | ::: 91 | 92 | <<< @/../../scripts v5/Which cues use output x.applescript 93 | 94 | ## Set Trigger from Cue Number 95 | 96 | If you are using unique MIDI triggers from your console to fire each QLab cue, this script will use the cue number to determine a unique MIDI Note On trigger as follows: 97 | 98 | Cue XX.YY 99 | 100 | MIDI Note On, Note XX, Velocity YY 101 | 102 | ::: warning Errors 103 | 104 | This script is not very error-proof. 105 | 106 | The exact formatting of your cue numbers needs to be numbers only, with or without one decimal point, and within `0-127` ranges to be MIDI-compatible... etc.... 107 | 108 | ::: 109 | 110 | <<< @/../../scripts v5/Set trigger from cue number.applescript 111 | 112 | ## Device Patch Column Copier 113 | 114 | Copies and pastes whole columns in the Device Patch matrix of a given audio patch. 115 | 116 | <<< @/../../scripts v5/Device Patch Columns.applescript 117 | -------------------------------------------------------------------------------- /docs/src/scripts/remote-control.md: -------------------------------------------------------------------------------- 1 | # Remote Control of macOS 2 | 3 | ## How to use 4 | 5 | These scripts use 'eppc' address, with the format: 6 | 7 | `eppc://username:password@Hostname.local` 8 | 9 | You will need to replace the `username`, `password`, and `Hostname` portions of these addresses in each script according to your needs. 10 | 11 | ## App Launch 12 | 13 | ::: tip USER PARAMETERS 14 | 15 | Replace the name of the app to meet your needs. 16 | 17 | ::: 18 | 19 | <<< @/../../scripts v5/Remote Control/Remote App Launch.applescript 20 | 21 | ## File Open 22 | 23 | ::: tip USER PARAMETERS 24 | 25 | Replace the name and path of the files to meet your needs. 26 | 27 | ::: 28 | 29 | <<< @/../../scripts v5/Remote Control/Remote File Open.applescript 30 | 31 | ## Shutdown 32 | 33 | ::: warning 34 | This will shut down your computers **WITHOUT** saving your QLab workspace. 35 | ::: 36 | 37 | <<< @/../../scripts v5/Remote Control/Remote Shutdown.applescript 38 | -------------------------------------------------------------------------------- /docs/src/scripts/triggers.md: -------------------------------------------------------------------------------- 1 | # Create Triggers 2 | 3 | ## Create OSC Trigger for Cue X 4 | 5 | This is an edge-use thing and only useful if you need QLab to trigger itself via OSC for some particular reason. 6 | 7 | > **Example:** 8 | > 9 | > LX is triggering some (but not all) QLab cues, in a way that forces the QLab user to conform to the LX cue numbering. All cues in the Main cue stack are given a prefix or suffix to avoid unintended triggers from LX. All LX-triggered QLab cues live in a dedicated cue list, and this script is used to generate the contents of that cue list quickly, without the user needing to type the prefix or suffix each time they add a cue to the stack. 10 | 11 | ::: tip USER PARAMETERS 12 | 13 | `userPatch` is the OSC output patch name of the generated cues 14 | 15 | `userPrefix` is the cue number prefix, if needed (edge use case) 16 | 17 | `userSuffix` is the cue number suffix, if needed (edge use case) 18 | 19 | ::: 20 | 21 | <<< @/../../scripts v5/Create Triggers/Create OSC trigger for cue x.applescript 22 | 23 | ## Create OSC Triggers for Selected 24 | 25 | Creates a group of network cues which target the selected cues 26 | 27 | ::: tip USER PARAMETERS 28 | 29 | `userPatch` is the network patch name which points back to the local instance of QLab (typically localhost:53000) 30 | 31 | ::: 32 | 33 | <<< @/../../scripts v5/Create Triggers/Create OSC triggers for selected.applescript{4} 34 | 35 | ## Create Start Triggers for Selected 36 | 37 | Creates a group of Start cues which target the selected cues 38 | 39 | <<< @/../../scripts v5/Create Triggers/Create Start triggers for selected.applescript 40 | 41 | ## Create LX MSC Cues 42 | 43 | Creates an MSC trigger based on user parameters and dialog input 44 | 45 | <<< @/../../scripts v5/Create Triggers/Create LX MSC Cue.applescript 46 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "qlab-scripts", 3 | "version": "0.1.0", 4 | "type": "module", 5 | "description": "", 6 | "scripts": { 7 | "docs:dev": "vitepress dev docs", 8 | "docs:build": "vitepress build docs", 9 | "docs:preview": "vitepress preview docs" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/samschloegel/qlab-scripts.git" 14 | }, 15 | "author": "Sam Schloegel", 16 | "license": "MIT", 17 | "bugs": { 18 | "url": "https://github.com/samschloegel/qlab-scripts/issues" 19 | }, 20 | "homepage": "https://github.com/samschloegel/qlab-scripts#readme", 21 | "devDependencies": { 22 | "vitepress": "^1.6.3" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /scripts v4/Add Go To Next Cue to groups.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | if q type of eachCue is "Group" and q type of (parent of eachCue) is "Cue List" and (q number of eachCue is not "") then 8 | set selected to eachCue 9 | make type "GoTo" 10 | set theGoTo to last item of (selected as list) 11 | moveSelectionDown 12 | set theTarget to last item of (selected as list) 13 | if theTarget is theGoTo then 14 | delete cue id (uniqueID of theGoTo) of parent of theGoTo 15 | else 16 | set cue target of theGoTo to theTarget 17 | move cue id (uniqueID of theGoTo) of parent of theGoTo to beginning of eachCue 18 | end if 19 | end if 20 | set selected to eachCue 21 | end repeat 22 | end tell -------------------------------------------------------------------------------- /scripts v4/Batch Cue Edits/Arm Selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | set armed of eachCue to true 8 | end repeat 9 | end tell -------------------------------------------------------------------------------- /scripts v4/Batch Cue Edits/Change Patch.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set networkPatchQty to 5 5 | 6 | tell application id "com.figure53.QLab.4" to tell front workspace 7 | set errorOccured to false 8 | set listNetwork to {} 9 | repeat with i from 1 to networkPatchQty 10 | set end of listNetwork to (i as string) 11 | end repeat 12 | set list8 to {"1", "2", "3", "4", "5", "6", "7", "8"} 13 | set theSelection to (selected as list) 14 | set typeList to {} 15 | repeat with eachCue in theSelection 16 | set eachType to q type of eachCue 17 | if eachType is not in typeList then 18 | set typeList to typeList & eachType 19 | end if 20 | end repeat 21 | 22 | if length of typeList is not 1 then 23 | display alert "Select only one type of cue" 24 | return 25 | end if 26 | 27 | if typeList contains "Network" then 28 | choose from list listNetwork with title "Select the patch" 29 | set userPatch to (result as string) 30 | else 31 | choose from list list8 with title "Select the patch" 32 | set userPatch to (result as string) 33 | end if 34 | if userPatch is not "false" then 35 | repeat with eachCue in theSelection 36 | if q type of eachCue is "Network" then 37 | set patch of eachCue to (userPatch as integer) 38 | else if q type of eachCue is in {"Audio", "Mic", "MIDI"} and (userPatch is in list8) then 39 | set patch of eachCue to (userPatch as integer) 40 | else 41 | set errorOccured to true 42 | end if 43 | if patch of eachCue is not (userPatch as integer) then 44 | set errorOccured to true 45 | end if 46 | end repeat 47 | end if 48 | if errorOccured then 49 | display alert "Something didn't work" 50 | end if 51 | end tell -------------------------------------------------------------------------------- /scripts v4/Batch Cue Edits/Clear Gangs.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v230414-01 3 | 4 | set outputCount to 16 5 | 6 | tell application id "com.figure53.QLab.4" to tell front workspace 7 | set theSelection to (selected as list) 8 | repeat with eachCue in theSelection 9 | if q type of eachCue is in {"Audio", "Fade"} then 10 | repeat with i from 0 to outputCount 11 | setGang eachCue row 0 column i gang "" 12 | end repeat 13 | end if 14 | end repeat 15 | end tell -------------------------------------------------------------------------------- /scripts v4/Batch Cue Edits/Crosspoint Reset.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v221121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | 7 | repeat with eachCue in theSelection 8 | 9 | if q type of eachCue is "Audio" then 10 | 11 | -- Row 1 12 | setLevel eachCue row 1 column 1 db 0.0 13 | setLevel eachCue row 1 column 2 db -100 14 | setLevel eachCue row 1 column 3 db 0.0 15 | setLevel eachCue row 1 column 4 db -100 16 | setLevel eachCue row 1 column 5 db 0.0 17 | setLevel eachCue row 1 column 6 db -100 18 | setLevel eachCue row 1 column 7 db 0.0 19 | setLevel eachCue row 1 column 8 db -100 20 | setLevel eachCue row 1 column 9 db 0.0 21 | setLevel eachCue row 1 column 10 db -100 22 | setLevel eachCue row 1 column 11 db -6 23 | setLevel eachCue row 1 column 12 db -6 24 | setLevel eachCue row 1 column 13 db -6 25 | setLevel eachCue row 1 column 14 db -6 26 | setLevel eachCue row 1 column 15 db -6 27 | setLevel eachCue row 1 column 16 db -6 28 | setLevel eachCue row 1 column 17 db -6 29 | setLevel eachCue row 1 column 18 db -6 30 | setLevel eachCue row 1 column 19 db -6 31 | setLevel eachCue row 1 column 20 db -6 32 | setLevel eachCue row 1 column 21 db -6 33 | setLevel eachCue row 1 column 22 db -6 34 | setLevel eachCue row 1 column 23 db -6 35 | setLevel eachCue row 1 column 24 db -6 36 | setLevel eachCue row 1 column 25 db 0.0 37 | setLevel eachCue row 1 column 26 db -100 38 | setLevel eachCue row 1 column 27 db 0.0 39 | setLevel eachCue row 1 column 28 db -100 40 | setLevel eachCue row 1 column 29 db -6 41 | setLevel eachCue row 1 column 30 db -6 42 | setLevel eachCue row 1 column 31 db -6 43 | setLevel eachCue row 1 column 32 db -6 44 | 45 | -- Row 2 46 | setLevel eachCue row 2 column 1 db -100 47 | setLevel eachCue row 2 column 2 db 0.0 48 | setLevel eachCue row 2 column 3 db -100 49 | setLevel eachCue row 2 column 4 db 0.0 50 | setLevel eachCue row 2 column 5 db -100 51 | setLevel eachCue row 2 column 6 db 0.0 52 | setLevel eachCue row 2 column 7 db -100 53 | setLevel eachCue row 2 column 8 db 0.0 54 | setLevel eachCue row 2 column 9 db -100 55 | setLevel eachCue row 2 column 10 db 0.0 56 | setLevel eachCue row 2 column 11 db -6 57 | setLevel eachCue row 2 column 12 db -6 58 | setLevel eachCue row 2 column 13 db -6 59 | setLevel eachCue row 2 column 14 db -6 60 | setLevel eachCue row 2 column 15 db -6 61 | setLevel eachCue row 2 column 16 db -6 62 | setLevel eachCue row 2 column 17 db -6 63 | setLevel eachCue row 2 column 18 db -6 64 | setLevel eachCue row 2 column 19 db -6 65 | setLevel eachCue row 2 column 20 db -6 66 | setLevel eachCue row 2 column 21 db -6 67 | setLevel eachCue row 2 column 22 db -6 68 | setLevel eachCue row 2 column 23 db -6 69 | setLevel eachCue row 2 column 24 db -6 70 | setLevel eachCue row 2 column 25 db -100 71 | setLevel eachCue row 2 column 26 db 0.0 72 | setLevel eachCue row 2 column 27 db -100 73 | setLevel eachCue row 2 column 28 db 0.0 74 | setLevel eachCue row 2 column 29 db -6 75 | setLevel eachCue row 2 column 30 db -6 76 | setLevel eachCue row 2 column 31 db -6 77 | setLevel eachCue row 2 column 32 db -6 78 | 79 | end if 80 | 81 | end repeat 82 | 83 | end tell -------------------------------------------------------------------------------- /scripts v4/Batch Cue Edits/Disarm Selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | set armed of eachCue to false 8 | end repeat 9 | end tell -------------------------------------------------------------------------------- /scripts v4/Batch Cue Edits/Move number to name.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | if q number of eachCue is not "" then 8 | set q name of eachCue to ((q number of eachCue) & " " & (q list name of eachCue)) 9 | end if 10 | set q number of eachCue to "" 11 | end repeat 12 | end tell -------------------------------------------------------------------------------- /scripts v4/Batch Cue Edits/Name Cues in Sequence.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v220401-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | try 7 | set newPrefix to display dialog "Prefix?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 8 | if button returned of newPrefix is "Cancel" then return 9 | set newPrefix to text returned of newPrefix 10 | -- 11 | set startNum to display dialog "Starting number?" default answer "1" buttons {"Cancel", "Continue"} default button "Continue" 12 | if button returned of startNum is "Cancel" then return 13 | set startNum to (text returned of startNum as integer) 14 | -- 15 | set increment to display dialog "Increment by..." default answer "1" buttons {"Cancel", "Continue"} default button "Continue" 16 | if button returned of increment is "Cancel" then return 17 | set increment to (text returned of increment as integer) 18 | -- 19 | set newSuffix to display dialog "Suffix?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 20 | if button returned of newSuffix is "Cancel" then return 21 | set newSuffix to text returned of newSuffix 22 | on error 23 | display alert "Script cancelled" 24 | return 25 | end try 26 | 27 | repeat with eachCue in theSelection 28 | set q name of eachCue to (newPrefix & startNum & newSuffix) 29 | set startNum to (startNum + increment) 30 | end repeat 31 | end tell -------------------------------------------------------------------------------- /scripts v4/Batch Cue Edits/Number Cues in Sequence.appplescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v220328-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | try 7 | set newPrefix to display dialog "Prefix?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 8 | if button returned of newPrefix is "Cancel" then return 9 | set newPrefix to text returned of newPrefix 10 | -- 11 | set startNum to display dialog "Starting number?" default answer "1" buttons {"Cancel", "Continue"} default button "Continue" 12 | if button returned of startNum is "Cancel" then return 13 | set startNum to (text returned of startNum as integer) 14 | -- 15 | set increment to display dialog "Increment by..." default answer "1" buttons {"Cancel", "Continue"} default button "Continue" 16 | if button returned of increment is "Cancel" then return 17 | set increment to (text returned of increment as integer) 18 | -- 19 | set newSuffix to display dialog "Suffix?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 20 | if button returned of newSuffix is "Cancel" then return 21 | set newSuffix to text returned of newSuffix 22 | on error 23 | display alert "Script cancelled" 24 | return 25 | end try 26 | 27 | repeat with eachCue in theSelection 28 | set q number of eachCue to (newPrefix & startNum & newSuffix) 29 | set startNum to (startNum + increment) 30 | end repeat 31 | end tell -------------------------------------------------------------------------------- /scripts v4/Batch Cue Edits/Remove file extension from name.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set errorOccured to false 6 | set theSelection to (selected as list) 7 | repeat with eachCue in theSelection 8 | try 9 | set theName to q name of eachCue 10 | set lastChars to text -6 thru -1 of theName 11 | if lastChars contains "." then 12 | set thePos to ((6 - ((offset of "." in lastChars) - 2)) * -1) 13 | set newName to text 1 thru thePos of theName 14 | set q name of eachCue to newName 15 | end if 16 | on error 17 | set errorOccured to true 18 | end try 19 | end repeat 20 | if errorOccured then 21 | display alert "That may have failed for some of the selected cues, but it probably didn't break anything" 22 | end if 23 | end tell -------------------------------------------------------------------------------- /scripts v4/Batch Cue Edits/Set color from list.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v221114-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | set theColors to {"none", "red", "orange", "green", "blue", "purple"} 7 | try 8 | set newColor to choose from list theColors with title "Pick a color" default items {"none"} 9 | repeat with eachCue in theSelection 10 | set q color of eachCue to newColor 11 | end repeat 12 | 13 | on error 14 | return 15 | end try 16 | end tell -------------------------------------------------------------------------------- /scripts v4/Batch Cue Edits/Set group color by child.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | if q type of eachCue is "Group" then 8 | set theChildren to (every cue in eachCue) 9 | set childColors to {"none"} 10 | repeat with eachChild in theChildren 11 | if childColors does not contain q color of eachChild then 12 | set end of childColors to q color of eachChild 13 | end if 14 | end repeat 15 | if (count childColors) = 2 then 16 | set q color of eachCue to item 2 of childColors 17 | end if 18 | end if 19 | end repeat 20 | end tell -------------------------------------------------------------------------------- /scripts v4/Batch Cue Edits/Target Cues in Sequence.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v220401-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | try 7 | set newPrefix to display dialog "Prefix?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 8 | if button returned of newPrefix is "Cancel" then return 9 | set newPrefix to text returned of newPrefix 10 | -- 11 | set startNum to display dialog "Starting number?" default answer "1" buttons {"Cancel", "Continue"} default button "Continue" 12 | if button returned of startNum is "Cancel" then return 13 | set startNum to (text returned of startNum as integer) 14 | -- 15 | set increment to display dialog "Increment by..." default answer "1" buttons {"Cancel", "Continue"} default button "Continue" 16 | if button returned of increment is "Cancel" then return 17 | set increment to (text returned of increment as integer) 18 | -- 19 | set newSuffix to display dialog "Suffix?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 20 | if button returned of newSuffix is "Cancel" then return 21 | set newSuffix to text returned of newSuffix 22 | on error 23 | display alert "Script cancelled" 24 | return 25 | end try 26 | 27 | repeat with eachCue in theSelection 28 | set cue target of eachCue to cue (newPrefix & startNum & newSuffix) 29 | set startNum to (startNum + increment) 30 | end repeat 31 | end tell -------------------------------------------------------------------------------- /scripts v4/Batch Cue Edits/Toggle Armed of Selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | set armed of eachCue to not armed of eachCue 8 | end repeat 9 | end tell -------------------------------------------------------------------------------- /scripts v4/Batch Cue Edits/Toggle boolean argument of network cue.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | try 8 | if q type of eachCue is "Network" and osc message type of eachCue is custom and custom message of eachCue is not "" then 9 | set theState to last character of (custom message of eachCue as string) 10 | set theRest to text 1 thru -2 of (custom message of eachCue as string) 11 | set theMessage to false 12 | if theState is "1" then 13 | set theMessage to theRest & "0" 14 | else if theState is "0" then 15 | set theMessage to theRest & "1" 16 | end if 17 | if theMessage is not false then 18 | set custom message of eachCue to theMessage 19 | end if 20 | end if 21 | end try 22 | end repeat 23 | end tell -------------------------------------------------------------------------------- /scripts v4/Complete selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theCue to last item of (selected as list) 6 | set theDuration to duration of theCue 7 | load theCue time (theDuration * 0.999) 8 | start theCue 9 | end tell -------------------------------------------------------------------------------- /scripts v4/Copy uniqueID of selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set myCue to last item of (selected as list) 6 | set myID to uniqueID of myCue 7 | display alert "The Unique ID of \"" & q name of myCue & "\" (" & myID & ") has been copied to the clipboard." 8 | set the clipboard to myID 9 | end tell -------------------------------------------------------------------------------- /scripts v4/Create Fades/Create fade-and-stops for selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set userDuration to 5 -- your preferred default fade duration 5 | 6 | tell application id "com.figure53.QLab.4" to tell front workspace 7 | set newCues to {} 8 | set theSelection to (selected as list) 9 | repeat with originalCue in theSelection 10 | set selected to originalCue 11 | set originalCueType to q type of originalCue 12 | if originalCueType is in {"Audio", "Video", "Mic", "Fade"} then 13 | set originalLevel to originalCue getLevel row 0 column 0 14 | make type "Fade" 15 | set theFade to last item of (selected as list) 16 | set duration of theFade to userDuration 17 | if originalCueType is in {"Audio", "Video", "Mic"} then 18 | set cue target of theFade to originalCue 19 | theFade setLevel row 0 column 0 db originalLevel 20 | else if originalCueType is "Group" then 21 | set cue target of theFade to originalCue 22 | theFade setLevel row 0 column 0 db 0 23 | else if originalCueType is "Fade" then 24 | set cue target of theFade to (cue target of originalCue) 25 | theFade setLevel row 0 column 0 db originalLevel 26 | end if 27 | set stop target when done of theFade to 1 28 | set end of newCues to theFade 29 | end if 30 | end repeat 31 | set selected to newCues 32 | end tell -------------------------------------------------------------------------------- /scripts v4/Create Fades/Create fades for selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set userDuration to 5 -- your preferred default fade duration 5 | 6 | tell application id "com.figure53.QLab.4" to tell front workspace 7 | set newCues to {} 8 | set theSelection to (selected as list) 9 | repeat with originalCue in theSelection 10 | set selected to originalCue 11 | set originalCueType to q type of originalCue 12 | if originalCueType is in {"Audio", "Video", "Mic", "Fade"} then 13 | set originalLevel to originalCue getLevel row 0 column 0 14 | make type "Fade" 15 | set theFade to last item of (selected as list) 16 | set duration of theFade to userDuration 17 | if originalCueType is in {"Audio", "Video", "Mic"} then 18 | set cue target of theFade to originalCue 19 | theFade setLevel row 0 column 0 db originalLevel 20 | else if originalCueType is "Group" then 21 | set cue target of theFade to originalCue 22 | theFade setLevel row 0 column 0 db 0 23 | else if originalCueType is "Fade" then 24 | set cue target of theFade to (cue target of originalCue) 25 | theFade setLevel row 0 column 0 db originalLevel 26 | end if 27 | set end of newCues to theFade 28 | end if 29 | end repeat 30 | set selected to newCues 31 | end tell -------------------------------------------------------------------------------- /scripts v4/Create Triggers/Create OSC trigger for cue x.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set userPatch to 1 5 | set userPrefix to "" 6 | set userSuffix to "." 7 | 8 | tell application id "com.figure53.QLab.4" to tell front workspace 9 | try 10 | set userInput to display dialog "QLab Cue?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 11 | set cueNumber to text returned of userInput 12 | if button returned of userInput is "Continue" then 13 | make type "Network" 14 | set theNetwork to last item of (selected as list) 15 | set patch of theNetwork to userPatch 16 | set osc message type of theNetwork to custom 17 | set custom message of theNetwork to ("/cue/" & userPrefix & cueNumber & userSuffix & "/go") 18 | end if 19 | on error 20 | return 21 | end try 22 | end tell -------------------------------------------------------------------------------- /scripts v4/Create Triggers/Create OSC triggers for selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set userPatch to 1 5 | 6 | tell application id "com.figure53.QLab.4" to tell front workspace 7 | set theSelection to (selected as list) 8 | set newCues to {} 9 | repeat with eachCue in theSelection 10 | set theQ to q number of eachCue 11 | set selected to eachCue 12 | if theQ is not "" then 13 | make type "Network" 14 | set newCue to last item of (selected as list) 15 | set patch of newCue to userPatch 16 | set osc message type of newCue to custom 17 | set custom message of newCue to ("/cue/" & theQ & "/start") 18 | set end of newCues to newCue 19 | end if 20 | end repeat 21 | if length of newCues is not 0 then 22 | make type "Group" 23 | set theGroup to last item of (selected as list) 24 | repeat with eachCue in newCues 25 | move cue id (uniqueID of eachCue) of parent of eachCue to end of theGroup 26 | end repeat 27 | end if 28 | end tell -------------------------------------------------------------------------------- /scripts v4/Create Triggers/Create Start triggers for selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set userPatch to 1 5 | 6 | tell application id "com.figure53.QLab.4" to tell front workspace 7 | set theSelection to (selected as list) 8 | set newCues to {} 9 | repeat with eachCue in theSelection 10 | set theQ to q number of eachCue 11 | set selected to eachCue 12 | make type "Start" 13 | set newCue to last item of (selected as list) 14 | set cue target of newCue to eachCue 15 | set end of newCues to newCue 16 | end repeat 17 | if length of newCues is not 0 then 18 | make type "Group" 19 | set theGroup to last item of (selected as list) 20 | repeat with eachCue in newCues 21 | move cue id (uniqueID of eachCue) of parent of eachCue to end of theGroup 22 | end repeat 23 | end if 24 | end tell -------------------------------------------------------------------------------- /scripts v4/DS100 Rig Check Helper.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v230414 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | set firstCue to first item of theSelection 7 | set currentNumber to text -4 thru -3 of (custom message of firstCue as string) 8 | if text 1 of currentNumber is "/" then set currentNumber to text 2 of currentNumber 9 | try 10 | repeat with eachCue in theSelection 11 | if q type of eachCue is "Network" and osc message type of eachCue is custom and custom message of eachCue is not "" then 12 | set currentNumber to currentNumber + 1 13 | set theState to text -4 thru -3 of (custom message of eachCue as string) 14 | if text 1 of theState is "/" then set theState to text 2 of theState 15 | set theRest to text 1 thru -5 of (custom message of eachCue as string) 16 | if text -1 of theRest is not "/" then set theRest to (theRest & "/") 17 | if currentNumber > 64 then return 18 | set theMessage to theRest & currentNumber & " 0" 19 | set custom message of eachCue to theMessage 20 | end if 21 | end repeat 22 | end try 23 | end tell -------------------------------------------------------------------------------- /scripts v4/DiGiCo Snapshots/Create DiGiCo Snapshot Group.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set userColor to "Purple" 5 | set userPrefix to "sd" 6 | set userCueName to "DiGiCo Snapshot " 7 | 8 | tell application id "com.figure53.QLab.4" to tell front workspace 9 | try 10 | set userInput to display dialog "Snapshot?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 11 | set theSnapshot to text returned of userInput 12 | if button returned of userInput is "Continue" then 13 | make type "Start" 14 | set theStart to last item of (selected as list) 15 | set cue target of theStart to cue (userPrefix & theSnapshot) 16 | set q color of theStart to userColor 17 | make type "Group" 18 | set theGroup to last item of (selected as list) 19 | set q name of theGroup to userCueName & theSnapshot 20 | set q color of theGroup to userColor 21 | move cue id (uniqueID of theStart) of parent of theStart to cue id (uniqueID of theGroup) 22 | end if 23 | on error 24 | return 25 | end try 26 | end tell -------------------------------------------------------------------------------- /scripts v4/DiGiCo Snapshots/Create DiGiCo Snapshot.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set userColor to "Purple" 5 | set userPrefix to "sd" 6 | 7 | tell application id "com.figure53.QLab.4" to tell front workspace 8 | try 9 | set userInput to display dialog "Snapshot?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 10 | set theSnapshot to text returned of userInput 11 | if button returned of userInput is "Continue" then 12 | make type "Start" 13 | set theStart to last item of (selected as list) 14 | set cue target of theStart to cue (userPrefix & theSnapshot) 15 | set q color of theStart to userColor 16 | end if 17 | on error 18 | return 19 | end try 20 | end tell -------------------------------------------------------------------------------- /scripts v4/DiGiCo Snapshots/DiGiCo CC Generator.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set userPrefix to "sd" 5 | set userCueName to "SD Snapshot " 6 | set userShowMIDIInfo to true 7 | set userCount to 118 -- The number of snapshot triggers to generate. Do not set above 384. 8 | 9 | 10 | tell application id "com.figure53.QLab.4" to tell front workspace 11 | set i to 1 12 | set scene to 1 13 | 14 | repeat userCount times 15 | make type "MIDI" 16 | set newCue to last item of (selected as list) 17 | 18 | set q number of newCue to userPrefix & (scene) 19 | 20 | set command of newCue to control_change 21 | 22 | if i is less than 129 then 23 | set byteOne to 16 24 | set byteTwo to i 25 | else if i is less than 257 then 26 | set byteOne to 17 27 | set byteTwo to (i - 128) 28 | else 29 | set byteOne to 18 30 | set byteTwo to (i - 256) 31 | end if 32 | 33 | set channel of newCue to 16 34 | set byte one of newCue to byteOne 35 | set byte two of newCue to byteTwo 36 | 37 | 38 | if userShowMIDIInfo then 39 | set q name of newCue to userCueName & (scene) & " (Ch 16 / CC " & byteOne & " - " & byteTwo & ")" 40 | else 41 | set q name of newCue to userCueName & (scene) 42 | end if 43 | 44 | set i to i + 1 45 | set scene to scene + 1 46 | end repeat 47 | 48 | end tell -------------------------------------------------------------------------------- /scripts v4/Group selected individually.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | set selected to eachCue 8 | set theName to q name of eachCue 9 | set theNum to q number of eachCue 10 | set theID to uniqueID of eachCue 11 | set q number of eachCue to "" 12 | make type "Group" 13 | set theGroup to last item of (selected as list) 14 | set q name of theGroup to theName 15 | set q number of theGroup to theNum 16 | move cue id theID of parent of eachCue to end of theGroup 17 | end repeat 18 | end tell -------------------------------------------------------------------------------- /scripts v4/Group selected, inherit name.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v220408-02 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | if (count theSelection) is 0 then return 7 | set groupName to q display name of last item of theSelection 8 | set groupColor to q color of last item of theSelection 9 | make type "Group" 10 | set groupCue to last item of (selected as list) 11 | if (count theSelection) is 1 then -- if only one cue was selected, name the group after it 12 | set q name of groupCue to groupName 13 | set q color of groupCue to groupColor 14 | end if 15 | set parentOfGroup to parent of groupCue 16 | repeat with eachCue in theSelection 17 | if contents of eachCue is not parentOfGroup then -- Avoids a potential selection error 18 | move cue id (uniqueID of eachCue) of parent of eachCue to end of groupCue 19 | end if 20 | end repeat 21 | 22 | end tell -------------------------------------------------------------------------------- /scripts v4/Level changes/Change all cue levels by dialog.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set defaultChange to "-2" 5 | set minLevel to -100 6 | 7 | tell application id "com.figure53.QLab.4" to tell front workspace 8 | try 9 | set theCue to last item of (selected as list) 10 | if q type of theCue is in {"Audio", "Fade", "Mic"} then 11 | set userInput to display dialog "How much?" default answer defaultChange buttons {"Cancel", "Continue"} default button "Continue" 12 | set userIncrement to text returned of userInput 13 | if button returned of userInput is "Continue" then 14 | set theGangs to {} 15 | repeat with i from 1 to 64 16 | set currentLevel to theCue getLevel row 0 column i 17 | set thisGang to getGang theCue row 0 column i 18 | if (currentLevel > minLevel) and (thisGang is not in theGangs) then 19 | theCue setLevel row 0 column i db currentLevel + userIncrement 20 | if thisGang is not missing value then 21 | set end of theGangs to thisGang 22 | end if 23 | end if 24 | end repeat 25 | end if 26 | end if 27 | on error 28 | return 29 | end try 30 | end tell -------------------------------------------------------------------------------- /scripts v4/Level changes/Master Decrement.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set userDecrement to 2 -- enter your desired decrement here 5 | 6 | tell application id "com.figure53.QLab.4" to tell front workspace 7 | set theSelection to (selected as list) 8 | repeat with eachCue in theSelection 9 | if q type of eachCue is in {"Audio", "Fade", "Mic"} then 10 | set currentLevel to eachCue getLevel row 0 column 0 11 | set newLevel to currentLevel - userDecrement 12 | eachCue setLevel row 0 column 0 db newLevel 13 | end if 14 | end repeat 15 | end tell -------------------------------------------------------------------------------- /scripts v4/Level changes/Master Increment.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set userIncrement to 2 -- enter your desired increment here 5 | 6 | tell application id "com.figure53.QLab.4" to tell front workspace 7 | set theSelection to (selected as list) 8 | repeat with eachCue in theSelection 9 | if q type of eachCue is in {"Audio", "Fade", "Mic"} then 10 | set currentLevel to eachCue getLevel row 0 column 0 11 | set newLevel to currentLevel + userIncrement 12 | eachCue setLevel row 0 column 0 db newLevel 13 | end if 14 | end repeat 15 | end tell -------------------------------------------------------------------------------- /scripts v4/Level changes/Master to -inf.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | if q type of eachCue is in {"Audio", "Mic", "Fade"} then 8 | eachCue setLevel row 0 column 0 db -120 9 | end if 10 | end repeat 11 | end tell -------------------------------------------------------------------------------- /scripts v4/Level changes/Master to 0dB.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | if q type of eachCue is in {"Audio", "Mic", "Fade", "Video"} then 8 | eachCue setLevel row 0 column 0 db 0 9 | end if 10 | end repeat 11 | end tell -------------------------------------------------------------------------------- /scripts v4/Load Parent Group to start of selected Child.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set userPreRoll to 0.0 5 | 6 | tell application id "com.figure53.QLab.4" to tell front workspace 7 | set theCue to last item of (selected as list) 8 | set thePre to pre wait of theCue 9 | set theParent to parent of theCue 10 | load theParent time (thePre - userPreRoll) 11 | set playback position of parent list of theParent to cue id (uniqueID of theParent) 12 | end tell -------------------------------------------------------------------------------- /scripts v4/Move to cut list.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set cutListName to "Cut Cues" 5 | 6 | tell application id "com.figure53.QLab.4" to tell front workspace 7 | set theSelection to (selected as list) 8 | try 9 | set cutList to first cue list whose q display name is cutListName 10 | on error 11 | return 12 | end try 13 | repeat with eachCue in theSelection 14 | if q number of eachCue is not "" then 15 | set q name of eachCue to ("(" & q number of eachCue & ") " & q list name of eachCue) 16 | set q number of eachCue to "" 17 | end if 18 | 19 | set cueID to uniqueID of eachCue 20 | set midi trigger of eachCue to disabled 21 | set hotkey trigger of eachCue to disabled 22 | set timecode trigger of eachCue to disabled 23 | set wall clock trigger of eachCue to disabled 24 | set armed of eachCue to false 25 | if parent list of eachCue is not cutList then 26 | move cue id cueID of parent of eachCue to beginning of cutList 27 | end if 28 | end repeat 29 | end tell -------------------------------------------------------------------------------- /scripts v4/Overrides/MIDI In Toggle.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v230414-01 3 | 4 | tell application id "com.figure53.QLab.4" 5 | if midi input enabled of overrides is true then 6 | set midi input enabled of overrides to false 7 | set overrides visibility of overrides to false 8 | else if midi input enabled of overrides is false then 9 | set midi input enabled of overrides to true 10 | set overrides visibility of overrides to false 11 | end if 12 | end tell -------------------------------------------------------------------------------- /scripts v4/Overrides/OSC Out Disable.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" 5 | set osc output enabled of overrides to false 6 | set overrides visibility of overrides to true 7 | end tell -------------------------------------------------------------------------------- /scripts v4/Overrides/OSC Out Enable.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" 5 | set osc output enabled of overrides to true 6 | set overrides visibility of overrides to false 7 | end tell -------------------------------------------------------------------------------- /scripts v4/Overrides/Show Overrides, Position Bottom Right.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application "Finder" 5 | set desktopX to item 3 of (get bounds of window of desktop) 6 | set desktopY to item 4 of (get bounds of window of desktop) 7 | end tell 8 | 9 | tell application id "com.figure53.QLab.4" 10 | if overrides visibility of overrides is false then 11 | set overrides visibility of overrides to true 12 | end if 13 | set workspaceWindowProps to (get properties of front window) 14 | set workspaceBounds to (get bounds of front window) 15 | 16 | end tell 17 | 18 | tell application "System Events" 19 | if (exists of window "Override Controls" of process "QLab") = true then 20 | set theORWindowSize to size of window "Override Controls" of process "QLab" 21 | set theORWidth to item 1 of theORWindowSize 22 | set theORHeight to item 2 of theORWindowSize 23 | set position of window "Override Controls" of process "QLab" to {(desktopX - theORWidth), (desktopY - theORHeight)} 24 | end if 25 | end tell 26 | 27 | tell application id "com.figure53.QLab.4" 28 | set workspaceBounds to {0, 0, (desktopX - theORWidth), desktopY} 29 | set bounds of window id (uniqueID of workspaceWindowProps) to workspaceBounds 30 | end tell -------------------------------------------------------------------------------- /scripts v4/Overrides/Show Overrides, Position Top Left.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application "Finder" 5 | set desktopX to item 3 of (get bounds of window of desktop) 6 | set desktopY to item 4 of (get bounds of window of desktop) 7 | end tell 8 | 9 | tell application id "com.figure53.QLab.4" 10 | if overrides visibility of overrides is false then 11 | set overrides visibility of overrides to true 12 | end if 13 | set workspaceWindowProps to (get properties of front window) 14 | set workspaceBounds to (get bounds of front window) 15 | 16 | end tell 17 | 18 | tell application "System Events" 19 | if (exists of window "Override Controls" of process "QLab") = true then 20 | set theORWindowSize to size of window "Override Controls" of process "QLab" 21 | set theORWidth to item 1 of theORWindowSize 22 | set theORHeight to item 2 of theORWindowSize 23 | set position of window "Override Controls" of process "QLab" to {0, 0} 24 | end if 25 | end tell 26 | 27 | tell application id "com.figure53.QLab.4" 28 | set workspaceBounds to {theORWidth, 0, desktopX, desktopY} 29 | set bounds of window id (uniqueID of workspaceWindowProps) to workspaceBounds 30 | end tell -------------------------------------------------------------------------------- /scripts v4/Remote Control/Remote App Launch.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set qlabMain to machine "eppc://username:password@QLab-Main.local" 5 | set qlabBackup to machine "eppc://username:password@QLab-Backup.local" 6 | 7 | using terms from application "Finder" 8 | tell application "Finder" of qlabMain to open ("Applications/SomeApp.app" as POSIX file as alias) 9 | tell application "Finder" of qlabBackup to open ("Applications/SomeApp.app" as POSIX file as alias) 10 | end using terms from -------------------------------------------------------------------------------- /scripts v4/Remote Control/Remote File Open.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set qlabMain to machine "eppc://username:password@QLab-Main.local" 5 | set qlabBackup to machine "eppc://username:password@QLab-Backup.local" 6 | 7 | using terms from application "Finder" 8 | tell application "Finder" of qlabMain 9 | open POSIX file "/Users/username/someFolder/workspace.qlab4" 10 | end tell 11 | tell application "Finder" of qlabBackup 12 | open POSIX file "/Users/username/someFolder/workspace.qlab4" 13 | end tell 14 | end using terms from -------------------------------------------------------------------------------- /scripts v4/Remote Control/Remote Shutdown.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set qlabMain to machine "eppc://username:password@QLab-Main.local" 5 | set qlabBackup to machine "eppc://username:password@QLab-Backup.local" 6 | 7 | using terms from application "QLab 4" 8 | tell application "QLab" of qlabMain 9 | quit saving no 10 | end tell 11 | tell application "QLab" of qlabBackup 12 | quit saving no 13 | end tell 14 | end using terms from 15 | 16 | delay 5 17 | 18 | using terms from application "Finder" 19 | tell application "Finder" of qlabMain 20 | shut down 21 | end tell 22 | tell application "Finder" of qlabBackup 23 | shut down 24 | end tell 25 | end using terms from -------------------------------------------------------------------------------- /scripts v4/Stem Versioning/Reveal File Target.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | set theCue to last item of (selected as list) 6 | if q type of theCue is "Audio" then 7 | set fileTarget to file target of theCue 8 | tell application "Finder" 9 | reveal fileTarget 10 | activate 11 | end tell 12 | end if 13 | end tell -------------------------------------------------------------------------------- /scripts v4/Stem Versioning/Target version bump by filename.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set versionLength to 2 -- How many digits for versioning? v1 / v01, 2 digits recommended 5 | 6 | tell application id "com.figure53.QLab.4" to tell front workspace 7 | set theSelection to (selected as list) 8 | repeat with eachCue in theSelection 9 | if q type of eachCue is "Audio" then 10 | set theName to q name of eachCue 11 | -- Get POSIX path of current target 12 | set theTarget to (file target of eachCue) 13 | set theTarget to the POSIX path of theTarget 14 | 15 | set lastChars to text -6 thru -1 of theTarget 16 | set thePos to ((6 - ((offset of "." in lastChars) - 2)) * -1) 17 | set theExt to text (offset of "." in lastChars) thru -1 of lastChars 18 | set theTrunk to text 1 thru thePos of theTarget 19 | set oldVersion to (text (versionLength * -1) thru -1 of theTrunk) as integer 20 | set newVersion to (oldVersion + 1) as string 21 | if (count newVersion) < versionLength then 22 | set leadingNeeded to versionLength - (count newVersion) 23 | repeat leadingNeeded times 24 | set newVersion to ("0" & newVersion) 25 | end repeat 26 | end if 27 | set newTarget to ((text 1 thru (-1 - versionLength) of theTrunk) & newVersion & theExt) 28 | 29 | set file target of eachCue to (POSIX file newTarget) 30 | end if 31 | end repeat 32 | 33 | end tell 34 | 35 | -------------------------------------------------------------------------------- /scripts v4/Stem Versioning/Target version bump by folder.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set versionLength to 2 -- How many digits for versioning? v1 / v01 5 | -- Do not use slashes in your filenames 6 | 7 | tell application id "com.figure53.QLab.4" to tell front workspace 8 | set theSelection to (selected as list) 9 | 10 | set theFolder to the POSIX path of (choose folder with prompt "lead me to your files") 11 | 12 | repeat with eachCue in theSelection 13 | if q type of eachCue is "Audio" then 14 | set theName to q name of eachCue 15 | -- Get POSIX path of current target 16 | set theTarget to (file target of eachCue) 17 | set theTarget to the POSIX path of theTarget 18 | set reversed to reverse of characters of theTarget as string 19 | set fileName to text (1 - (offset of "/" in reversed)) thru -1 of theTarget 20 | set newTarget to theFolder & fileName 21 | set file target of eachCue to (POSIX file newTarget) 22 | end if 23 | end repeat 24 | 25 | end tell 26 | 27 | -------------------------------------------------------------------------------- /scripts v4/Undo Go.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | tell application id "com.figure53.QLab.4" to tell front workspace 5 | movePlayheadUpASequence 6 | set theSelection to (selected as list) 7 | stop theSelection 8 | end tell -------------------------------------------------------------------------------- /scripts v4/Which cues use output x?.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set userThresh to -100 -- Match this value to your workspace settings. Workspace Settings > Audio > Volume Limits > Min 5 | 6 | tell application id "com.figure53.QLab.4" to tell front workspace 7 | set theSelection to (selected as list) 8 | set theList to {} 9 | set theOut to (display dialog "Which cue output?" default answer "1" buttons {"Cancel", "Go"} default button "Go") 10 | 11 | if button returned of theOut is "Go" and text returned of theOut is not "" then 12 | set theOut to (text returned of theOut as integer) 13 | repeat with eachCue in theSelection 14 | if q type of eachCue is in {"Audio", "Fade", "Mic"} and ((getLevel eachCue row 0 column theOut) > userThresh) then 15 | set end of theList to eachCue 16 | end if 17 | end repeat 18 | set selected to theList 19 | display alert ((length of theList as string) & " of " & (length of theSelection as string) & " cues were found and selected") 20 | 21 | end if 22 | end tell -------------------------------------------------------------------------------- /scripts v4/Yamaha Scenes/Create Yamaha Scene Group.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set userNumPrefix to "y" 5 | set userNamePrefix to "Yamaha Scene" 6 | set userColor to "Purple" 7 | 8 | tell application id "com.figure53.QLab.4" to tell front workspace 9 | try 10 | set userInput to display dialog "Scene?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 11 | set theScene to text returned of userInput 12 | if button returned of userInput is "Continue" and theScene is not "" then 13 | make type "Start" 14 | set theStart to last item of (selected as list) 15 | set cue target of theStart to cue (userNumPrefix & theScene) 16 | set q color of theStart to userColor 17 | make type "Group" 18 | set theGroup to last item of (selected as list) 19 | set q name of theGroup to userNamePrefix & " " & theScene 20 | set q color of theGroup to userColor 21 | move cue id (uniqueID of theStart) of parent of theStart to cue id (uniqueID of theGroup) 22 | end if 23 | on error 24 | return 25 | end try 26 | end tell -------------------------------------------------------------------------------- /scripts v4/Yamaha Scenes/Create Yamaha Scene.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set userNumPrefix to "y" 5 | set userNamePrefix to "Yamaha Scene" 6 | set userColor to "Purple" 7 | 8 | tell application id "com.figure53.QLab.4" to tell front workspace 9 | try 10 | set userInput to display dialog "Scene?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 11 | set theScene to text returned of userInput 12 | if button returned of userInput is "Continue" and theScene is not "" then 13 | make type "Start" 14 | set theStart to last item of (selected as list) 15 | set cue target of theStart to cue (userNumPrefix & theScene) 16 | set q color of theStart to userColor 17 | end if 18 | on error 19 | return 20 | end try 21 | end tell -------------------------------------------------------------------------------- /scripts v4/Yamaha Scenes/Yamaha 300 Generator.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 4. v211121-01 3 | 4 | set userPrefix to "y" 5 | set userNamePrefix to "Yamaha Scene" 6 | set showMIDIInfo to true 7 | 8 | tell application id "com.figure53.QLab.4" to tell front workspace 9 | set i to 0 10 | set scene to 1 11 | repeat 300 times 12 | make type "MIDI" 13 | set newCue to last item of (selected as list) 14 | 15 | set q number of newCue to userPrefix & scene 16 | 17 | set command of newCue to program_change 18 | 19 | if i is less than 128 then 20 | set theChannel to 1 21 | set byteOne to i 22 | else if i is less than 256 then 23 | set theChannel to 2 24 | set byteOne to (i - 128) 25 | else 26 | set theChannel to 3 27 | set byteOne to (i - 256) 28 | end if 29 | 30 | set channel of newCue to theChannel 31 | set byte one of newCue to byteOne 32 | 33 | 34 | if showMIDIInfo then 35 | set q name of newCue to userNamePrefix & " " & scene & " (Ch " & theChannel & " / PC " & byteOne & ")" 36 | else 37 | set q name of newCue to userNamePrefix & scene 38 | end if 39 | 40 | set i to i + 1 41 | set scene to scene + 1 42 | end repeat 43 | end tell -------------------------------------------------------------------------------- /scripts v5/Add Go To Next Cue to groups.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | if q type of eachCue is "Group" and q type of (parent of eachCue) is "Cue List" and (q number of eachCue is not "") then 8 | set selected to eachCue 9 | make type "GoTo" 10 | set theGoTo to last item of (selected as list) 11 | moveSelectionDown 12 | set theTarget to last item of (selected as list) 13 | if theTarget is theGoTo then 14 | delete cue id (uniqueID of theGoTo) of parent of theGoTo 15 | else 16 | set cue target of theGoTo to theTarget 17 | move cue id (uniqueID of theGoTo) of parent of theGoTo to beginning of eachCue 18 | end if 19 | end if 20 | set selected to eachCue 21 | end repeat 22 | end tell -------------------------------------------------------------------------------- /scripts v5/Batch Cue Edits/Arm Selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | set armed of eachCue to true 8 | end repeat 9 | end tell -------------------------------------------------------------------------------- /scripts v5/Batch Cue Edits/Change Network Patch.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v220903-01 3 | 4 | set networkPatchQty to 2 5 | 6 | tell application id "com.figure53.QLab.5" to tell front workspace 7 | 8 | set listNetwork to {} 9 | repeat with i from 1 to networkPatchQty 10 | set end of listNetwork to (i as string) 11 | end repeat 12 | 13 | set theSelection to (selected as list) 14 | set typeList to {} 15 | repeat with eachCue in theSelection 16 | set eachType to q type of eachCue 17 | if eachType is not in typeList then 18 | set typeList to typeList & eachType 19 | end if 20 | end repeat 21 | 22 | if length of typeList is not 1 then 23 | display alert "Select only Network cues" 24 | return 25 | end if 26 | 27 | if typeList contains "Network" then 28 | choose from list listNetwork with title "Select the patch" 29 | set userPatch to (result as string) 30 | else 31 | display alert "Select only Network cues" 32 | end if 33 | 34 | if userPatch is not "false" then 35 | repeat with eachCue in theSelection 36 | if q type of eachCue is "Network" then 37 | set network patch number of eachCue to (userPatch as integer) 38 | end if 39 | end repeat 40 | end if 41 | end tell -------------------------------------------------------------------------------- /scripts v5/Batch Cue Edits/Clear Gangs.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | set outputCount to 16 5 | 6 | tell application id "com.figure53.QLab.5" to tell front workspace 7 | set theSelection to (selected as list) 8 | repeat with eachCue in theSelection 9 | repeat with i from 0 to outputCount 10 | setGang eachCue row 0 column i gang "" 11 | end repeat 12 | end repeat 13 | end tell -------------------------------------------------------------------------------- /scripts v5/Batch Cue Edits/Disarm Selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | set armed of eachCue to false 8 | end repeat 9 | end tell -------------------------------------------------------------------------------- /scripts v5/Batch Cue Edits/Move number to name.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | if q number of eachCue is not "" then 8 | set q name of eachCue to ((q number of eachCue) & " " & (q list name of eachCue)) 9 | end if 10 | set q number of eachCue to "" 11 | end repeat 12 | end tell -------------------------------------------------------------------------------- /scripts v5/Batch Cue Edits/Name Cues in Sequence.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v230423-02 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theSelection to (selected as list) 6 | set defaultPrefix to q display name of first item of theSelection 7 | try 8 | set newPrefix to display dialog "Prefix?" default answer defaultPrefix buttons {"Cancel", "Continue"} default button "Continue" 9 | if button returned of newPrefix is "Cancel" then return 10 | set newPrefix to text returned of newPrefix 11 | -- 12 | set startNum to display dialog "Starting number?" default answer "1" buttons {"Cancel", "Continue"} default button "Continue" 13 | if button returned of startNum is "Cancel" then return 14 | set startNum to (text returned of startNum as integer) 15 | -- 16 | set increment to display dialog "Increment by..." default answer "1" buttons {"Cancel", "Continue"} default button "Continue" 17 | if button returned of increment is "Cancel" then return 18 | set increment to (text returned of increment as integer) 19 | -- 20 | set newSuffix to display dialog "Suffix?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 21 | if button returned of newSuffix is "Cancel" then return 22 | set newSuffix to text returned of newSuffix 23 | on error 24 | display alert "Script cancelled" 25 | return 26 | end try 27 | 28 | repeat with eachCue in theSelection 29 | set q name of eachCue to (newPrefix & startNum & newSuffix) 30 | set startNum to (startNum + increment) 31 | end repeat 32 | end tell -------------------------------------------------------------------------------- /scripts v5/Batch Cue Edits/Remove file extension from name.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set errorOccured to false 6 | set theSelection to (selected as list) 7 | repeat with eachCue in theSelection 8 | try 9 | set theName to q name of eachCue 10 | set lastChars to text -6 thru -1 of theName 11 | if lastChars contains "." then 12 | set thePos to ((6 - ((offset of "." in lastChars) - 2)) * -1) 13 | set newName to text 1 thru thePos of theName 14 | set q name of eachCue to newName 15 | end if 16 | on error 17 | set errorOccured to true 18 | end try 19 | end repeat 20 | if errorOccured then 21 | display alert "That may have failed for some of the selected cues, but it probably didn't break anything" 22 | end if 23 | end tell -------------------------------------------------------------------------------- /scripts v5/Batch Cue Edits/Set color from list.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v220903-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theSelection to (selected as list) 6 | set theColors to {"none", "red", "orange", "green", "blue", "purple"} 7 | try 8 | set newColor to choose from list theColors with title "Pick a color" default items {"none"} 9 | repeat with eachCue in theSelection 10 | set q color of eachCue to newColor 11 | end repeat 12 | on error 13 | return 14 | end try 15 | end tell -------------------------------------------------------------------------------- /scripts v5/Batch Cue Edits/Set group color by child.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | if q type of eachCue is "Group" then 8 | set theChildren to (every cue in eachCue) 9 | set childColors to {"none"} 10 | repeat with eachChild in theChildren 11 | if childColors does not contain q color of eachChild then 12 | set end of childColors to q color of eachChild 13 | end if 14 | end repeat 15 | if (count childColors) = 2 then 16 | set q color of eachCue to item 2 of childColors 17 | end if 18 | end if 19 | end repeat 20 | end tell -------------------------------------------------------------------------------- /scripts v5/Batch Cue Edits/Toggle Armed of Selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | set armed of eachCue to not armed of eachCue 8 | end repeat 9 | end tell -------------------------------------------------------------------------------- /scripts v5/Batch Cue Edits/Toggle boolean argument of network cue.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | try 8 | if q type of eachCue is "Network" and custom string of eachCue is not "" then 9 | set theState to last character of (custom message of eachCue as string) 10 | set theRest to text 1 thru -2 of (custom message of eachCue as string) 11 | set theMessage to false 12 | if theState is "1" then 13 | set theMessage to theRest & "0" 14 | else if theState is "0" then 15 | set theMessage to theRest & "1" 16 | end if 17 | if theMessage is not false then 18 | set custom string of eachCue to theMessage 19 | end if 20 | end if 21 | end try 22 | end repeat 23 | end tell -------------------------------------------------------------------------------- /scripts v5/Complete selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theCue to last item of (selected as list) 6 | set theDuration to duration of theCue 7 | load theCue time (theDuration * 0.999) 8 | start theCue 9 | end tell -------------------------------------------------------------------------------- /scripts v5/Copy uniqueID of selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v250327-01 3 | 4 | set userAlert to true 5 | set userDelimiter to " 6 | " 7 | 8 | tell application id "com.figure53.QLab.5" to tell front workspace 9 | set theCount to count of selected 10 | set theCues to {} 11 | 12 | if theCount is 0 then 13 | set end of theCues to current cue list 14 | else 15 | set theCues to (selected as list) 16 | end if 17 | 18 | set theIDs to "" 19 | repeat with eachCue in theCues 20 | if length of theIDs is not 0 then 21 | set theIDs to theIDs & userDelimiter 22 | end if 23 | set theIDs to theIDs & uniqueID of eachCue 24 | end repeat 25 | 26 | set the clipboard to theIDs 27 | if userAlert then display alert "Copied " & theCount & " items" 28 | 29 | end tell -------------------------------------------------------------------------------- /scripts v5/Create Fades/Create fade-and-stops for selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | set userDuration to 5 -- your preferred default fade duration 5 | 6 | tell application id "com.figure53.QLab.5" to tell front workspace 7 | set newCues to {} 8 | set theSelection to (selected as list) 9 | repeat with originalCue in theSelection 10 | set selected to originalCue 11 | set originalCueType to q type of originalCue 12 | if originalCueType is in {"Audio", "Video", "Mic", "Fade"} then 13 | set originalLevel to originalCue getLevel row 0 column 0 14 | make type "Fade" 15 | set theFade to last item of (selected as list) 16 | set duration of theFade to userDuration 17 | if originalCueType is in {"Audio", "Video", "Mic"} then 18 | set cue target of theFade to originalCue 19 | theFade setLevel row 0 column 0 db originalLevel 20 | else if originalCueType is "Group" then 21 | set cue target of theFade to originalCue 22 | theFade setLevel row 0 column 0 db 0 23 | else if originalCueType is "Fade" then 24 | set cue target of theFade to (cue target of originalCue) 25 | theFade setLevel row 0 column 0 db originalLevel 26 | end if 27 | set stop target when done of theFade to 1 28 | set end of newCues to theFade 29 | end if 30 | end repeat 31 | set selected to newCues 32 | end tell -------------------------------------------------------------------------------- /scripts v5/Create Fades/Create fades for selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | set userDuration to 5 -- your preferred default fade duration 5 | 6 | tell application id "com.figure53.QLab.5" to tell front workspace 7 | set newCues to {} 8 | set theSelection to (selected as list) 9 | repeat with originalCue in theSelection 10 | set selected to originalCue 11 | set originalCueType to q type of originalCue 12 | if originalCueType is in {"Audio", "Video", "Mic", "Fade"} then 13 | set originalLevel to originalCue getLevel row 0 column 0 14 | make type "Fade" 15 | set theFade to last item of (selected as list) 16 | set duration of theFade to userDuration 17 | if originalCueType is in {"Audio", "Video", "Mic"} then 18 | set cue target of theFade to originalCue 19 | theFade setLevel row 0 column 0 db originalLevel 20 | else if originalCueType is "Group" then 21 | set cue target of theFade to originalCue 22 | theFade setLevel row 0 column 0 db 0 23 | else if originalCueType is "Fade" then 24 | set cue target of theFade to (cue target of originalCue) 25 | theFade setLevel row 0 column 0 db originalLevel 26 | end if 27 | set end of newCues to theFade 28 | end if 29 | end repeat 30 | set selected to newCues 31 | end tell -------------------------------------------------------------------------------- /scripts v5/Create Triggers/Create LX MSC Cue.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v250217-01 3 | 4 | set userListNumber to 1 5 | set userDevID to 1 6 | set userColor to "Green" 7 | set userShowListNumber to false 8 | set userNameParent to true 9 | 10 | tell application id "com.figure53.QLab.5" to tell front workspace 11 | try 12 | set theSelection to first item of (selected as list) 13 | 14 | set userInput to display dialog "Cue Number?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 15 | if button returned of userInput is "Cancel" then return 16 | if text returned of userInput is "" then return 17 | set theNumber to text returned of userInput 18 | 19 | make type "MIDI" 20 | set newMIDI to last item of (selected as list) 21 | set theParent to parent of newMIDI 22 | 23 | set message type of newMIDI to msc 24 | set deviceID of newMIDI to userDevID 25 | set command format of newMIDI to 1 26 | set q_number of newMIDI to theNumber 27 | set q_list of newMIDI to userListNumber 28 | 29 | set q color of newMIDI to userColor 30 | set newName to ("LX " & theNumber) 31 | if userShowListNumber then set newName to ("LX " & userListNumber & "/" & theNumber) 32 | set q name of newMIDI to newName 33 | 34 | if q type of theSelection is "Group" and q type of parent of theSelection is "Cue List" then 35 | move cue id (uniqueID of newMIDI) to beginning of cue id (uniqueID of theSelection) of parent of theSelection 36 | if userNameParent then 37 | set parentName to q name of theSelection 38 | set q name of theSelection to parentName & " | " & newName 39 | if q color of theSelection is "None" then set q color of theSelection to userColor 40 | end if 41 | set selected to theSelection 42 | end if 43 | 44 | if userNameParent and q type of theParent is "Group" then 45 | set parentName to q name of theParent 46 | set q name of theParent to parentName & " | " & newName 47 | if q color of theParent is "None" then set q color of theParent to userColor 48 | end if 49 | 50 | on error 51 | return 52 | end try 53 | end tell -------------------------------------------------------------------------------- /scripts v5/Create Triggers/Create OSC trigger for cue x.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | set userPatch to "This QLab" 5 | set userPrefix to "" 6 | set userSuffix to "." 7 | 8 | tell application id "com.figure53.QLab.5" to tell front workspace 9 | try 10 | set userInput to display dialog "QLab Cue?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 11 | set cueNumber to text returned of userInput 12 | if button returned of userInput is "Continue" then 13 | make type "Network" 14 | set theNetwork to last item of (selected as list) 15 | set network patch name of theNetwork to userPatch 16 | set custom string of theNetwork to ("/cue/" & userPrefix & cueNumber & userSuffix & "/go") 17 | end if 18 | on error 19 | return 20 | end try 21 | end tell -------------------------------------------------------------------------------- /scripts v5/Create Triggers/Create OSC triggers for selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v230416-01 3 | 4 | set userPatch to "This QLab" 5 | 6 | tell application id "com.figure53.QLab.5" to tell front workspace 7 | set theSelection to (selected as list) 8 | set newCues to {} 9 | repeat with eachCue in theSelection 10 | set theQ to q number of eachCue 11 | set selected to eachCue 12 | if theQ is not "" then 13 | make type "Network" 14 | set newCue to last item of (selected as list) 15 | set network patch name of newCue to userPatch 16 | set custom string of newCue to ("/cue/" & theQ & "/start") 17 | set end of newCues to newCue 18 | end if 19 | end repeat 20 | if length of newCues is not 0 then 21 | make type "Group" 22 | set theGroup to last item of (selected as list) 23 | repeat with eachCue in newCues 24 | move cue id (uniqueID of eachCue) of parent of eachCue to end of theGroup 25 | end repeat 26 | end if 27 | end tell -------------------------------------------------------------------------------- /scripts v5/Create Triggers/Create Start triggers for selected.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v230416-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theSelection to (selected as list) 6 | set newCues to {} 7 | repeat with eachCue in theSelection 8 | set theQ to q number of eachCue 9 | set selected to eachCue 10 | make type "Start" 11 | set newCue to last item of (selected as list) 12 | set cue target of newCue to eachCue 13 | set end of newCues to newCue 14 | end repeat 15 | if length of newCues is not 0 then 16 | make type "Group" 17 | set theGroup to last item of (selected as list) 18 | repeat with eachCue in newCues 19 | move cue id (uniqueID of eachCue) of parent of eachCue to end of theGroup 20 | end repeat 21 | end if 22 | end tell -------------------------------------------------------------------------------- /scripts v5/DS100 Speaker Check Builder.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v231012-01 3 | 4 | set userPreWait to 0.1 5 | set userPatchName to "DS100" 6 | set userMuteCueNumber to "muteall" 7 | 8 | 9 | set DELIM to {","} 10 | set L1 to {} -- column 1 items 11 | set L2 to {} -- column 2 items 12 | 13 | set Lx to {L1, L2} 14 | 15 | set aCSV to (choose file) 16 | 17 | set csvList to read aCSV using delimiter linefeed 18 | set {TID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, DELIM} 19 | 20 | repeat with aRow in csvList 21 | set rowItems to text items of aRow 22 | repeat with i from 1 to (count of rowItems) 23 | copy (item i of rowItems) to the end of (item i of Lx) 24 | end repeat 25 | end repeat 26 | set AppleScript's text item delimiters to TID 27 | 28 | tell application id "com.figure53.QLab.5" to tell front workspace 29 | repeat with i from 1 to (count of L1) 30 | 31 | make type "Group" 32 | set theGroup to last item of (selected as list) 33 | set q name of theGroup to (item i of L1) & " " & (item i of L2) 34 | 35 | make type "Start" 36 | set theStart to last item of (selected as list) 37 | set cue target of theStart to cue (userMuteCueNumber) 38 | 39 | make type "Network" 40 | set theNetwork to last item of (selected as list) 41 | set network patch name of theNetwork to userPatchName 42 | set theMessage to "/dbaudio1/matrixoutput/mute/" & i & " 0" 43 | set custom string of theNetwork to theMessage 44 | set pre wait of theNetwork to userPreWait 45 | 46 | move cue id (uniqueID of theStart) of parent of theStart to end of cue id (uniqueID of theGroup) 47 | move cue id (uniqueID of theNetwork) of parent of theNetwork to end of cue id (uniqueID of theGroup) 48 | end repeat 49 | 50 | 51 | return 52 | end tell -------------------------------------------------------------------------------- /scripts v5/Device Patch Columns.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v250310-01 3 | 4 | -- This script is dependent on the existence of a network cue with the number "patchEdit" which targets the local QLab session internally. 5 | 6 | set userPatchName to "Audition" 7 | set userCueOutputs to 64 -- The nunber of cue outputs you a using 8 | set userCopy to 2 -- The patch routing column to copy from 9 | set userPaste to 6 -- The patch routing column to paste into 10 | 11 | tell application id "com.figure53.QLab.5" to tell front workspace 12 | set networkCue to (cue "patchEdit") 13 | repeat with cueOutput from 1 to userCueOutputs 14 | set custom string of networkCue to ("/settings/audio/patch/" & userPatchName & "/level/" & cueOutput & "/" & userPaste & " #/settings/audio/patch/" & userPatchName & "/level/" & cueOutput & "/" & userCopy & "#") 15 | start networkCue 16 | end repeat 17 | end tell -------------------------------------------------------------------------------- /scripts v5/DiGiCo Snapshots/Create DiGiCo Snapshot Group.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v250217-01 3 | 4 | set userColor to "Purple" 5 | set userPrefix to "sd" 6 | set userCueName to "DiGiCo Snapshot" 7 | set userNameParent to true 8 | 9 | tell application id "com.figure53.QLab.5" to tell front workspace 10 | try 11 | set userInput to display dialog "Snapshot?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 12 | set theSnapshot to text returned of userInput 13 | if button returned of userInput is not "Continue" then return 14 | 15 | make type "Start" 16 | set theStart to last item of (selected as list) 17 | set cue target of theStart to cue (userPrefix & theSnapshot) 18 | set q color of theStart to userColor 19 | 20 | make type "Group" 21 | set theGroup to last item of (selected as list) 22 | set q name of theGroup to userCueName & " " & theSnapshot 23 | set q color of theGroup to userColor 24 | 25 | move cue id (uniqueID of theStart) of parent of theStart to end of cue id (uniqueID of theGroup) 26 | 27 | set theParent to parent of theGroup 28 | 29 | if userNameParent and q type of theParent is "Group" then 30 | set parentName to q name of theParent 31 | set q name of theParent to parentName & " | " & userCueName & " " & theSnapshot 32 | if q color of theParent is "None" then set q color of theParent to userColor 33 | end if 34 | 35 | 36 | on error 37 | return 38 | end try 39 | end tell -------------------------------------------------------------------------------- /scripts v5/DiGiCo Snapshots/Create DiGiCo Snapshot.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v250217-02 3 | 4 | set userColor to "Purple" 5 | set userPrefix to "sd" 6 | set userCueName to "Desk Cue" 7 | set userNameParent to true 8 | 9 | tell application id "com.figure53.QLab.5" to tell front workspace 10 | try 11 | 12 | set theSelection to first item of (selected as list) 13 | 14 | set userInput to display dialog "Snapshot?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 15 | set theSnapshot to text returned of userInput 16 | if button returned of userInput is not "Continue" then return 17 | 18 | make type "Start" 19 | set theStart to last item of (selected as list) 20 | set theParent to parent of theStart 21 | set cue target of theStart to cue (userPrefix & theSnapshot) 22 | set q color of theStart to userColor 23 | 24 | if q type of theSelection is "Group" and q type of parent of theSelection is "Cue List" then 25 | move cue id (uniqueID of theStart) to beginning of cue id (uniqueID of theSelection) of parent of theSelection 26 | if userNameParent then 27 | set parentName to q name of theSelection 28 | set q name of theSelection to parentName & " | " & userCueName & " " & theSnapshot 29 | if q color of theSelection is "None" then set q color of theSelection to userColor 30 | end if 31 | set selected to theSelection 32 | 33 | end if 34 | 35 | if userNameParent and q type of theParent is "Group" then 36 | set parentName to q name of theParent 37 | set q name of theParent to parentName & " | " & userCueName & " " & theSnapshot 38 | if q color of theParent is "None" then set q color of theParent to userColor 39 | end if 40 | 41 | on error 42 | return 43 | end try 44 | end tell -------------------------------------------------------------------------------- /scripts v5/DiGiCo Snapshots/DiGiCo CC Generator.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v250207-01 3 | 4 | set userPrefix to "sd" 5 | set userCueName to "SD Snapshot " 6 | set userShowMIDIInfo to true 7 | set userCount to 400 -- The number of snapshot triggers to generate. Do not set above 400. 8 | 9 | 10 | tell application id "com.figure53.QLab.5" to tell front workspace 11 | set i to 1 12 | set scene to 1 13 | 14 | repeat userCount times 15 | make type "MIDI" 16 | set newCue to last item of (selected as list) 17 | 18 | set q number of newCue to userPrefix & (scene) 19 | 20 | set command of newCue to control_change 21 | 22 | if i is less than 100 then 23 | set byteOne to 16 24 | set byteTwo to i 25 | else if i is less than 200 then 26 | set byteOne to 17 27 | set byteTwo to (i - 100) 28 | else if i is less than 300 then 29 | set byteOne to 18 30 | set byteTwo to (i - 200) 31 | else 32 | set byteOne to 19 33 | set byteTwo to (i - 300) 34 | end if 35 | 36 | set channel of newCue to 16 37 | set byte one of newCue to byteOne 38 | set byte two of newCue to byteTwo 39 | 40 | 41 | if userShowMIDIInfo then 42 | set q name of newCue to userCueName & (scene) & " (Ch 16 / CC " & byteOne & " - " & byteTwo & ")" 43 | else 44 | set q name of newCue to userCueName & (scene) 45 | end if 46 | 47 | set i to i + 1 48 | set scene to scene + 1 49 | end repeat 50 | 51 | end tell -------------------------------------------------------------------------------- /scripts v5/Group selected individually.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | set selected to eachCue 8 | set theName to q name of eachCue 9 | set theNum to q number of eachCue 10 | set theID to uniqueID of eachCue 11 | set q number of eachCue to "" 12 | make type "Group" 13 | set theGroup to last item of (selected as list) 14 | set q name of theGroup to theName 15 | set q number of theGroup to theNum 16 | move cue id theID of parent of eachCue to end of theGroup 17 | end repeat 18 | end tell -------------------------------------------------------------------------------- /scripts v5/Group selected, inherit name.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theSelection to (selected as list) 6 | if (count theSelection) is 0 then return 7 | set groupName to q name of last item of (selected as list) 8 | make type "Group" 9 | set groupCue to last item of (selected as list) 10 | if (count theSelection) is 1 then -- if only one cue was selected, name the group after it 11 | set q name of groupCue to groupName 12 | end if 13 | set parentOfGroup to parent of groupCue 14 | repeat with eachCue in theSelection 15 | if contents of eachCue is not parentOfGroup then -- Avoids a potential selection error 16 | move cue id (uniqueID of eachCue) of parent of eachCue to end of groupCue 17 | end if 18 | end repeat 19 | 20 | end tell -------------------------------------------------------------------------------- /scripts v5/Level changes/Change all cue levels by dialog.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v220903-01 3 | 4 | set defaultChange to "-2" 5 | set minLevel to -100 6 | 7 | tell application id "com.figure53.QLab.5" to tell front workspace 8 | try 9 | set theSelection to (selected as list) 10 | if length of theSelection is greater than 1 then 11 | set userConfirmation to display dialog "Multiple cues are selected. Are you sure you want to continue?" buttons {"Stop", "Continue"} default button "Stop" 12 | if button returned of userConfirmation is "Stop" then 13 | return 14 | end if 15 | end if 16 | 17 | set userInput to display dialog "How much?" default answer defaultChange buttons {"Cancel", "Continue"} default button "Continue" 18 | set userIncrement to text returned of userInput 19 | 20 | if button returned of userInput is "Continue" then 21 | 22 | repeat with eachCue in theSelection 23 | if q type of eachCue is in {"Audio", "Fade", "Mic"} then 24 | set theGangs to {} 25 | repeat with i from 1 to 64 26 | set currentLevel to eachCue getLevel row 0 column i 27 | set thisGang to getGang eachCue row 0 column i 28 | if (currentLevel > minLevel) and (thisGang is not in theGangs) then 29 | eachCue setLevel row 0 column i db currentLevel + userIncrement 30 | if thisGang is not missing value then 31 | set end of theGangs to thisGang 32 | end if 33 | end if 34 | end repeat 35 | end if 36 | end repeat 37 | 38 | end if 39 | on error 40 | display dialog "There was an error, sorry! Something might have broken along the way." 41 | return 42 | end try 43 | end tell -------------------------------------------------------------------------------- /scripts v5/Level changes/Main Decrement.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v220903-01 3 | 4 | set userDecrement to 2 -- enter your desired decrement here 5 | 6 | tell application id "com.figure53.QLab.5" to tell front workspace 7 | set theSelection to (selected as list) 8 | repeat with eachCue in theSelection 9 | if q type of eachCue is in {"Audio", "Fade", "Mic"} then 10 | set currentLevel to eachCue getLevel row 0 column 0 11 | set newLevel to currentLevel - userDecrement 12 | eachCue setLevel row 0 column 0 db newLevel 13 | end if 14 | end repeat 15 | end tell -------------------------------------------------------------------------------- /scripts v5/Level changes/Main Increment.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v220903-01 3 | 4 | set userIncrement to 2 -- enter your desired increment here 5 | 6 | tell application id "com.figure53.QLab.5" to tell front workspace 7 | set theSelection to (selected as list) 8 | repeat with eachCue in theSelection 9 | if q type of eachCue is in {"Audio", "Fade", "Mic"} then 10 | set currentLevel to eachCue getLevel row 0 column 0 11 | set newLevel to currentLevel + userIncrement 12 | eachCue setLevel row 0 column 0 db newLevel 13 | end if 14 | end repeat 15 | end tell -------------------------------------------------------------------------------- /scripts v5/Level changes/Main to -inf.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v220903-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | if q type of eachCue is in {"Audio", "Mic", "Fade", "Video"} then 8 | eachCue setLevel row 0 column 0 db -120 9 | end if 10 | end repeat 11 | end tell -------------------------------------------------------------------------------- /scripts v5/Level changes/Main to 0dB.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v220903-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theSelection to (selected as list) 6 | repeat with eachCue in theSelection 7 | if q type of eachCue is in {"Audio", "Mic", "Fade", "Video"} then 8 | eachCue setLevel row 0 column 0 db 0 9 | end if 10 | end repeat 11 | end tell -------------------------------------------------------------------------------- /scripts v5/Level changes/Set crosspoint.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v250228-01 3 | 4 | set userLevel to -6 -- New level 5 | set userRow to 1 -- Audio file channel 6 | set userColumn to 1 -- Cue output 7 | 8 | tell application id "com.figure53.QLab.5" to tell front workspace 9 | set theSelection to (selected as list) 10 | repeat with eachCue in theSelection 11 | if q type of eachCue is "Audio" then 12 | eachCue setLevel row userRow column userColumn db userLevel 13 | end if 14 | end repeat 15 | end tell -------------------------------------------------------------------------------- /scripts v5/Load Parent Group to start of selected Child.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | set userPreRoll to 0.0 5 | 6 | tell application id "com.figure53.QLab.5" to tell front workspace 7 | set theCue to last item of (selected as list) 8 | set thePre to pre wait of theCue 9 | set theParent to parent of theCue 10 | load theParent time (thePre - userPreRoll) 11 | set playback position of parent list of theParent to cue id (uniqueID of theParent) 12 | end tell -------------------------------------------------------------------------------- /scripts v5/Move to cut list.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | set cutListName to "Cut Cues" 5 | 6 | tell application id "com.figure53.QLab.5" to tell front workspace 7 | set theSelection to (selected as list) 8 | try 9 | set cutList to first cue list whose q display name is cutListName 10 | on error 11 | return 12 | end try 13 | repeat with eachCue in theSelection 14 | if q number of eachCue is not "" then 15 | set q name of eachCue to ("(" & q number of eachCue & ") " & q list name of eachCue) 16 | set q number of eachCue to "" 17 | end if 18 | 19 | set cueID to uniqueID of eachCue 20 | set midi trigger of eachCue to disabled 21 | set hotkey trigger of eachCue to disabled 22 | set timecode trigger of eachCue to disabled 23 | set wall clock trigger of eachCue to disabled 24 | set armed of eachCue to false 25 | if parent list of eachCue is not cutList then 26 | move cue id cueID of parent of eachCue to beginning of cutList 27 | end if 28 | end repeat 29 | end tell -------------------------------------------------------------------------------- /scripts v5/Overrides/MIDI In Toggle.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v230416-01 3 | 4 | tell application id "com.figure53.QLab.5" 5 | if midi input enabled of overrides is true then 6 | set midi input enabled of overrides to false 7 | set overrides visibility of overrides to false 8 | else if midi input enabled of overrides is false then 9 | set midi input enabled of overrides to true 10 | set overrides visibility of overrides to false 11 | end if 12 | end tell -------------------------------------------------------------------------------- /scripts v5/Overrides/OSC Out Disable.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v230416-01 3 | 4 | tell application id "com.figure53.QLab.5" 5 | set network external output enabled of overrides to false 6 | set overrides visibility of overrides to true 7 | end tell -------------------------------------------------------------------------------- /scripts v5/Overrides/OSC Out Enable.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v230416-01 3 | 4 | tell application id "com.figure53.QLab.5" 5 | set network external output enabled of overrides to true 6 | set overrides visibility of overrides to false 7 | end tell -------------------------------------------------------------------------------- /scripts v5/Overrides/Show Overrides, Position Bottom Right.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | tell application "Finder" 5 | set desktopX to item 3 of (get bounds of window of desktop) 6 | set desktopY to item 4 of (get bounds of window of desktop) 7 | end tell 8 | 9 | tell application id "com.figure53.QLab.5" 10 | if overrides visibility of overrides is false then 11 | set overrides visibility of overrides to true 12 | end if 13 | set workspaceWindowProps to (get properties of front window) 14 | set workspaceBounds to (get bounds of front window) 15 | 16 | end tell 17 | 18 | tell application "System Events" 19 | if (exists of window "Override Controls" of process "QLab") = true then 20 | set theORWindowSize to size of window "Override Controls" of process "QLab" 21 | set theORWidth to item 1 of theORWindowSize 22 | set theORHeight to item 2 of theORWindowSize 23 | set position of window "Override Controls" of process "QLab" to {(desktopX - theORWidth), (desktopY - theORHeight)} 24 | end if 25 | end tell 26 | 27 | tell application id "com.figure53.QLab.5" 28 | set workspaceBounds to {0, 0, (desktopX - theORWidth), desktopY} 29 | set bounds of window id (uniqueID of workspaceWindowProps) to workspaceBounds 30 | end tell -------------------------------------------------------------------------------- /scripts v5/Overrides/Show Overrides, Position Top Left.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | tell application "Finder" 5 | set desktopX to item 3 of (get bounds of window of desktop) 6 | set desktopY to item 4 of (get bounds of window of desktop) 7 | end tell 8 | 9 | tell application id "com.figure53.QLab.5" 10 | if overrides visibility of overrides is false then 11 | set overrides visibility of overrides to true 12 | end if 13 | set workspaceWindowProps to (get properties of front window) 14 | set workspaceBounds to (get bounds of front window) 15 | 16 | end tell 17 | 18 | tell application "System Events" 19 | if (exists of window "Override Controls" of process "QLab") = true then 20 | set theORWindowSize to size of window "Override Controls" of process "QLab" 21 | set theORWidth to item 1 of theORWindowSize 22 | set theORHeight to item 2 of theORWindowSize 23 | set position of window "Override Controls" of process "QLab" to {0, 0} 24 | end if 25 | end tell 26 | 27 | tell application id "com.figure53.QLab.5" 28 | set workspaceBounds to {theORWidth, 0, desktopX, desktopY} 29 | set bounds of window id (uniqueID of workspaceWindowProps) to workspaceBounds 30 | end tell -------------------------------------------------------------------------------- /scripts v5/Remote Control/Remote App Launch.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | set qlabMain to machine "eppc://username:password@QLab-Main.local" 5 | set qlabBackup to machine "eppc://username:password@QLab-Backup.local" 6 | 7 | using terms from application "Finder" 8 | tell application "Finder" of qlabMain to open ("Applications/SomeApp.app" as POSIX file as alias) 9 | tell application "Finder" of qlabBackup to open ("Applications/SomeApp.app" as POSIX file as alias) 10 | end using terms from -------------------------------------------------------------------------------- /scripts v5/Remote Control/Remote File Open.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | set qlabMain to machine "eppc://username:password@QLab-Main.local" 5 | set qlabBackup to machine "eppc://username:password@QLab-Backup.local" 6 | 7 | using terms from application "Finder" 8 | tell application "Finder" of qlabMain 9 | open POSIX file "/Users/username/someFolder/workspace.qlab4" 10 | end tell 11 | tell application "Finder" of qlabBackup 12 | open POSIX file "/Users/username/someFolder/workspace.qlab4" 13 | end tell 14 | end using terms from -------------------------------------------------------------------------------- /scripts v5/Remote Control/Remote Shutdown.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | set qlabMain to machine "eppc://username:password@QLab-Main.local" 5 | set qlabBackup to machine "eppc://username:password@QLab-Backup.local" 6 | 7 | using terms from application "QLab 5" 8 | tell application "QLab" of qlabMain 9 | quit saving no 10 | end tell 11 | tell application "QLab" of qlabBackup 12 | quit saving no 13 | end tell 14 | end using terms from 15 | 16 | delay 5 17 | 18 | using terms from application "Finder" 19 | tell application "Finder" of qlabMain 20 | shut down 21 | end tell 22 | tell application "Finder" of qlabBackup 23 | shut down 24 | end tell 25 | end using terms from -------------------------------------------------------------------------------- /scripts v5/Set trigger from cue number.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v240915-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theSelection to (selected as list) 6 | set allDigits to every character of "1234567890" 7 | 8 | repeat with eachCue in theSelection 9 | set qNum to q number of eachCue 10 | if qNum is "" then 11 | set midi trigger of eachCue to disabled 12 | set midi command of eachCue to note_on 13 | set midi byte one of eachCue to 0 14 | set midi byte two of eachCue to 0 15 | else if ¬ 16 | text 1 of qNum is in allDigits and ¬ 17 | text -1 of qNum is in allDigits then 18 | if qNum does not contain "." then 19 | set theNote to text 1 thru -1 of qNum 20 | set theVel to "0" 21 | else if text 2 of qNum is "." then 22 | set theNote to text 1 of qNum 23 | set theVel to text 3 thru -1 of qNum 24 | else if text 3 of qNum is "." then 25 | set theNote to text 1 thru 2 of qNum 26 | set theVel to text 4 thru -1 of qNum 27 | else if text 4 of qNum is "." then 28 | set theNote to text 1 thru 3 of qNum 29 | set theVel to text 5 thru -1 of qNum 30 | else if qNum does not contain "." then 31 | set theNote to text 1 thru -1 of qNum 32 | set theVel to "0" 33 | end if 34 | 35 | if length of theVel is 1 then 36 | set theVel to theVel & "0" 37 | end if 38 | 39 | if length of theVel is greater than 2 then 40 | error 41 | end if 42 | 43 | set midi trigger of eachCue to enabled 44 | set midi command of eachCue to note_on 45 | set midi byte one of eachCue to theNote 46 | set midi byte two of eachCue to theVel 47 | end if 48 | end repeat 49 | 50 | end tell -------------------------------------------------------------------------------- /scripts v5/Stem Versioning/Reveal File Target.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | set theCue to last item of (selected as list) 6 | if q type of theCue is "Audio" then 7 | set fileTarget to file target of theCue 8 | tell application "Finder" 9 | reveal fileTarget 10 | activate 11 | end tell 12 | end if 13 | end tell -------------------------------------------------------------------------------- /scripts v5/Stem Versioning/Target version bump by filename.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v250227-01 3 | 4 | set versionLength to 2 -- How many digits for versioning? v1 / v01, 2 digits recommended 5 | 6 | tell application id "com.figure53.QLab.5" to tell front workspace 7 | set theSelection to (selected as list) 8 | repeat with eachCue in theSelection 9 | 10 | if q type of eachCue is "Audio" then 11 | 12 | set theName to q name of eachCue 13 | 14 | -- Get POSIX path of current target 15 | set theTarget to (file target of eachCue) 16 | set originalPath to the POSIX path of theTarget 17 | 18 | -- Break up string components 19 | set lastChars to text -6 thru -1 of originalPath 20 | set thePos to ((6 - ((offset of "." in lastChars) - 2)) * -1) 21 | set theExt to text (offset of "." in lastChars) thru -1 of lastChars 22 | set theTrunk to text 1 thru thePos of originalPath 23 | 24 | -- Determine old version number 25 | set oldVersion to (text (versionLength * -1) thru -1 of theTrunk) as integer 26 | 27 | -- Set new number with leading zero if needed 28 | set newVersion to (oldVersion + 1) as string 29 | if (count newVersion) < versionLength then 30 | set leadingNeeded to versionLength - (count newVersion) 31 | repeat leadingNeeded times 32 | set newVersion to ("0" & newVersion) 33 | end repeat 34 | end if 35 | 36 | -- Generate path to new file 37 | set newTarget to ((text 1 thru (-1 - versionLength) of theTrunk) & newVersion & theExt) 38 | 39 | -- Retarget cue 40 | set file target of eachCue to (POSIX file newTarget) 41 | 42 | end if 43 | end repeat 44 | 45 | end tell -------------------------------------------------------------------------------- /scripts v5/Stem Versioning/Target version bump by folder.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v250227-01 3 | 4 | -- ALERT: Do not use slashes in your filenames 5 | 6 | tell application id "com.figure53.QLab.5" to tell front workspace 7 | set theSelection to (selected as list) 8 | 9 | -- Request folder 10 | set theFolder to the POSIX path of (choose folder with prompt "Which folder are the new stems in?") 11 | 12 | -- Request old version 13 | set oldRequest to display dialog "What is the current version number? Include leading zeroes if needed." default answer "01" buttons {"Cancel", "Continue"} default button "Continue" 14 | set oldVersion to text returned of oldRequest 15 | if button returned of oldRequest is not "Continue" then return 16 | set oldVersionLength to count of oldVersion 17 | 18 | -- Request new version 19 | set newRequest to display dialog "What is the new version number? Include leading zeroes if needed." default answer oldVersion buttons {"Cancel", "Continue"} default button "Continue" 20 | set newVersion to text returned of newRequest 21 | if button returned of newRequest is not "Continue" then return 22 | set newVersionLength to count of newVersion 23 | 24 | 25 | repeat with eachCue in theSelection 26 | 27 | if q type of eachCue is "Audio" then 28 | 29 | set theName to q name of eachCue 30 | 31 | -- Get POSIX path of current target 32 | set theTarget to (file target of eachCue) 33 | set originalPath to the POSIX path of theTarget 34 | 35 | -- Determine name of file without full path 36 | set reversedPath to reverse of characters of originalPath as string 37 | set fileName to text (1 - (offset of "/" in reversedPath)) thru -1 of originalPath -- "bass v02.wav" 38 | 39 | -- Break up string components 40 | set lastChars to text -6 thru -1 of fileName 41 | set thePos to ((6 - ((offset of "." in lastChars) - 2)) * -1) 42 | set theExt to text (offset of "." in lastChars) thru -1 of lastChars -- ".wav" 43 | set theTrunk to text 1 thru thePos of fileName -- "bass v02" 44 | 45 | -- Calculate new file name 46 | set plainTrunk to text 1 thru (-1 - oldVersionLength) of theTrunk 47 | set newFileName to plainTrunk & newVersion & theExt 48 | 49 | -- Calculate new target 50 | set newTarget to theFolder & newFileName 51 | 52 | -- Set new target 53 | set file target of eachCue to (POSIX file newTarget) 54 | end if 55 | end repeat 56 | 57 | end tell -------------------------------------------------------------------------------- /scripts v5/Undo Go.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | tell application id "com.figure53.QLab.5" to tell front workspace 5 | movePlayheadUpASequence 6 | set theSelection to (selected as list) 7 | stop theSelection 8 | end tell -------------------------------------------------------------------------------- /scripts v5/Which cues use output x.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | set userThresh to -100 -- Match this value to your workspace settings. Workspace Settings > Audio > Volume Limits > Min 5 | 6 | tell application id "com.figure53.QLab.5" to tell front workspace 7 | set theSelection to (selected as list) 8 | set theList to {} 9 | set theOut to (display dialog "Which cue output?" default answer "1" buttons {"Cancel", "Go"} default button "Go") 10 | 11 | if button returned of theOut is "Go" and text returned of theOut is not "" then 12 | set theOut to (text returned of theOut as integer) 13 | repeat with eachCue in theSelection 14 | if q type of eachCue is in {"Audio", "Fade", "Mic"} and ((getLevel eachCue row 0 column theOut) > userThresh) then 15 | set end of theList to eachCue 16 | end if 17 | end repeat 18 | set selected to theList 19 | display alert ((length of theList as string) & " of " & (length of theSelection as string) & " cues were found and selected") 20 | 21 | end if 22 | end tell -------------------------------------------------------------------------------- /scripts v5/Yamaha Scenes/Create Yamaha Rivage Decimal-Scene MIDI.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v231012-01 3 | 4 | set userPrefix to "y" 5 | set userNamePrefix to "Rivage Scene" 6 | set showMIDIInfo to true 7 | 8 | tell application id "com.figure53.QLab.5" to tell front workspace 9 | try 10 | -- Get Scene number 11 | set inputSceneNumber to display dialog "Scene?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 12 | if button returned of inputSceneNumber is not "Continue" or text returned of inputSceneNumber is "" then return "Cancelled" 13 | set theScene to (text returned of inputSceneNumber as number) 14 | if theScene > 1000 then error "Scene number " & theScene & " is over 1000" 15 | 16 | -- Get Channel number 17 | set inputChannel to display dialog "Channel?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 18 | if button returned of inputChannel is not "Continue" or text returned of inputChannel is "" then return "Cancelled" 19 | set theChannel to (text returned of inputChannel as number) 20 | if theChannel > 16 then error "Channel number " & theChannel & " is over 16" 21 | 22 | -- Get Program number 23 | set inputProgram to display dialog "Program Number?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 24 | if button returned of inputProgram is not "Continue" or text returned of inputProgram is "" then return "Cancelled" 25 | set theProgram to (text returned of inputProgram as number) 26 | if theProgram > 128 then error "Program number " & theProgram & " is over 128" 27 | 28 | -- Off by one (QLab is 0-127, Yamaha is 1-128) 29 | set byteOne to (theProgram - 1) 30 | 31 | -- Build the MIDI cue 32 | make type "MIDI" 33 | set newMIDI to last item of (selected as list) 34 | set q number of newMIDI to userPrefix & theScene 35 | set command of newMIDI to program_change 36 | set channel of newMIDI to theChannel 37 | set byte one of newMIDI to byteOne 38 | if showMIDIInfo then 39 | set q name of newMIDI to userNamePrefix & " " & theScene & " (Ch " & theChannel & " / PC " & byteOne & ")" 40 | else 41 | set q name of newMIDI to userNamePrefix & theScene 42 | end if 43 | on error errorMsg number errorNum 44 | display dialog ("User entry error: " & errorMsg) 45 | return "Error " & errorNum & " " & errorMsg 46 | end try 47 | end tell -------------------------------------------------------------------------------- /scripts v5/Yamaha Scenes/Create Yamaha Scene Group.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | set userNumPrefix to "y" 5 | set userNamePrefix to "Yamaha Scene" 6 | set userColor to "Purple" 7 | 8 | tell application id "com.figure53.QLab.5" to tell front workspace 9 | try 10 | set userInput to display dialog "Scene?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 11 | set theScene to text returned of userInput 12 | if button returned of userInput is "Continue" and theScene is not "" then 13 | make type "Start" 14 | set theStart to last item of (selected as list) 15 | set cue target of theStart to cue (userNumPrefix & theScene) 16 | set q color of theStart to userColor 17 | make type "Group" 18 | set theGroup to last item of (selected as list) 19 | set q name of theGroup to userNamePrefix & " " & theScene 20 | set q color of theGroup to userColor 21 | move cue id (uniqueID of theStart) of parent of theStart to cue id (uniqueID of theGroup) 22 | end if 23 | on error 24 | return 25 | end try 26 | end tell -------------------------------------------------------------------------------- /scripts v5/Yamaha Scenes/Create Yamaha Scene.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | set userNumPrefix to "y" 5 | set userNamePrefix to "Yamaha Scene" 6 | set userColor to "Purple" 7 | 8 | tell application id "com.figure53.QLab.5" to tell front workspace 9 | try 10 | set userInput to display dialog "Scene?" default answer "" buttons {"Cancel", "Continue"} default button "Continue" 11 | set theScene to text returned of userInput 12 | if button returned of userInput is "Continue" and theScene is not "" then 13 | make type "Start" 14 | set theStart to last item of (selected as list) 15 | set cue target of theStart to cue (userNumPrefix & theScene) 16 | set q color of theStart to userColor 17 | end if 18 | on error 19 | return 20 | end try 21 | end tell -------------------------------------------------------------------------------- /scripts v5/Yamaha Scenes/Yamaha CL Generator.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v211121-01 3 | 4 | set userPrefix to "y" 5 | set userNamePrefix to "Yamaha Scene" 6 | set showMIDIInfo to true 7 | 8 | tell application id "com.figure53.QLab.5" to tell front workspace 9 | set i to 0 10 | set scene to 1 11 | repeat 300 times 12 | make type "MIDI" 13 | set newCue to last item of (selected as list) 14 | 15 | set q number of newCue to userPrefix & scene 16 | 17 | set command of newCue to program_change 18 | 19 | if i is less than 128 then 20 | set theChannel to 1 21 | set byteOne to i 22 | else if i is less than 256 then 23 | set theChannel to 2 24 | set byteOne to (i - 128) 25 | else 26 | set theChannel to 3 27 | set byteOne to (i - 256) 28 | end if 29 | 30 | set channel of newCue to theChannel 31 | set byte one of newCue to byteOne 32 | 33 | 34 | if showMIDIInfo then 35 | set q name of newCue to userNamePrefix & " " & scene & " (Ch " & theChannel & " / PC " & byteOne & ")" 36 | else 37 | set q name of newCue to userNamePrefix & scene 38 | end if 39 | 40 | set i to i + 1 41 | set scene to scene + 1 42 | end repeat 43 | end tell -------------------------------------------------------------------------------- /scripts v5/Yamaha Scenes/Yamaha Rivage Generator.applescript: -------------------------------------------------------------------------------- 1 | -- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts 2 | -- Built for QLab 5. v231012-01 3 | 4 | set userPrefix to "y" 5 | set userNamePrefix to "Rivage Scene" 6 | set showMIDIInfo to true 7 | set totalSceneCount to 300 8 | 9 | tell application id "com.figure53.QLab.5" to tell front workspace 10 | set i to 0 11 | set scene to 1 12 | repeat totalSceneCount times 13 | make type "MIDI" 14 | set newCue to last item of (selected as list) 15 | 16 | set q number of newCue to userPrefix & scene 17 | 18 | set command of newCue to program_change 19 | 20 | if i is less than 100 then 21 | set theChannel to 1 22 | set byteOne to i 23 | else if i is less than 200 then 24 | set theChannel to 2 25 | set byteOne to (i - 100) 26 | else if i is less than 300 then 27 | set theChannel to 3 28 | set byteOne to (i - 200) 29 | else if i is less than 400 then 30 | set theChannel to 4 31 | set byteOne to (i - 300) 32 | else if i is less than 500 then 33 | set theChannel to 5 34 | set byteOne to (i - 400) 35 | else if i is less than 600 then 36 | set theChannel to 6 37 | set byteOne to (i - 500) 38 | else if i is less than 700 then 39 | set theChannel to 7 40 | set byteOne to (i - 600) 41 | else if i is less than 800 then 42 | set theChannel to 8 43 | set byteOne to (i - 700) 44 | else if i is less than 900 then 45 | set theChannel to 9 46 | set byteOne to (i - 800) 47 | else if i is less than 1000 then 48 | set theChannel to 10 49 | set byteOne to (i - 900) 50 | end if 51 | 52 | set channel of newCue to theChannel 53 | set byte one of newCue to byteOne 54 | 55 | 56 | if showMIDIInfo then 57 | set q name of newCue to userNamePrefix & " " & scene & " (Ch " & theChannel & " / PC " & byteOne & ")" 58 | else 59 | set q name of newCue to userNamePrefix & scene 60 | end if 61 | 62 | set i to i + 1 63 | set scene to scene + 1 64 | end repeat 65 | end tell --------------------------------------------------------------------------------