Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

HotkeyCamo [0.65.14b] AutoHotkey Basic Compile Wrapper

  • Please log in to reply
186 replies to this topic
  • Members
  • 97 posts
  • Last active: Jul 31 2015 01:53 PM
  • Joined: 08 Jun 2008
Hotkeycamo : Ahk2Exe wrapper with additional functionality
(Content in this thread stored within ahk.net will not display correctly if that domain is experiencing difficulty)

Posted Image

Download: ahk.net HKC_65.14b.7z
Download: mediafire HKC_65.14b.7z
Recent Update Information

> Fix - Duplicate icons when preserving all resources <
  When adding an icon resource with the same resource index as an icon
  within the interpreter, HkC should have removed all other icons in
  that index before adding your icon, but it did not.

  This bug has only been fixed because I tore out the whole chunk of
  code for handling this and used a temporary fix from a previous
  build of HkC.

  Until further notice
  If the "Keep original resources" option is enabled and you set the
  main application icon or add an icon via resource configuration,
  all other default interpreter icon resources will be removed.
> New - List Import button for each configuration tab <
  The resources, execute, version info and patches interface tabs
  have a button added that invokes an import popup menu.

  This menu allows you to browse or select from a list of templates
  (.hkc files) found in the HKC subdirectory and looks identical to
  the template menu invoked via the input button or the large icon.

  The difference being that files selected via this menu will load
  only the grouped configuration options within that are related
  to the dialog list tab in which the menu is invoked.

  Settings imported this way will be added after any that currently
  exist within the active list, duplicates will still be parsed out.

  Just so that you know this works exactly the same as if you drag
  and drop a config file onto the dialog list field.
> New - Import resource list from interpreter <
  The previously mentioned list import button menu for the resources
  tab has an option to populate the dialog list with entrances that
  are already found within the interpreter. The detection of this file
  is identical to that which happens during the build operation.

  It is still very early days on this and would appreciate any ideas
  users might have regarding this functionality.

  It currently does not handle properly:

	Custom resource type entrances as string
	Resource names as string entrances

  Additional information

  It is pointless to allow the modification of the RT_ICON resource
  entrances so they are actively parsed out of the list, only the
  RT_GROUPICON entrances remain.

  It is also fairly useless keeping the generated RT_VERSION entry
  because this should be handled by HkC, although it is not parsed
  out of the list, and keeping it intentionaly prevents HkC adding any
  version information defined via the version info tab/cfg.

  After using this feature you will notice in the list that the file
  fields are not filled for any entrances (obviously).
  Remember that when a file is not defined for a resource instruction
  during build, HkC will attempt to delete that particular resource.
> MISC <
  Incorrect information from the crossover from AutoIt3Camo to
  HotkeyCamo was found in many of the rtf help documents, while very
  minor they could have easily confused a new user.

  The following template examples were wrong due to the @OUT> macro
  being used instead of the @BIN> macro:

  Packing {MPRESS}.hkc
  Packing {UPX}.hkc

  Plus the following Execute tab elements were wrong for the same

  UPX --best
  UPX --compress-icons 0

Older Update Information

> Fix - HkC to Ahk2Exe version information injection bug <
Tried to be cute with this pointless functionality by adding the output executable version information instead of HkC's version.

This was also likely to be the cause of the corrupt/unrecognized first line interpreter error message that occured sometimes. Although steps have also been taken to ensure this particular bug [u]should[/u] not resurface.
> Change - Default setting to delete interpreter resources <
The file USR.pref.def (Created as USR.pref by HkC) is distributed with the option HKC_KOR set to 1 which turns the default behaviour of keep original resources to on (instead of off) for new users.

Existing users simply change the above within USR.pref

Remember these default settings within [i]USR.pref[/i] only occur when opening a config file that does not already have the options that have a value.

> Fix - Corruption when preserving xml manifest <
The cause was a simple Ahk version string patch which has now been removed

> Fix - Import old HkC config options (menu item) <
Check for uneccesary dependency resulting in error message.

