; ============================================================================ ; Proof Lab User Launcher (Restricted) ; ; DEPLOYMENT STRUCTURE: ; \\server\Proof Lab\ ; ├── Proof Lab User.ahk ← This file (visible, shortcut target) ; └── src\ ← Hidden source code folder ; ├── ProofLabUserPanelLauncher.jsx ← User panel entry point ; └── lib\ ← All other files ; ; USAGE: ; 1. Deploy folder structure to network share (e.g., \\server\Proof Lab\) ; 2. Hide src folder (Right-click → Properties → Hidden) ; 3. Create desktop shortcut pointing to \\server\Proof Lab\Proof Lab User.ahk ; 4. Double-click shortcut to activate the hotkeys ; ; SHORTCUTS: ; - Win + N : Laboratory (Auto-fix + ProofLab User Mode) ; - Win + 0 : Swatch Panel (User Mode - Generate only) ; - Ctrl + Alt + S : Setup Artboard Variables ; - Ctrl + Alt + G : Place Garment ; - Win + Shift + P: ProofLab Control Panel (User Mode) ; ; DEPLOYMENT: ; - Local-first runtime: %LOCALAPPDATA%\ProofLab\core\src ; - Fallback runtime: A_ScriptDir\src (share/local package path) ; - Workstations can keep desktop shortcut to ProofLabUser.ahk while scripts load from local hidden runtime ; ; NETWORK SHARE FIX: ; - Removes Zone.Identifier NTFS stream to suppress security warnings ; - This prevents "Do you want to run this script?" dialog in Illustrator ; ; ============================================================================ #SingleInstance force GetProofLabSrcDir(ByRef attemptedPaths) { attemptedPaths := "" EnvGet, envCoreRoot, PROOFLAB_CORE_ROOT if (envCoreRoot != "") { envSrc := RTrim(envCoreRoot, "\/") . "\src" attemptedPaths .= envSrc . "`n" if FileExist(envSrc . "\ProofLabUserPanelLauncher.jsx") return envSrc } localSrc := A_LocalAppData . "\ProofLab\core\src" attemptedPaths .= localSrc . "`n" if FileExist(localSrc . "\ProofLabUserPanelLauncher.jsx") return localSrc scriptDirSrc := A_ScriptDir . "\src" attemptedPaths .= scriptDirSrc . "`n" if FileExist(scriptDirSrc . "\ProofLabUserPanelLauncher.jsx") return scriptDirSrc return scriptDirSrc } ; Common function to execute an Illustrator script with Zone.Identifier fix RunIllustratorScript(scriptName) { srcDir := GetProofLabSrcDir(attemptedPaths) scriptPath := srcDir . "\" . scriptName ; Check if file exists to provide better error message if !FileExist(scriptPath) { MsgBox, 16, Proof Lab Error, Script file not found:`n%scriptPath%`n`nChecked paths:`n%attemptedPaths%`nRun start-pdb-bridge.cmd once to refresh local runtime. return } ; NETWORK SHARE FIX: Remove Zone.Identifier stream to suppress security warning ; This prevents Adobe Illustrator from showing "Do you want to run this script?" dialog RunWait, powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Unblock-File -Path '%scriptPath%' -ErrorAction SilentlyContinue", , Hide ; Launch the Illustrator script Run, Illustrator.exe "%scriptPath%" } ; ---------------------------------------------------------------------------- ; Win+N : Laboratory (Auto-fix + ProofLab User Mode) ; ---------------------------------------------------------------------------- #n:: if WinActive("ahk_class illustrator") { RunIllustratorScript("LaboratoryUserLauncher.jsx") } return ; ---------------------------------------------------------------------------- ; Win+0 : Swatch Panel (User Mode - Generate only) ; ---------------------------------------------------------------------------- #0:: if WinActive("ahk_class illustrator") { RunIllustratorScript("SwatchesSettingsUserLauncher.jsx") } return ; ---------------------------------------------------------------------------- ; Ctrl+Alt+S : Setup Artboard Variables ; ---------------------------------------------------------------------------- ^!s:: if WinActive("ahk_class illustrator") { RunIllustratorScript("SetupVariablesLauncher.jsx") } return ; ---------------------------------------------------------------------------- ; Ctrl+Alt+G : Place Garment ; ---------------------------------------------------------------------------- ^!g:: if WinActive("ahk_class illustrator") { RunIllustratorScript("PlaceGarmentLauncher.jsx") } return ; ---------------------------------------------------------------------------- ; Win+Shift+P : ProofLab Control Panel (User Mode) ; ---------------------------------------------------------------------------- #+p:: if WinActive("ahk_class illustrator") { RunIllustratorScript("ProofLabUserPanelLauncher.jsx") } return