diff --git a/.github/README.md b/.github/README.md deleted file mode 100644 index 5a65078..0000000 --- a/.github/README.md +++ /dev/null @@ -1,180 +0,0 @@ -# Scripts - Windows Gaming & Automation Toolkit - -> **Comprehensive AutoHotkey automation suite for Windows gaming, emulation, and productivity** - -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -[![GitHub Release](https://img.shields.io/github/v/release/Ven0m0/Scripts?label=Current%20Release)](https://github.com/Ven0m0/Scripts/releases) -[![GitHub Downloads](https://img.shields.io/github/downloads/Ven0m0/Scripts/total?logo=github&label=GitHub%20Downloads)](https://github.com/Ven0m0/Scripts/releases) -[![Commit activity](https://img.shields.io/github/last-commit/Ven0m0/Scripts?logo=github)](https://github.com/Ven0m0/Scripts/commits) - ---- - -## Quick Links - -- **[Main README](../README.md)** - Full project documentation -- **[CONTRIBUTING.md](../CONTRIBUTING.md)** - How to contribute -- **[CHANGELOG.md](../CHANGELOG.md)** - Version history -- **[CODE_OF_CONDUCT.md](../CODE_OF_CONDUCT.md)** - Community guidelines - ---- - -## Featured Tools - -### 🎮 Gaming & Emulation - -#### [YouTube & Spotify Downloader](../Other/Downloader/) - - - Downloader GUI - - -GUI-based media downloaders for YouTube videos/audio and Spotify playlists/tracks. - -**Features:** -- Download videos or extract audio from YouTube -- Download songs from Spotify playlists -- Quality selection and format conversion -- User-friendly GUI interface - -[View Documentation →](../Other/Downloader/README.md) - ---- - -#### [Citra Mod Manager](../Other/Citra_mods/) - - - Citra Mod Manager - - -GUI for managing mods and HD texture packs for Citra 3DS emulator. - -**Features:** -- Enable/disable mods per game -- HD texture pack management -- CSV-based game database -- Per-game settings - -[View Documentation →](../Other/Citra_mods/README.md) - ---- - -### 🖥️ Window Management - -#### [Borderless Fullscreen](../AHK_v2/Fullscreen.ahk) - -Toggle borderless fullscreen on any window with multi-monitor support. - -**Features:** -- Multi-monitor aware -- Saves and restores window state -- Works with games lacking native borderless mode - ---- - -#### [Auto-Fullscreen Manager](../Other/AutoStartManager.ahk) - -Unified data-driven auto-fullscreen launcher for all major emulators. - -**Supported Emulators:** -- Citra, Yuzu, Ryujinx -- RPCS4, PCSX2 -- Dolphin, Cemu -- And 10+ more! - ---- - -### 🛠️ System Utilities - -#### [Power Plan Automation](../AHK_v2/Powerplan.ahk) - -Automatically switch Windows power plan based on running applications. - -#### [Controller Quit](../AHK_v2/ControllerQuit.ahk) - -Close applications using gamepad button combinations. - -#### [GUI Launchers](../AHK_v2/GUI/) - -Centralized script launchers with graphical interface for easy management. - ---- - -## Additional Tools - -### [Playnite Auto-Fullscreen](../Other/Playnite_fullscreen_v2/) - -Multi-monitor setup automation for Playnite with boot videos. - -### [Citra Per-Game Config](../Other/Citra_per_game_config/) - -Automatically apply per-game configuration settings to Citra emulator. - -### [7zEmuPrepper](../Other/7zEmuPrepper/) - -On-the-fly game decompression for emulation front-ends. - -### [Robocopy Utilities](../Other/Robocopy/) - -Batch script wrappers for Windows Robocopy with extension filtering. - ---- - -## Project Statistics - -- **61+ AutoHotkey scripts** (v1 and v2) -- **45+ scripts migrated** to AutoHotkey v2 -- **15+ emulators supported** for auto-fullscreen -- **Dual library architecture** for v1/v2 compatibility -- **MIT Licensed** - Free and open source - ---- - -## Quick Start - -1. **Install AutoHotkey** - - [AutoHotkey v2.0.19+](https://www.autohotkey.com/) for modern scripts - - [AutoHotkey v1.1.37.02+](https://www.autohotkey.com/download/) for legacy scripts - -2. **Clone the repository** - ```bash - git clone https://github.com/Ven0m0/Scripts.git - cd Scripts - ``` - -3. **Run any script** - - Double-click `.ahk` files - - Or run from command line: `autohotkey script.ahk` - ---- - -## Documentation - -- **[README.md](../README.md)** - Main project documentation -- **[CLAUDE.md](../CLAUDE.md)** - Comprehensive developer guide (1700+ lines) -- **[EXAMPLES.md](../EXAMPLES.md)** - Common usage patterns and examples -- **[CONTRIBUTING.md](../CONTRIBUTING.md)** - Contribution guidelines -- **[CHANGELOG.md](../CHANGELOG.md)** - Version history - ---- - -## CI/CD & Workflows - -This directory contains GitHub Actions workflows for: - -- **Code Quality** - Syntax validation and formatting checks -- **Automated Builds** - Compilation of .exe releases -- **Version Detection** - Automatic v1/v2 script detection - -See [workflows/](workflows/) for workflow definitions. - ---- - -## Support - -- **Issues:** [GitHub Issues](https://github.com/Ven0m0/Scripts/issues) -- **Email:** ven0m0.wastaken@gmail.com -- **License:** MIT - ---- - -**⭐ Star this repository if you find it useful!** diff --git a/.github/workflows/ahk-lint-format-compile.yml b/.github/workflows/ahk-lint-format-compile.yml index 696eb4c..95e17c5 100644 --- a/.github/workflows/ahk-lint-format-compile.yml +++ b/.github/workflows/ahk-lint-format-compile.yml @@ -61,8 +61,8 @@ jobs: if ($content -match '(?m)^#Requires\s+AutoHotkey\s+v2') { $isV2 = $true } - # Check for v2 directory paths - elseif ($rel -match '(Lib[\\/]v2[\\/]|AHK_v2[\\/])') { + # Check for v2 directory paths (Lib/v2, ahk/, Other/**/v2/) + elseif ($rel -match '(Lib[\\/]v2[\\/]|ahk[\\/]|Other.*[\\/]v2[\\/])') { $isV2 = $true } diff --git a/CLAUDE.md b/CLAUDE.md index ff92cbf..0b1a076 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -86,7 +86,7 @@ This repository has undergone a comprehensive migration from AutoHotkey v1.1 to **Consolidated & Deleted** (24 files): - ❌ 9 auto-start scripts → 1 data-driven AutoStartManager.ahk with AutoStartConfig.ini -- ❌ 3 fullscreen variants → 1 unified AHK_v2/Fullscreen.ahk +- ❌ 3 fullscreen variants → 1 unified ahk/Fullscreen.ahk - ❌ 4 duplicate downloader drafts removed - ❌ 7 deprecated auto-start v1 files (covered by AutoStartManager) - ❌ 4 deprecated v1 utility files (Close*Window, Kill_Bluestacks, Lossless_Scaling*\*) @@ -127,7 +127,7 @@ Lib/ The build system (`ahk-lint-format-compile.yml`) now **automatically detects** script version: - Checks for `#Requires AutoHotkey v2` directive -- Checks for `Lib/v2/` or `AHK_v2/` in file path +- Checks for `Lib/v2/` or `ahk/` in file path - Compiles with appropriate AHK version (v1.1.37.02 or v2.0.19) ### v1 to v2 Syntax Quick Reference diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2a3b88a..5410570 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,7 +50,7 @@ This project follows a simple code of conduct: be respectful, constructive, and ``` Scripts/ -├── AHK_v2/ # AutoHotkey v2 scripts +├── ahk/ # AutoHotkey v2 scripts ├── Lib/ # Shared libraries (v1 and v2) ├── Other/ # Specialized utilities ├── .github/ # CI/CD workflows and instructions diff --git a/EXAMPLES.md b/EXAMPLES.md index e4e2c5c..7662808 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -20,7 +20,7 @@ This document provides practical examples and common usage patterns for the scri **Use Case:** Make any game fullscreen without borders ```autohotkey -; AHK_v2/Fullscreen.ahk +; ahk/Fullscreen.ahk #Requires AutoHotkey v2.0 #Include A_ScriptDir "\..\Lib\v2\WindowManager.ahk" diff --git a/Other/Citra_per_game_config/v2/CitraConfigBase.ahk b/Other/Citra_per_game_config/v2/CitraConfigBase.ahk new file mode 100644 index 0000000..3a3f043 --- /dev/null +++ b/Other/Citra_per_game_config/v2/CitraConfigBase.ahk @@ -0,0 +1,39 @@ +; ============================================================================ +; CitraConfigBase.ahk - Shared initialization for Citra config scripts (v2) +; Version: 2.0.0 +; Migrated from v1: 2025-12-26 +; Changes: Eliminated tf.ahk dependency, modernized v2 syntax +; ============================================================================ + +#Requires AutoHotkey v2.0 +#SingleInstance Force + +; Performance optimizations +#KeyHistory 0 +ListLines False +SetKeyDelay -1, -1 +SetMouseDelay -1 +SetDefaultMouseSpeed 0 +SetWinDelay -1 +SetControlDelay -1 +SendMode "Input" +SetTitleMatchMode 3 +SetWorkingDir A_ScriptDir + +; Include v2 helper functions +#Include CitraConfigHelpers.ahk + +; Global config file path +OneDriveDir := EnvGet("OneDrive") +if (OneDriveDir = "") { + MsgBox("OneDrive environment variable not set!`n`nPlease ensure OneDrive is installed and configured.", "Config Error", 16) + ExitApp 1 +} + +global CitraConfigFile := OneDriveDir . "\Backup\Game\Emul\Citra\nightly-mingw\user\config\qt-config.ini" + +; Verify config file exists +if !FileExist(CitraConfigFile) { + MsgBox("Citra config file not found:`n" CitraConfigFile "`n`nPlease verify your Citra installation.", "Config Error", 16) + ExitApp 1 +} diff --git a/Other/Citra_per_game_config/v2/CitraConfigHelpers.ahk b/Other/Citra_per_game_config/v2/CitraConfigHelpers.ahk new file mode 100644 index 0000000..a7aa9ea --- /dev/null +++ b/Other/Citra_per_game_config/v2/CitraConfigHelpers.ahk @@ -0,0 +1,127 @@ +; ============================================================================ +; CitraConfigHelpers.ahk - v2 Helper Functions for Citra Configuration +; Replaces tf.ahk dependency with native v2 functions +; Author: Migrated from v1 - 2025-12-26 +; ============================================================================ + +#Requires AutoHotkey v2.0 + +; ============================================================================ +; RegExEscape(str) - Escape regex special characters +; +; Escapes special regex characters to allow literal string matching +; +; Parameters: +; str - String to escape +; +; Returns: +; Escaped string safe for use in regex patterns +; ============================================================================ +RegExEscape(str) { + static specials := "()[]{}?*+|^$.\" + out := "" + for char in StrSplit(str) + out .= InStr(specials, char) ? "\" char : char + return out +} + +; ============================================================================ +; SetKey(content, key, value) - Set or replace INI key value +; +; Modifies an INI-style configuration string by setting a key=value pair. +; If the key exists, replaces its value. If not, appends the key=value. +; +; Parameters: +; content - Configuration file content as string +; key - Key name (e.g., "resolution_factor") +; value - Value to set +; +; Returns: +; Modified configuration content +; ============================================================================ +SetKey(content, key, value) { + pat := "m)^(" . RegExEscape(key) . ")\s*=.*$" + if RegExMatch(content, pat) + return RegExReplace(content, pat, "$1=" value, , 1) + else + return content "`n" key "=" value +} + +; ============================================================================ +; LoadConfig(configFile) - Load configuration file +; +; Reads configuration file into string for manipulation +; +; Parameters: +; configFile - Path to configuration file +; +; Returns: +; File content as string, or empty string if file doesn't exist +; ============================================================================ +LoadConfig(configFile) { + cfg := "" + if FileExist(configFile) + cfg := FileRead(configFile) + return cfg +} + +; ============================================================================ +; SaveConfig(cfg, configFile) - Save configuration file +; +; Writes configuration string to file with backup +; +; Parameters: +; cfg - Configuration content to write +; configFile - Path to configuration file +; +; Returns: +; true on success, false on failure +; ============================================================================ +SaveConfig(cfg, configFile) { + ; Create backup before modifying + if FileExist(configFile) { + try { + FileCopy(configFile, configFile . ".bak", 1) + } catch { + ; Backup failed, but continue anyway + } + } + + ; Write new config + try { + if FileExist(configFile) + FileDelete(configFile) + FileAppend(cfg, configFile) + return true + } catch as err { + MsgBox("Error saving config: " . err.Message, "Config Save Error", 16) + return false + } +} + +; ============================================================================ +; ReplaceInFile(filePath, searchText, replaceText) - Replace text in file +; +; Simplified replacement of TF_Replace functionality +; Replaces all occurrences of searchText with replaceText in a file +; +; Parameters: +; filePath - Path to file to modify +; searchText - Text to search for +; replaceText - Text to replace with +; +; Returns: +; true on success, false on failure +; ============================================================================ +ReplaceInFile(filePath, searchText, replaceText) { + try { + cfg := LoadConfig(filePath) + if (cfg = "") + return false + + cfg := StrReplace(cfg, searchText, replaceText) + return SaveConfig(cfg, filePath) + } catch { + return false + } +} diff --git a/Other/Citra_per_game_config/v2/CitraPerGame.ahk b/Other/Citra_per_game_config/v2/CitraPerGame.ahk new file mode 100644 index 0000000..5299065 --- /dev/null +++ b/Other/Citra_per_game_config/v2/CitraPerGame.ahk @@ -0,0 +1,164 @@ +; ============================================================================ +; CitraPerGame.ahk - Unified per-game Citra config applicator (v2) +; Usage: Run this script with first arg = game key (see list in ShowHelp()). +; Migrated from v1: 2025-12-26 +; Changes: Eliminated tf.ahk dependency, modernized v2 syntax +; ============================================================================ + +#Include CitraConfigBase.ahk + +;--- Helpers --------------------------------------------------------------- + +SetRes(f) { + global CitraConfigFile + cfg := LoadConfig(CitraConfigFile) + ; Replace resolution_factor with value f (supports 1-10) + cfg := RegExReplace(cfg, "m)^resolution_factor=([2-9]|10|1)$", "resolution_factor=" f) + SaveConfig(cfg, CitraConfigFile) +} + +SetFilter(name, isDefaultTrue) { + global CitraConfigFile + cfg := LoadConfig(CitraConfigFile) + + if (name = "none") + cfg := StrReplace(cfg, "texture_filter_name=xBRZ freescale", "texture_filter_name=none") + else if (name = "xBRZ freescale") + cfg := StrReplace(cfg, "texture_filter_name=none", "texture_filter_name=xBRZ freescale") + + cfg := StrReplace(cfg, "texture_filter_name\default=" (isDefaultTrue ? "false" : "true"), "texture_filter_name\default=" (isDefaultTrue ? "true" : "false")) + SaveConfig(cfg, CitraConfigFile) +} + +SetShader(name, wantDefaultFalse) { + global CitraConfigFile + cfg := LoadConfig(CitraConfigFile) + + if (name = "none (builtin)") + cfg := StrReplace(cfg, "pp_shader_name=Bump_Mapping_AA_optimize", "pp_shader_name=none (builtin)") + else if (name = "Bump_Mapping_AA_optimize") + cfg := StrReplace(cfg, "pp_shader_name=none (builtin)", "pp_shader_name=Bump_Mapping_AA_optimize") + + cfg := StrReplace(cfg, "pp_shader_name\default=" (wantDefaultFalse ? "true" : "false"), "pp_shader_name\default=" (wantDefaultFalse ? "false" : "true")) + SaveConfig(cfg, CitraConfigFile) +} + +SetPreload(on) { + global CitraConfigFile + cfg := LoadConfig(CitraConfigFile) + + cfg := StrReplace(cfg, "preload_textures\default=" (on ? "true" : "false"), "preload_textures\default=" (on ? "false" : "true")) + cfg := StrReplace(cfg, "preload_textures=" (on ? "false" : "false"), "preload_textures=" (on ? "true" : "false")) + SaveConfig(cfg, CitraConfigFile) +} + +SetClock(pct) { + global CitraConfigFile + cfg := LoadConfig(CitraConfigFile) + + cfg := StrReplace(cfg, "cpu_clock_percentage=125", "cpu_clock_percentage=" pct) + cfg := StrReplace(cfg, "cpu_clock_percentage=25", "cpu_clock_percentage=" pct) + SaveConfig(cfg, CitraConfigFile) +} + +SetLayout(opt) { + global CitraConfigFile + cfg := LoadConfig(CitraConfigFile) + + cfg := StrReplace(cfg, "layout_option=2", "layout_option=" opt) + cfg := StrReplace(cfg, "layout_option=0", "layout_option=" opt) + SaveConfig(cfg, CitraConfigFile) +} + +NormKey(k) { + k := StrLower(k) + k := StrReplace(k, A_Space, "_") + k := StrReplace(k, "-", "_") + k := StrReplace(k, "'", "") + return k +} + +ShowHelp() { + helpText := " + ( + Usage: + " A_ScriptName " + + Keys: + default + 3d_land + hd_texture_pack + luigi_s_mansion_2 + mario_kart_7 + mario_luigi_bowser_s_inside_story + mario_luigi + no_preloading + nsmb2 + )" + MsgBox(helpText, "CitraPerGame", 48) + ExitApp 1 +} + +;--- Main ------------------------------------------------------------------ + +if (A_Args.Length < 1) + ShowHelp() + +game := NormKey(A_Args[1]) + +; Aliases +if (game = "luigi_mansion_2") + game := "luigi_s_mansion_2" +else if (game = "mario_luigi_bis") + game := "mario_luigi_bowser_s_inside_story" +else if (game = "mario_luigi_bowsers_inside_story") + game := "mario_luigi_bowser_s_inside_story" + +; Apply configs +if (game = "default") { + SetRes(10) + SetFilter("xBRZ freescale", false) + SetShader("Bump_Mapping_AA_optimize", true) + SetPreload(true) + SetClock(125) + SetLayout(2) +} else if (game = "3d_land") { + SetRes(8) + SetFilter("none", true) + SetShader("none (builtin)", false) + SetPreload(false) +} else if (game = "hd_texture_pack") { + SetRes(4) + SetFilter("none", true) + SetShader("none (builtin)", false) + SetPreload(false) +} else if (game = "luigi_s_mansion_2") { + SetRes(6) + SetClock(25) +} else if (game = "mario_kart_7") { + SetRes(5) + SetFilter("none", true) + SetPreload(false) +} else if (game = "mario_luigi_bowser_s_inside_story") { + SetLayout(0) + SetFilter("none", true) + SetShader("none (builtin)", false) + SetPreload(false) +} else if (game = "mario_luigi") { + SetLayout(0) +} else if (game = "no_preloading") { + SetRes(10) + SetFilter("xBRZ freescale", false) + SetShader("Bump_Mapping_AA_optimize", true) + SetPreload(false) +} else if (game = "nsmb2") { + SetRes(10) + SetFilter("none", true) + SetShader("none (builtin)", false) + SetPreload(false) +} else { + ShowHelp() +} + +MsgBox("Applied config for '" game "'.", "CitraPerGame", 64) +ExitApp 0 diff --git a/Other/Citra_per_game_config/v2/Default.ahk b/Other/Citra_per_game_config/v2/Default.ahk new file mode 100644 index 0000000..f9a7ced --- /dev/null +++ b/Other/Citra_per_game_config/v2/Default.ahk @@ -0,0 +1,41 @@ +; ============================================================================ +; Default.ahk - Apply default Citra configuration (v2) +; Migrated from v1: 2025-12-26 +; Changes: Eliminated tf.ahk dependency, modernized v2 syntax +; ============================================================================ + +#Include CitraConfigBase.ahk + +; Load current configuration +cfg := LoadConfig(CitraConfigFile) + +; Internal Resolution to 10x +cfg := RegExReplace(cfg, "m)^resolution_factor=([2-9]|10|1)$", "resolution_factor=10") + +; Texture Filter to XBRZ Freescale +cfg := StrReplace(cfg, "texture_filter_name=none", "texture_filter_name=xBRZ freescale") +cfg := StrReplace(cfg, "texture_filter_name\default=true", "texture_filter_name\default=false") + +; Shader to Bump Mapping AA Optimize +cfg := StrReplace(cfg, "pp_shader_name=none (builtin)", "pp_shader_name=Bump_Mapping_AA_optimize") +cfg := StrReplace(cfg, "pp_shader_name\default=true", "pp_shader_name\default=false") + +; Preloading on +cfg := StrReplace(cfg, "preload_textures\default=true", "preload_textures\default=false") +cfg := StrReplace(cfg, "preload_textures=false", "preload_textures=true") + +; Emulation Speed to 125% +cfg := StrReplace(cfg, "cpu_clock_percentage=25", "cpu_clock_percentage=125") + +; Layout to Large screen +cfg := StrReplace(cfg, "layout_option=0", "layout_option=2") + +; Save configuration +if SaveConfig(cfg, CitraConfigFile) { + MsgBox("Default Citra configuration applied successfully!", "Config Applied", 64) +} else { + MsgBox("Failed to apply configuration. Please check file permissions.", "Error", 16) + ExitApp 1 +} + +ExitApp 0 diff --git a/Other/Downloader/Update-Downloaders.ps1 b/Other/Downloader/Update-Downloaders.ps1 new file mode 100644 index 0000000..3b525d5 --- /dev/null +++ b/Other/Downloader/Update-Downloaders.ps1 @@ -0,0 +1,44 @@ +<# +.SYNOPSIS + Updates yt-dlp and spotdl to latest versions +.DESCRIPTION + Automatically updates media downloader tools to their latest versions +.NOTES + Migrated from update.cmd - 2025-12-26 +#> +[CmdletBinding()] +param() + +$ErrorActionPreference = "Continue" +Set-Location $PSScriptRoot + +Write-Host "Updating media downloaders..." -ForegroundColor Cyan + +# Update yt-dlp +if (Test-Path ".\yt-dlp.exe") { + Write-Host "`nUpdating yt-dlp..." -ForegroundColor Yellow + & .\yt-dlp.exe --rm-cache-dir -U --update-to nightly + if ($LASTEXITCODE -eq 0) { + Write-Host "yt-dlp updated successfully" -ForegroundColor Green + } else { + Write-Warning "yt-dlp update failed (exit code: $LASTEXITCODE)" + } +} else { + Write-Warning "yt-dlp.exe not found in $PSScriptRoot" +} + +# Update spotdl +if (Test-Path ".\spotdl.exe") { + Write-Host "`nDownloading ffmpeg for spotdl..." -ForegroundColor Yellow + & .\spotdl.exe --download-ffmpeg + if ($LASTEXITCODE -eq 0) { + Write-Host "spotdl ffmpeg updated successfully" -ForegroundColor Green + } else { + Write-Warning "spotdl ffmpeg download failed" + } +} else { + Write-Warning "spotdl.exe not found in $PSScriptRoot" +} + +Write-Host "`nUpdate complete!" -ForegroundColor Green +Start-Sleep -Seconds 2 diff --git a/Other/Robocopy/Copy-Images.ps1 b/Other/Robocopy/Copy-Images.ps1 new file mode 100644 index 0000000..d82bedb --- /dev/null +++ b/Other/Robocopy/Copy-Images.ps1 @@ -0,0 +1,46 @@ +<# +.SYNOPSIS + Copies image files using robocopy with multi-threading +.DESCRIPTION + Recursively copies image files from source to destination using robocopy +.PARAMETER Source + Source directory path +.PARAMETER Destination + Destination directory path +.PARAMETER Threads + Number of threads for robocopy (default: 32) +.NOTES + Migrated from Copy_images.cmd - 2025-12-26 +.EXAMPLE + .\Copy-Images.ps1 -Source "C:\Pictures" -Destination "D:\Backup\Pictures" +#> +[CmdletBinding()] +param( + [Parameter(Mandatory=$false, Position=0)] + [string]$Source = "input Path", + + [Parameter(Mandatory=$false, Position=1)] + [string]$Destination = "output path", + + [ValidateRange(1, 128)] + [int]$Threads = 32 +) + +$ErrorActionPreference = "Stop" + +# Image extensions +$extensions = "*.jpg *.png *.webp *.bmp *.ico" + +Write-Host "Copying images from '$Source' to '$Destination'..." -ForegroundColor Cyan + +# Execute robocopy +$result = robocopy "$Source" "$Destination" $extensions /s /MT:$Threads /NJH /NFL /NC /NS + +# Robocopy exit codes: 0-7 are success, 8+ are errors +if ($LASTEXITCODE -lt 8) { + Write-Host "Copy completed successfully" -ForegroundColor Green + exit 0 +} else { + Write-Error "Robocopy failed with exit code $LASTEXITCODE" + exit 1 +} diff --git a/README.md b/README.md index 72c6a52..1839d77 100644 --- a/README.md +++ b/README.md @@ -126,9 +126,14 @@ Scripts/ │ ├── Keys.ahk # Main hotkey suite (v1) │ └── Powerplan.ahk # Auto power plan switching │ -├── AHK_v2/ # v2-specific scripts -│ ├── Fullscreen.ahk # v2 fullscreen implementation -│ └── (other v2 scripts) +├── ahk/ # AutoHotkey v2 scripts +│ ├── Black_ops_6/ # CoD BO6 AFK macros +│ ├── GUI/ # Script launcher GUIs +│ ├── Minecraft/ # Minecraft AFK automation +│ ├── ControllerQuit.ahk # Quit apps with controller +│ ├── Fullscreen.ahk # Borderless fullscreen toggle +│ ├── Keys.ahk # Main hotkey suite +│ └── Powerplan.ahk # Auto power plan switching │ ├── Lib/ # Shared libraries │ ├── v1/ # AutoHotkey v1.1 libraries @@ -164,11 +169,11 @@ Scripts/ ### Window Management -| Script | Description | Version | -| ----------------------- | ----------------------------------------------------- | ------- | -| `AHK_v2/Fullscreen.ahk` | Toggle borderless fullscreen (multi-monitor) | v2 | -| `AHK/Keys.ahk` | Comprehensive hotkey suite (Win+Arrow snapping, etc.) | v1 | -| `AHK/GUI/WM.ahk` | Window management GUI controls | v2 | +| Script | Description | Version | +| ---------------------- | ----------------------------------------------------- | ------- | +| `ahk/Fullscreen.ahk` | Toggle borderless fullscreen (multi-monitor) | v2 | +| `ahk/Keys.ahk` | Comprehensive hotkey suite (Win+Arrow snapping, etc.) | v2 | +| `ahk/GUI/WM.ahk` | Window management GUI controls | v2 | ### Emulator Automation @@ -182,10 +187,10 @@ Scripts/ | Script | Description | Version | | ---------------------------- | ------------------------------- | ------- | -| `AHK/Black_ops_6/AFK_*.ahk` | Black Ops 6 AFK farming macros | v2 | -| `AHK/Minecraft/MC_AFK_*.ahk` | Minecraft AFK automation | v2 | -| `AHK/ControllerQuit.ahk` | Quit apps with controller combo | v2 | -| `AHK/Powerplan.ahk` | Auto power plan switching | v2 | +| `ahk/Black_ops_6/bo6-afk.ahk`| Black Ops 6 AFK farming macros | v2 | +| `ahk/Minecraft/MC_AFK*.ahk` | Minecraft AFK automation | v2 | +| `ahk/ControllerQuit.ahk` | Quit apps with controller combo | v2 | +| `ahk/Powerplan.ahk` | Auto power plan switching | v2 | ### Media & Downloaders @@ -245,8 +250,8 @@ This repository has undergone a **comprehensive migration** to AutoHotkey v2.0 w - [Other/Downloader/](Other/Downloader/README.md) - [Other/Citra_mods/](Other/Citra_mods/README.md) - [Other/Citra_per_game_config/](Other/Citra_per_game_config/README.md) - - [AHK_v2/](AHK_v2/README.md) - - [AHK_v2/GUI/](AHK_v2/GUI/README.md) + - [ahk/](ahk/README.md) + - [ahk/GUI/](ahk/GUI/README.md) - [Lib/](Lib/README.md) ### For Developers & AI Assistants diff --git a/AHK_v2/Black_ops_6/README.md b/ahk/Black_ops_6/README.md similarity index 100% rename from AHK_v2/Black_ops_6/README.md rename to ahk/Black_ops_6/README.md diff --git a/AHK_v2/Black_ops_6/bo6-afk.ahk b/ahk/Black_ops_6/bo6-afk.ahk similarity index 100% rename from AHK_v2/Black_ops_6/bo6-afk.ahk rename to ahk/Black_ops_6/bo6-afk.ahk diff --git a/AHK_v2/ControllerQuit.ahk b/ahk/ControllerQuit.ahk similarity index 100% rename from AHK_v2/ControllerQuit.ahk rename to ahk/ControllerQuit.ahk diff --git a/AHK_v2/Fullscreen.ahk b/ahk/Fullscreen.ahk similarity index 100% rename from AHK_v2/Fullscreen.ahk rename to ahk/Fullscreen.ahk diff --git a/AHK_v2/GUI/GUI.ahk b/ahk/GUI/GUI.ahk similarity index 100% rename from AHK_v2/GUI/GUI.ahk rename to ahk/GUI/GUI.ahk diff --git a/AHK_v2/GUI/GUI_Shared.ahk b/ahk/GUI/GUI_Shared.ahk similarity index 100% rename from AHK_v2/GUI/GUI_Shared.ahk rename to ahk/GUI/GUI_Shared.ahk diff --git a/AHK_v2/GUI/README.md b/ahk/GUI/README.md similarity index 99% rename from AHK_v2/GUI/README.md rename to ahk/GUI/README.md index 6c4dc36..e926489 100644 --- a/AHK_v2/GUI/README.md +++ b/ahk/GUI/README.md @@ -381,7 +381,7 @@ myGui.Show() ## Resources - [AutoHotkey v2 GUI Documentation](https://www.autohotkey.com/docs/v2/lib/Gui.htm) -- [AHK_v2/README.md](../README.md) - Parent directory documentation +- [ahk/README.md](../README.md) - Parent directory documentation - [CLAUDE.md](../../CLAUDE.md) - Developer guide ## Contributing diff --git a/AHK_v2/GUI/WM.ahk b/ahk/GUI/WM.ahk similarity index 100% rename from AHK_v2/GUI/WM.ahk rename to ahk/GUI/WM.ahk diff --git a/AHK_v2/Keys.ahk b/ahk/Keys.ahk similarity index 100% rename from AHK_v2/Keys.ahk rename to ahk/Keys.ahk diff --git a/AHK_v2/Minecraft/MC_AFK.ahk b/ahk/Minecraft/MC_AFK.ahk similarity index 100% rename from AHK_v2/Minecraft/MC_AFK.ahk rename to ahk/Minecraft/MC_AFK.ahk diff --git a/AHK_v2/Minecraft/MC_Bedrock.ahk b/ahk/Minecraft/MC_Bedrock.ahk similarity index 100% rename from AHK_v2/Minecraft/MC_Bedrock.ahk rename to ahk/Minecraft/MC_Bedrock.ahk diff --git a/AHK_v2/Minecraft/README.md b/ahk/Minecraft/README.md similarity index 100% rename from AHK_v2/Minecraft/README.md rename to ahk/Minecraft/README.md diff --git a/AHK_v2/Powerplan.ahk b/ahk/Powerplan.ahk similarity index 100% rename from AHK_v2/Powerplan.ahk rename to ahk/Powerplan.ahk diff --git a/AHK_v2/README.md b/ahk/README.md similarity index 99% rename from AHK_v2/README.md rename to ahk/README.md index 63696c8..fbea0f5 100644 --- a/AHK_v2/README.md +++ b/ahk/README.md @@ -1,11 +1,11 @@ -# AHK_v2 - AutoHotkey v2 Scripts +# ahk - AutoHotkey v2 Scripts This directory contains AutoHotkey v2.0 scripts for gaming automation, window management, and system utilities. All scripts in this directory use the modern v2 syntax and require AutoHotkey v2.0.19+. ## Directory Structure ``` -AHK_v2/ +ahk/ ├── Black_ops_6/ # Call of Duty Black Ops 6 AFK macros ├── Minecraft/ # Minecraft AFK farming scripts ├── GUI/ # GUI launcher applications