> New - Packer support method <
For AutoHotkey basic only, a more robust method of using software
  armoring tools on your output exe has been implemented through
  the execute 'Run' config parameter by using the 'During Build'

  This is an extension of the old method HkC used to use by patching
  the default upx string within the compiler, which was at best very

  This time the compiler executes HotkeyCamo and not the packer direct
  So we gain the following benefits:

  A) More than one program can be executed 'During Build'
  B) The commandline length is not restricted to the upx string length
  C) Entrances identical to normal execution which provides a bit more
     control over the program such as:

	* visibility
	* Explicit program path
	* working directory

  Things to note from this method:

  A) During build execution heritage
				     Desired Program.exe

  Look at either of the following to get a greater understanding:

  A) The packer menu elements in the Execute tab.
  B) The packing example templates from the menu invoked by clicking
     on the 'Input' button in the main tab or the large interface icon

> Fix - Resource handling for Ansi bin files <
Something that has always bothered me concerning resource string
  types and or string id's was the loss of the last character in
  the string thanks to the Ansi resource update api.
> New - Ansi or Unicode bin file resource handling <
The build config option HKC_BRM can be used with either ANS or UNI
  as a parameter. (Default is Ansi)

> Info - Newer builds of AutoHotkey (L/H/2) <
Entirely untested but such builds that do not use the exearc header
  will probably work just they won't be protected. (don't blame me)

  Other than that all other elements of HotkeyCamo should work with
  them. (Assuming that the Ahk2Exe commandline has not changed)

  Couple of things to note if you are trying to use HkC with them:

  When packing just use 'Post build' as the run parameter.
  Completely ignore 'During build'.

  You will need to specify the names/paths to the compiler and the
  interpreter since they will likely not be named or located the
  same as the Ahk basic files.

> Fixes <
Numerous other little things that caused me to facepalm till I bled :/

  Oh and the examples have been modified to go along with recent fixes,
  check em out if in doubt.

Posted Image

  • Members
  • 1045 posts
  • Last active: Jan 16 2014 01:32 PM
  • Joined: 17 May 2007
Do you know?:
<!-- m -->http://www.autohotke...pic.php?t=22975<!-- m -->
Edit: Downloaded your 7z-program. Without source code I wont trie it..

  • Members
  • 37 posts
  • Last active: Apr 30 2015 08:18 AM
  • Joined: 08 Sep 2008
How does this differ in effectiveness with Compile_AHK II using the NoDecompile option?

  • Members
  • 97 posts
  • Last active: Jul 31 2015 01:53 PM
  • Joined: 08 Jun 2008
@aaffe & truevis
Lol, Does that tool you hold in such regard actually offer any protection against a real decompiler???
(Not the decompiler that ships with Ahk!)

I think not. Nice looking tool though, kudos to its author but you cannot compare his work and mine, they are both too different.

HkC is primarily for protecting against real decompilers, the fact that it allows you to perform the process of the build as well is circumstantial.

No offense but I doubt that you would understand the source, it is awful.
Even if I were dumb enough to break the condition set by Chris the Admin,
about someone making a script cracking utility out of it.

Try it don't try it, What you don't know (understand) can't harm you I guess.
perhaps i am out of line with this statement but if you had just read you would see that there are no comparisons really

  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
Having a source would be much more fun I guess.
For people that are scared of running suspicious tools ==> Sandboxie.

Thx for the app Mobious. Very nice.
Posted Image

  • Members
  • 97 posts
  • Last active: Jul 31 2015 01:53 PM
  • Joined: 08 Jun 2008
Thankyou majkinetor,

good to see the old community members are still active. *Phew*

Unless the Admin or a moderator asks for the source, or say::
"sure dude post it we don't really care".

I like that tool that I was directed to, It looks like the author has really
nailed automating the ahk build procedure.

Currently in HkC beta, if you set the environment variable HKC_TMP = 1
and just execute HkC without a script value, it will fuzz the compiler and the stub,
but it will leave them in the directory.

