Support compiled scripts

pull/63/head
Clive Galway 4 years ago
parent 3bc79019c2
commit 8e10292f18

@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]
### Added
- AHI now supports scripts being compiled.
You will still need the DLLs from the Lib folder, but not the AHK scripts
### Changed
### Deprecated
### Removed

@ -6,9 +6,13 @@ class AutoHotInterception {
__New() {
bitness := A_PtrSize == 8 ? "x64" : "x86"
dllName := "interception.dll"
dllFile := A_LineFile "\..\" bitness "\" dllName
if (A_IsCompiled){
dllFile := A_LineFile "\..\Lib\" bitness "\" dllName
} else {
dllFile := A_LineFile "\..\" bitness "\" dllName
}
if (!FileExist(dllFile)) {
MsgBox % "Unable to find lib\" bitness "\" dllName ", exiting...`nYou should extract both x86 and x64 folders from the library folder in interception.zip into AHI's lib folder."
MsgBox % "Unable to find " dllFile ", exiting...`nYou should extract both x86 and x64 folders from the library folder in interception.zip into AHI's lib folder."
ExitApp
}
@ -22,10 +26,14 @@ class AutoHotInterception {
DllCall("FreeLibrary", "Ptr", hModule)
dllName := "AutoHotInterception.dll"
dllFile := A_LineFile "\..\" dllName
hintMessage := "Try right-clicking lib\" dllName ", select Properties, and if there is an 'Unblock' checkbox, tick it`nAlternatively, running Unblocker.ps1 in the lib folder (ideally as admin) can do this for you."
if (A_IsCompiled){
dllFile := A_LineFile "\..\Lib\" dllName
} else {
dllFile := A_LineFile "\..\" dllName
}
hintMessage := "Try right-clicking " dllFile ", select Properties, and if there is an 'Unblock' checkbox, tick it`nAlternatively, running Unblocker.ps1 in the lib folder (ideally as admin) can do this for you."
if (!FileExist(dllFile)) {
MsgBox % "Unable to find lib\" dllName ", exiting..."
MsgBox % "Unable to find " dllFile ", exiting..."
ExitApp
}

Loading…
Cancel
Save