Official AutoHotkey script compiler - written itself in AutoHotkey
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Implement #90 AutoHotkey Version Info removed from compiled .exe Apparently invalid Base files may optionally be used | 4 年前 | |
Update .gitignore | 3 年前 | |
Can compile Ahk2Exe64 as a special case | 1 年前 | |
Take advantage of new directives | 7 年前 | |
Can compile Ahk2Exe64 as a special case | 1 年前 | |
/ScriptGuard - improve security | 5 个月前 | |
Add license | 13 年前 | |
Speed up moving .exe to destination | 1 年前 | |
Fix SetLanguage directive and handle language 0 StringFileInfo language now also updated | 6 个月前 | |
Additions to '/silent' + changed Completion message | 4 年前 | |
Merge-in TAC109's Updates (#56) * Some minor style corrections and cleanup * Add ;@Ahk2Exe directive support, see details: - Syntax: ;@Ahk2Exe-Command args... - Available commands: ;@Ahk2Exe-SetName/Description/Version/Copyright/OrigFilename Changes version information in the compiled script. ;@Ahk2Exe-AddResource [*resType] resFile [, resName] Adds a resource to the compiled script. If resType is omitted, the resource type is auto-detected. If resName is omitted, the filename (no path) of the file converted to uppercase is used. ;@Ahk2Exe-UseResourceLang lang Changes the resource language used by AddResource. - The compiler can be made to remove code from the script, like so: ;@Ahk2Exe-IgnoreBegin MsgBox Code to exclude from the compiled script... ;@Ahk2Exe-IgnoreEnd - The reverse is also possible: /*@Ahk2Exe-Keep MsgBox Code to only execute in the compiled script... */ * Cursor resources are not really supported yet * Remove BM header from bitmap resources in order to make them work * Fix typo in Directive_AddResource() * Allow .exe drag and drop; automatically fill in .exe extension * Do not use LastIcon and LastBinFile if those files do not exist * Add new directives, see details: ;@Ahk2Exe-SetCompanyName txt Obvious ;@Ahk2Exe-SetMainIcon [icoFile] Overrides the exe icon used for compilation. If the icon parameter is not specified, the icon is left as the default AHK icon. ;@Ahk2Exe-PostExec command Executes a command after compilation. ;@Ahk2Exe-UseSeparateTrayIcon Makes the AHK runtime continue to use the separate tray icon resource as in compiled scripts with no custom icon. ;@Ahk2Exe-SetConsoleSubsys Changes the executable subsystem to Console mode. * Take advantage of new directives * Add OutputPreproc directive for outputting the preprocessed script * Fixed UseSeparateTrayIcon which was always enabled * Fix VersionRes.ahk [thanks Lexikos] * Feed the preprocessed script to /iLib * Support adding .manifest resources * Rename ;@Ahk2Exe-SetConsoleSubsys to ;@Ahk2Exe-ConsoleApp * Remove >AHK WITH ICON< and UseSeparateTrayIcon as per v1.1.19.02 * Add support for .ico resource types * Update website * Improve support for built-in vars in #Include * Fix #Include breaking %A_LineFile% Thanks to forum user TAC109 * Fix display of error messages from AutoHotkey.exe * #Include; allow for no space after the optional comma * #Include; allow for no space after the optional comma * Allow comments on compiler directives * Streamlined result code system, added compiler directives error codes * Setup Unicode 32-bit.bin as default when no *.bin in Ahk2Exe folder Allows for case where Ahk2Exe.exe is generated from Ahk2Exe source files. * Update web site address plus compiling instructions * Clarify text * Clarify text * Allow for other ahk file extensions for drag and drop e.g. ah2, ahk2, etc. * Warning if AutoHotkey.exe not located * Show IDC_APPSTARTING cursor when compiling * Temporary workaround for AhkType.ahk bug * Temporary workaround for AhkType.ahk bug * Handle v2 #Include default folder * Allow up to 3 dropped files at once (one of each type) * Fix %A_AhkVersion% and %A_PtrSize% in #Include * Adjust Converter window * Set A_IsUnicode only (AhkType.ahk bug) * Improve Compiler Directives error messages Add Compiler Directives Documentation * Fix issue of leftover .tmp files Fix issue mentioned here: https://www.autohotkey.com/boards/viewtopic.php?p=279985#p279985 * Update ErrorCodes.md * Added 'LegalTrademarks' property * Added UPX .exe compression option plus cleanup a temp file left behind * Check /mpress parameter in bounds (-1,0,1) * Fix misaligned button in UI * special thanks to contributors * Change parameter /mpress to /compress (/mpress is still accepted) * Allow Ahk2Exe.exe to find AutoHotkey.exe if installed Allows Ahk2Exe.exe to work properly even when not in correct 'Compiler' folder. * Can deref Compiler Directives, with sub-setting Also RT_HTML files * Improve sub-setting; add hyperlinks to documentation * Implement "RequireAdmin" * Fix incorrect check for 'resource file exists' * Clarify documentation * Implement the 'Let' directive * Clarify 'Let' description; fix code * 'Let' code simplification * Fix typos * Add 'Set' directive; remove SubStr sub-setting * Allow update of certain manifest fields * Implement 'A_PriorLine' & 'Debug' directive * Update and alphabetize directives documentation * Fix possible overwriting of memory * Simplify code * Implement 'Language' property * Adjust documentation * Make 'Set FileVersion' act like 'SetVersion'; Add built-in variables A_AhkVersion, A_PtrType to documentation * Implement 'Save script settings as' * Fix 'set file/product version' * Implement 'Obey' * 'Obey' documentation * 'Obey' - fail gracefully if no AutoHotkey.exe * Tidy up 'Obey' * Implement 'Bin' and 'ExeName' directives * Clarify some 'Bin' error messages * Tidy up code * Add 'Bin' to Ahk2Exe directives -2 & this commit: handle unload/reload for generated .exe * Changed 'Obey' internals to use work files Added 'SetFileVersion', 'SetInternalName', 'SetProductName', and 'SetProductVersion' directives * Implement 'Obey' 'extra' parameter; Tidy code; Fix loop if .exe path invalid * Implement 'Cont' directive. Add 'exe_path\name parameter to 'Bin' directive Set encoding on all .ahk files to UTF8 with BOM * Tidy-up code * General tidying up + miscellaneous changes 'UpdateManifest' now requires first parameter. Gui:- Allow D&D of custom *.bin file, & warn if UPX/MPRESS.exe missing when updating checkbox. * Clarified the 'Cont' directive description * Clarify 'Bin' directive documentation * Fix bug when AutoHotkey.exe path contains spaces Fix: concurrent compiles should work better now * Implement /ahk parameter for CLI * Let & Obey directive 'name's can have leading U_ * Comment out 'Bin' Directive for official release script. | 6 年前 | |
Update README.md | 2 年前 | |
Correct version embedded in script | 2 年前 | |
Improve Update progress messages | 1 年前 | |
higher res logo.png (#92) | 3 年前 |
以下内容由 AI 翻译,如有问题请 点此提交 issue 反馈
Ahk2Exe
Ahk2Exe 是官方的 AutoHotkey 脚本到 EXE 文件转换器,它自身是用 AutoHotkey v1.1 编写的。它可以将 v1.1 和 v2 及以上版本的脚本编译成可执行文件。
如何编译 Ahk2Exe
由于 Ahk2Exe 使用了编译器指令,因此必须使用自身来编译。
编译时还需要从最新的 AutoHotkey v1.1 自包含二进制文件(如已安装的 AutoHotkey 版本)中使用文件。
解压所有源文件后,运行 Ahk2Exe.ahk,并将其拖放到转换器窗口上。
嵌入的 'Base' 编译指令会使用安装的 AutoHotkey(见上文)中的合适 Base 文件。或者,可以选择一个合适的 v1.1 32位 Unicode Base 文件来使用。
点击 '转换' 按钮。
生成的 Ahk2Exe.exe 文件应复制到包含 AutoHotkey.exe 的文件夹的 Compiler 子文件夹中以确保正常运行。
待办事项
- 处理同行 If* 命令中的 FileInstall。