Skip to content

Instantly share code, notes, and snippets.

@Krzysiu
Last active July 18, 2017 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Krzysiu/c4c172a4b8bb8f32f6c4efeec4674da8 to your computer and use it in GitHub Desktop.
Save Krzysiu/c4c172a4b8bb8f32f6c4efeec4674da8 to your computer and use it in GitHub Desktop.
Kind of frontend to AutoHotKey compiler
@echo off
rem Copyright by krzysiu.net, 2017
rem Licensed as MIT (full text: https://opensource.org/licenses/MIT)
setlocal
set binImg1=Unicode 64-bit
set binImg2=Unicode 32-bit
set binImg3=ANSI 32-bit
REM SET YOUR PATH TO COMPILER HERE
cd /d "C:\Program Files\AutoHotkey\Compiler"
echo Please choose binary base:
echo 1) Unicode 64 bit (default in 5 seconds)
echo 2) Unicode 32 bit
echo 3) ANSI 32 bit
echo.
choice /c 123 /t 5 /d 1 /m "Your choice:"
if "%ERRORLEVEL%" == "1" set binImg=%binImg1%
if "%ERRORLEVEL%" == "2" set binImg=%binImg2%
if "%ERRORLEVEL%" == "3" set binImg=%binImg3%
echo.
choice /c yn /t 5 /d n /m "Do you want to compress file using MPRESS? Default in 5 sec.: no."
if "%ERRORLEVEL%" == "1" set doComp=1
if "%ERRORLEVEL%" == "2" set doComp=0
if exist "%~dpn1.ico" set iconParam=/icon "%~dpn1.ico"
echo.
echo Compiling...
ahk2exe /in %1 /out "%~dpn1.exe" %iconParam% /bin "%binImg%.bin" /mpress %doComp%endlocal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment