Compile_AHK II - for those who compile!
Other than that it works fine. But since I use a lot of library functions, this is a problem for me.
Obviously it doesn't contain a virus but maybe a virus was written to infect this program?
I just tried to download it again and it looks like the uploaded version has possibly got a virus..
I ran the source and it says it can't write the the compiler folder. It's been made read only.
Hope my pc doesn't f up because of this
Edit: Eek you've shouted at people for bringing this up without searching. But anyway, The compiler that comes with ahk works, it's just this one that my av complains about.
Edit: I've turned my av off, uninstalled ahk, installed it and tried to install this compiler but it still won't work. So it's not my av.
I also notice that only the File Version Number lists when mouse hovers over a compiled file, shouldn't the number be actually a merge of :
%Product Version%.%File Version%
I'm not too up on what sized field the File Version is and it might not be possible anyway, just a thought and possible time saver.
_SET_GUI_VERS() { Global Local aVersion0 If (!VERSION_INFO) { Return } StringSplit, aVersion, FILE_VER, `., %A_Space% Loop, %aVersion0% { GUI_FV%A_Index% := aVersion%A_Index% } StringSplit, aVersion, PRODUCT_VER, `., %A_Space% Loop, %aVersion0% { GUI_PV%A_Index% := aVersion%A_Index% } newver1 .= GUI_FV1 GUI_FV2 GUI_FV3 GUI_FV4 ;mod start newver1++ newver1 := SubStr("0000" . newver1, -3) loop 4 GUI_FV%A_Index%:=SubStr(newver1,A_Index,1) ;mod finish Return }
here was an aditionall question about relative pathes:
<!-- m -->http://www.autohotke... ... 879#181879<!-- m -->
and here is the answer:
could you explain what you want to do exactly?
in the original post were some hints at the end and in the screenshots:
<!-- m -->http://www.autohotke...pic.php?t=14379<!-- m -->
thinks like %A_ScriptDir% could also work *untested*
Got a new Vista laptop for xmas, (all our other Vista's have been molested), so with fresh Vista, default UAC, permissions, etc, I only got this
durring install, I reinstalled using recomended, then all seems well, compiled, ran, no problem. I am not sure what they are talking about but if you need me to test something, I can.
i know this window, about 1/4 or 1/3 of all programs i installed on my vista notebook showed this window after installation. maybe it cause of the return value of the installer, normally it should be zero, dont ask me what the installer of compile_ahk return. you could test it:
start the installer from a command line window and after it finished, you execute: echo %errorlevel%
it should be different from zero, cause vista think something went wrong... but atm: ignore it, i had no case where this dialog pops up and the install fails. when an install fails, the installer itself told me whats wrong. for me this vista dialog is useless crap.
about the virus problem:
Compile_AHK_Setup.exe on <!-- w -->www.virustotal.com<!-- w -->:
like you see, one of the 5 antivirus programs call it a "autohotkey trojan" ... yes of course it is an autohotkey program and autohotkey programs can do everything that you code ... three other antivirus programs call it an autorun virus ... i cant find anything in my autoruns, but ok ... the name tells me that it is a really really bad virus - the "autorun virus" ... ^^ if you compile compile_ahk with the latest version of ahk, everything will be fine. i'm going to work a little bit on it the next 2 or 4 weeks and in this process it will be compiled with the newest autohotkey version. by the way; if you would create an ahk-file with only the work: return - it would be a virus in this cases above.
I should like to know if Compile_AHK handles relative paths for file names, i.e., relative to the script's directory.
Let us say that I have a script called wolf.ahk in this directory.
f:\thePathToGrandmothers\House\
Let us say that I have my icons in a subdirectory of the above, say icons\ (or even in the same directory as the script's).
f:\thePathToGrandmothers\House\icons
If one of my icons is bigEyes.ico, I should like to be able to specify a path relative to the script's, perhaps like this.
icons\bigEyes.ico
If the icon is in the same directory as the script's, then it might be something like this.
bigEyes.ico
I am in an environment where f:\thePathToGrandmothers varies. Does Compile_AHK currently handle relative paths?
/ Louis
"Wonderful" how you said "Vista" and everyone immediately assumed that was the problem. In fact, the problem is this:I have Vista Ultimate 64-bit, and am experiencing an issue with this. It doesn't seem to compile in the functions from my user lib directory which I use. They work in the uncompiled version, and if I compile with the AHK compiler, but I get errors when trying to use any lib function from an exe compiled with this script (because function doesn't exist). Any ideas?
Since Compile_AHK copies Ahk2Exe to some other directory, it can no longer find AutoHotkey.exe. Copying AutoHotkey.exe to the directory above Ahk2Exe would help. If the function library is located in Program Files (rather than My Documents), it must also be copied to Compile_AHK's data directory.The script compiler (ahk2exe) also supports library functions. However, it requires that a copy of AutoHotkey.exe exist in the directory above the compiler directory (which is normally the case). If AutoHotkey.exe is absent, the compiler still works but library functions are not automatically included.
I would like to see a solution that does not require copying these files and does not require write access to the Compiler directory. Unfortunately, it seems necessary to add some new features to Ahk2Exe, such as a /bin option to use a custom AutoHotkeySC.bin file. I might do this myself next time I feel like working with C++... (Ahk2Exe is, of course, open source.)
i understand that the \lib folder has to be next to the used ahk2exe compiler but why do i also need the autohotkey.exe? oO
Alternatively, I suppose you could invoke AutoHotkey and manually add the includes to the script before passing it to the compiler.
RunWait, "%A_AhkPath%" /iLib "%temp_file%" "%script_file%"/iLib "%temp_file%" tells AutoHotkey to write a list of #includes to %temp_file% and immediately exit.
the list is an option, but i dont want to change the user's scripts.
However, I have a small problem that I can really solve...
I have AutoHotKey installed in D:\Programs\Autohotkey
When I fired up your setup file, no files appeared in the D:\Programs\Autohotkey\Compiler folder. Nevertheless, the script seems to work with right-click... Moreover, a search for "AHK Compiler" did not return any results besides the original installation script.
So, my question is, what files should I remove - and where can I find them?
Thanks in advance for your support