{ "version": "2.0.21", "description": "The ultimate automation scripting language for Windows.", "homepage": "https://www.autohotkey.com/", "license": "GPL-2.0-or-later", "notes": [ "Install specific version of Interpreter(Default: Latest 1.x):", " - 'autohotkey /script \"$dir\\UX\\install-version.ahk\" [version]'", "Uninstall Sub-versions of Interpreter:", " - 'autohotkey /script \"$dir\\UX\\ui-uninstall.ahk\"'", "See also: https://github.com/ScoopInstaller/Extras/issues/10066" ], "url": "https://github.com/AutoHotkey/AutoHotkey/releases/download/v2.0.21/AutoHotkey_2.0.21.zip", "hash": "7386f45be928f0825ffbe78811187636d72efcbd264e2fd406e7e045d681a626", "extract_to": "installer", "installer": { "script": [ "$ahk = @('/script', \"`\"$dir\\installer\\UX\\install.ahk`\"\", '/to', \"`\"$dir`\"\", '/user', '/silent')", "if ($global) { $ahk = @('/script', \"`\"$dir\\installer\\UX\\install.ahk`\"\", '/to', \"`\"$dir`\"\", '/silent') }", "Start-Process \"$dir\\installer\\AutoHotkey32.exe\" -ArgumentList $ahk -Wait" ] }, "post_install": [ "Remove-Item \"$dir\\installer\" -Force -Recurse", "# Persistence", "if (Test-Path \"$persist_dir\\installed-files.csv\") {", " Get-Content \"$persist_dir\\installed-files.csv\" | Add-Content \"$dir\\UX\\installed-files.csv\"", " Copy-Item \"$persist_dir\\installed-files\\*\" \"$dir\" -Recurse -ErrorAction SilentlyContinue", " # Remove old files", " Remove-Item \"$persist_dir\\installed-files.csv\" -Force", " Remove-Item \"$persist_dir\\installed-files\" -Force -Recurse", "}" ], "architecture": { "64bit": { "bin": [ [ "UX\\AutohotkeyUX.exe", "autohotkey" ], [ "v2\\AutoHotkey32.exe", "autohotkey32" ] ] }, "32bit": { "bin": [ "UX\\AutohotkeyUX.exe", "autohotkey" ] } }, "pre_uninstall": [ "# Persistence", "ensure \"$persist_dir\" | Out-Null", "ensure \"$persist_dir\\installed-files\" | Out-Null", "$old_version = Select-CurrentVersion -AppName $app -Global:$global", "if (Test-Path \"$dir\\UX\\installed-files.csv\") {", " $csv = Import-Csv \"$dir\\UX\\installed-files.csv\" | Where-Object 'Version' -ne $old_version", " if ($csv) {", " $export = @()", " $dirs = @()", " $csv | ForEach-Object {", " $current = (Get-Item \"$dir\\$($_.'Path')\" -ErrorAction SilentlyContinue).Directory.Name", " $export += \"$($_.'Hash'),$($_.'Version'),$($_.'Path'),$($_.'Description')\"", " if (!($dirs.Contains($current)) -and ($_.'Path' -notlike '*.lnk')) { $dirs += $current }", " }", " $export | Out-File \"$persist_dir\\installed-files.csv\" -Encoding ASCII", " $dirs | ForEach-Object { Copy-Item \"$dir\\$_\" \"$persist_dir\\installed-files\" -Recurse -ErrorAction SilentlyContinue }", " }", "}" ], "uninstaller": { "script": "Start-Process \"$dir\\UX\\AutoHotkeyUX.exe\" -ArgumentList @('/script', \"`\"$dir\\UX\\install.ahk`\"\", '/uninstall', '/silent') -Wait" }, "checkver": { "github": "https://github.com/AutoHotkey/AutoHotkey" }, "autoupdate": { "url": "https://github.com/AutoHotkey/AutoHotkey/releases/download/v$version/AutoHotkey_$version.zip", "hash": { "url": "https://github.com/AutoHotkey/AutoHotkey/releases/tag/v$version", "regex": "$sha256[\\s]+AutoHotkey_$version\\.zip" } } }