These modified build components could surely be used in the Compile_AHK II build procedure could they not?


  • Members
  • 696 posts
  • Last active: May 08 2015 09:51 PM
  • Joined: 28 Jun 2007

Having a source would be much more fun I guess.


I love to look at code that I initially don't understand, and learn to understand it by reading it.

But I do know that there are people that simply don't want to share their source, and it is understandable.

Great looking utility, and if I ever have need of protecting the source to anything I write, I will give this a shot. Added to the AHK bookmarks list...

  • Members
  • 97 posts
  • Last active: Jul 31 2015 01:53 PM
  • Joined: 08 Jun 2008
Thx Elesar

I am not a closed source person, I personally do not see how the source for
hkc could be used as a script cracking util, other than pointing out to people
things that they can find themselves with their own 2 eyes, oh and maybe
a hex editor and binary comparison utility (or any real decompiler).

As soon as I get the nod I will put the source (which is written in purebasic btw)
into the release as well.

  • Members
  • 97 posts
  • Last active: Jul 31 2015 01:53 PM
  • Joined: 08 Jun 2008
HotkeyCamo 0.6.1 beta is here,

All changes have been documented and amended in first post.

I hope y'all have as much fun using it as I have writing it, I am not
here to replace other types of build solutions that people have written,
merely provide an alternative that offers some things that others do
not. (Protection)

Respect ahk community


  • Guests
  • Last active:
  • Joined: --
Very nice! Thanks Mobius.


  • Members
  • 97 posts
  • Last active: Jul 31 2015 01:53 PM
  • Joined: 08 Jun 2008
Thanks dude much appreciated. :D

a relatively minor update 0.6.2b this time.
HkC online help page

issues addressed and functionality added was a direct result of feedback so many thanks to all concerned.

amendments made to first post.

Posted Image

  • Members
  • 76 posts
  • Last active: Jul 02 2018 05:24 AM
  • Joined: 05 Jan 2007
i am using the HotKeyCamo 0.6.2 beta for Building AHK 2 Exe but when i click on Build Exe i am getting an Error Cant find: :(

Please tell me what is the problem
Posted Image

Posted Image

  • Members
  • 97 posts
  • Last active: Jul 31 2015 01:53 PM
  • Joined: 08 Jun 2008
Yo kaka,

The problem you are showing means that HkC cannot find the files::


If you did not put HkC into your autohotkey compiler directory (recommended) you will need to edit the file MCECS.ahk (the one showed in your picture) and specify alternate paths to these files with the options 'hkc_a2e' and 'hkc_bin' to the config section in that file like so::


This is the entire cfg section of the file MCECS.ahk with the above added
; Remember to set this value to your actual version.
; Here you will need to change these 2 values.
BIO Bitmap=2`1`0`RES\BIO16.bmp
; Edit this if Reshack is not in the directory above HkC!
RH ADD [email protected]>ResHacker.exe`-addoverwrite @BIN>,@BIN>,RES\BOMB.ico,ICONGROUP,160,0`@SD>`0

On a side note I was never happy with 0.6.2, there are a couple of silly bugs in it that have all been eradicated in version 0.7.3 which will be posted later today. 8)

Thanks kaka

Posted Image

  • Members
  • 97 posts
  • Last active: Jul 31 2015 01:53 PM
  • Joined: 08 Jun 2008
Please see first post for links and information

Last update of HotkeyCamo for 2009 had to be a fairly decent one in my opinion, so I went all out for a non beta release in version 0.7.3.


#~ Massive backward compatibility support for older builds of Ahk.

#~ Can now attempt to autodetect build versions.

#~ Improved pathfinding with macros and environment vars being parsed in all option strings

#~ Improved help document (online & chm) And much much more.

If you downloaded 0.6.2 sorry about that *cough*, please consider 0.7.3, you might be pleasantly surprised.


Posted Image

  • Guests
  • Last active:
  • Joined: --

First off, awesome work on this compiler! :)
Will you support "Version Information Change" in future versions?