| View previous topic :: View next topic |
| Author |
Message |
corrupt
Joined: 29 Dec 2004 Posts: 2381
|
Posted: Sun Sep 16, 2007 5:09 am Post subject: right-click compile - fails but original file gets deleted |
|
|
On the PC I'm currently using I have a few mapped drives that do not connect automatically. I had set ahk2exe to use an icon that resides in one of these locations but had not connected to make the location accessible. When right-clicking to compile I got the following message: | Quote: | ---------------------------
Ahk2Exe Error
---------------------------
Error changing icon: Unable to read icon or icon was of the wrong format.
---------------------------
OK
---------------------------
|
Although the message is to be expected, I was a bit surprised to see that the original .exe was deleted in the process anyway. Shouldn't ahk2exe either produce an exe with the default icon instead or display an error message and leave the original .exe alone? Deleting the original .exe without producing a file to replace it seems like a bug to me... |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2472 Location: Australia, Qld
|
Posted: Sun Sep 16, 2007 6:26 pm Post subject: |
|
|
| I think I've seen that before, when the script fails to compile because of a script error (or maybe it was also icon-not-found?). I guess ahk2exe opens the file for writing (implicitly deleting the existing file) before it knows for sure if it will succeed. Perhaps it should rename the original file first? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10464
|
Posted: Sun Nov 11, 2007 11:13 pm Post subject: |
|
|
| Sorry for the late reply. The compiling process goes through a fairly large number of stages, many of which require that the EXE be open for writing. So retaining the original file would probably require that a backup be made and the original restored at each point of failure (as was suggested). However, since the consequences of deleting the EXE file are seldom of concern, and since I'm not well versed in the ahk2exe code, this modification seems to have a poor benefit/cost and thus a low priority. |
|
| Back to top |
|
 |
|