This thread is continued at :arrow: http://www.autohotke...pic.php?t=22975THX, ladiko and good luck!Update on 2007-06-24:
Removed buggy version check for /NoDecompile
Update on 2007-03-24:
Support for AHK's 1.0.46.10 new compiler parameter /NoDecompileUpdate on 2007-02-17:
Fixed bug on paths containing spacesThis thread was originally posted in the German Forum at
http://de.autohotkey...topic.php?t=771.
AGU was so kind to translate it, so it can be posted in the mother of forums now:
When I started to use AHK and AU3 I chose AU3 as my primary scripting language because I liked the syntax, the SciTe integration and some additional integrated functions which make your life easier. Then I had an AU3 tool which barely ran on my own Athlon 2600+ but had a response time of several seconds on the Celeron600 PCs at work in my company. So I started the difficult task and ported it to AHK and guess what - it ran like a charm even on those old machines. Since that time I used AU3 very rarely.
My tools/programs are
always distributed as compiled Exe. That's why I always missed the AU3 option '
Compile with Options'. Additionally I recently discovered Thalons
AHK Icon Changer and thought,
if you want to have it, write it on your own. So I asked Thalon for permission to use his code and wrote the
'Compile_AHK' script:
What is it good for?Compile_AHK handles all compiler options and version information within the script's own directory in a file named
Scriptname.ahk.ini. Set once, they will be read out on every run, displayed and can finally be change at wish. After settings are done once all that changes during compiling is the displaying of the GUI and the need to press 'Return' one more time.
What do you need?Download the Compile_AHK_Setup.exe from
http://www.autohotke...e_AHK_Setup.zip. The setup includes Compile_AHK.exe, GoRC.exe and ResHacker.exe. They will be installed into your 'Compiler' subfolder of your Autohotkey installation folder. I chose that way instead of copying the files somewhere else and checking the paths by reading the registry every time of execution. Additionally the action "Compile with Option" can be added to the AHK files context menu for calling Compile_AHK easy. If you want to have a look before, you can find the Compile_AHK_Setup.ahk script at
http://www.autohotke...e_AHK_Setup.ahk.
If you prefer to do it on your own, download the script fom at
http://www.autohotke...Compile_AHK.ahk. After this you need GoRC.exe and the ResHacker.exe from
http://www.autohotke...7121.html#77121. ResHacker.exe can be packed with UPX.exe --best Reshacker.exe if you like. After that you have to compile Compile_AHK.ahk. Copy Compile_AHK.exe, GoRC.exe and ResHacker.exe in your 'Compiler' subfolder of your Autohotkey installation folder.
Finally you may switch the calling of Ahk2Exe from within the editors to Compile_AHK.exe. Please pay attention that only
/in parameter and the full script path will be passed over.
How does it work?At first start and on every version change, the file AutoHotkeySC.bin will be saved within the 'Compiler' subfolder as AutoHotkeySC.bin.org. In order to enter the version information it will be recreated from the backup copy. After compiling it will be restored again.
Compiler options will be passed to Ahk2Exe.exe as commandline parameters if possible. Compression will be achieved by setting the registry value HKCU\Software\AutoHotkey\Ahk2Exe\LastCompression. Because Ahk2Exe automatically uses the LastIcon entry for the icon, it will be deleted before and after calling the GUI.
If "Set Version Info" is selected, the version info values are added temporary to AutoHotkeySC.bin by calling GoRC.exe and ResHacker.exe before compilation.For the Run Before/After calls you may use the placeholders %IF%, %OF%, %OD% and %ON%. Before execution they will be replaced as:
%IF% = script file's full path, %OF% = exe file's full path, %OD% = exe file's directory, %ON% = exe file's name.So give it a try! I hope, you'll like it!
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。