Created
January 3, 2024 21:07
-
-
Save johnlindquist/9d99e8e6b2128c6cc1ac367b2692d006 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: Toggle Transcribe | |
import "@johnlindquist/kit" | |
let ahScript = ` | |
let sessionName = "Transcribe"; //Set me to the target session | |
let session = app.sessionWithName( sessionName ) | |
if( session.running ) | |
session.stop() | |
else | |
session.start() | |
` | |
let ahScriptPath = kenvPath("ah", "toggle-transcribe.ahcommand") | |
await ensureDir(path.dirname(ahScriptPath)) | |
await writeFile(ahScriptPath, ahScript) | |
console.log(`Opening Audio Hijack with script: ${ahScriptPath}`) | |
await exec(`open -b com.rogueamoeba.audiohijack ${ahScriptPath}`) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment