ahk2exe command line frontend

Discuss other useful utilities, general computing tips & tricks, Internet resources, etc.
User avatar
krzysiunet
Posts: 6
Joined: 18 Jul 2017, 16:09
Location: Katowice, Poland
Contact:

ahk2exe command line frontend

18 Jul 2017, 16:44

Code:
Instructions:
  1. Download the batch file
  2. Set the path in 11th line for your ahk2exe.exe compiler (only directory)
  3. If you prefer other default binary image, change "/d 1" in 18th line for preferred one
  4. If you prefer to compress file by default (you need to have mpress in ahk2exe directory) change "/d n" to "/d y" in 24th line
Usage:
  1. Drag your AHK script onto downloaded batch. Well, that's all.
  2. Using "Send to" context menu
    1. Press Win+R (or Menu Start>Run), enter shell:sendto
    2. Put the batch file or shortcut to it In the directory which will open after previous step
    3. Now you can right click on the script and choose Send to -> ahk2exeFrontend.bat (or whatever name you'd set for the file)
  3. Command line way - the only parameter is the full name (dir+name) of the script
  4. I'm personally using FIleMenu Tools, but versions up to 7.0.5 were adware (with ways to ommit it) and now here's free variant but without only worth function - custom commands. PM me if you'd like to talk about 7.0.5 version.
Why?
  • Because sometimes I prefer console and this way is quicker for me
  • I wanted to be able to autoset icon for compiled script - if there's icon in the AHK script directory, it will use it (i.e. for foo.ahk put in the same directory foo.ico)
    • If you need some quick/temporary, public domain icon, remember about my tool (only 16x16) - http://mini.krzysiu.net/icon-generator/ - it's in Polish, but it's too obvious to translate it. Only thing you may want to know is "[pobierz]" - it means "download".
PS: If mpress won't be present and you'd choose compression, ahk2exe will compile file anyways, just uncompressed.

It could be written better, but I'm kind of in a hurry and I think such thing is enough for now. Remember it's licensed as MIT - you can use it as you want, but please attribute me as krzysiu.net. If you won't do it, I won't be mad - just please.
Do you think my work is worth donating? I'm trying to keep my tools FLOSS, but donation or your feedback motivates me to do even more! https://www.paypal.com/paypalme/krzysiunet/5EUR
My works, tutorials etc: Krzysiu's random things * Krzysiu Photography * Mini webapps (including icon generator for AHK) * Comic strips (in Polish) * YT channel (both EN and PL) * Public domain cliparts
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: ahk2exe command line frontend

19 Jul 2017, 06:24

Thx for sharing this. Much appreciated :) :thumbsup:


I've always thought if it makes sense to create an IExpress *.sed file creator (the IExpress template configuration file, that is fully INI file compatible).
Having a sed-file you could create a self-extracting setup package via the command line that way:
IExpress /n drive_letter:\directory_name\file_name.SED
IExpress is (still) part of your OS (run/search it via the start menu): https://en.wikipedia.org/wiki/IExpress
Last edited by BoBo on 19 Jul 2017, 13:45, edited 1 time in total.
User avatar
krzysiunet
Posts: 6
Joined: 18 Jul 2017, 16:09
Location: Katowice, Poland
Contact:

Re: ahk2exe command line frontend

19 Jul 2017, 11:56

Thanks!

OMG, I'm working as PC technician for about 15 years and I didn't know about it. Now that's retro! :D

If I understand well, your proposition is to make such creator, right? Maybe add third step, like: "Do you wish to create setup package?"? I'll be busy for a few days, but if you wish, I can make it.

I like batch files a lot, because it's like anti-coding. You don't write code, but you need to use a set of weird tricks etc. to make it work :D Lighter version of brainfuck. That's the example of trickish ways of batch files: https://gist.github.com/Krzysiu/d3dbdb3 ... 7c8e0d89cd (getting result of choice.exe as character, not as errorlevel number).
Do you think my work is worth donating? I'm trying to keep my tools FLOSS, but donation or your feedback motivates me to do even more! https://www.paypal.com/paypalme/krzysiunet/5EUR
My works, tutorials etc: Krzysiu's random things * Krzysiu Photography * Mini webapps (including icon generator for AHK) * Comic strips (in Polish) * YT channel (both EN and PL) * Public domain cliparts

Return to “Other Utilities & Resources”

Who is online

Users browsing this forum: No registered users and 18 guests