omarello: Autohotkey.exe does not contain any user-defined scripts itself. The Autohotkey exe is the thing that runs the scripts that you create. Think of it like a .bmp file is 'associated' to 'Paint' for example - if you open "mspaint.exe" you just get a program used to create pictures, however if you double-click on a .bmp file, it opens
with mspaint.exe and you see the actual picture you created. Think of the script kind of like this bmp file - opening the script (ahk file) will run it, but just opening the exe will not run any scripts (unless it is a user-ceated compiled script, but I will cover this in a minute, or there is a default script in one of the below locations).
So, when you first open Autohotkey.exe, it is no use without a script to run, so it prompts you asking if you want to create the default 'example' script, which if you click Yes, it creates a script file called Autohotkey.ahk in your My Documents folder (with the most recent version of AHK).
Now - you don't have to use that script - you could create a new text file called abc.ahk on your Desktop for example, and double click it - this will run the script using Autohotkey.exe, but
the abc.ahk file is not in any way part of the Autohotkey.exe file, it is like 'opening the script with the exe'.
The other option you have is to right-click on a script (a .ahk file) and choose "Compile Script" (this is the same as opening the "Convert .ahk to .exe" (AHK2EXE) program and filling in the fields with default values). What this does is create a COMPLETELY NEW exe file, which contains your script and some other stuff to allow it to run as a stand-alone file (i.e. you can then take that .exe file and put it on another computer that doesn't have AHK installed, and it will work).
When you say that you "compiled all my shortcuts into the original AutoHotkey.exe" - this is not possible to do. You could have created a NEW exe that you decided to call AutoHotkey.exe (or this will be the default name of the exe if you decided to compile the 'example' script called Autohotkey.ahk). The important thing is that
the raw .ahk (script) file that is used to create the new exe is NOT deleted as part of this process. So... what we are saying is that you should have the source script that contains all your shortcuts somewhere, unless you have manually deleted it (maybe try checking in your Recycle bin if you think this is possible?).
The 235KB file you have called Autohotkey.exe is probably the exe that comes with AHK (this is the script interpreter, as far as I am aware), and this will
not contain your shortcuts inside it.
When you said "yesterday I saved the script inadvertently with an unrecognized action at a certain line", then why don't you just open the script again and change the script, instead of trying to run it? If you can't find the script file, maybe try opening the text editor that you were editing it with (notepad maybe?) and go to the File menu - usually there is a list of most recently opened files in there, one of these may be your script. You can't have been exiting an exe directly, so you must have had the actual raw script that you were editing somewhere.
Just saving the script will not automatically compile it, so as I said, your script with the mistake in it should be around on your machine, and this is what you need to edit,
not an .exe file.
Also, as per the below post, check these locations:
My Documents -> AutoHotkey.ahk
My Documents -> AutoHotkey.ini
C:\Program Files\AutoHotkey\AutoHotkey.ahk
C:\Program Files\AutoHotkey\AutoHotkey.ini
You may have an older version of autohotkey that creates .ini files, or creates them in a different place than the most recent version does.
If when you start authohotkey, one of the above scripts exists, it will run that script by default, so
check the above locations for those files, open them with notepad (or another text editor) and you will probably find one of them is your script.
Good luck!
