Associate a File type
They can still easily edit it, even if using a non-standard extension...
i do not want to put them in the .txt format because people can easily edit it.
Anyway, a typical registry file looks like:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.ow] @="ObiWanFile" [HKEY_CLASSES_ROOT\ObiWanFile] @="ObiWan Custom Format" [HKEY_CLASSES_ROOT\ObiWanFile\DefaultIcon] @="C:\\Program Files\\ObiWan\\SpecialScript\\SpecialScript.exe,1" [HKEY_CLASSES_ROOT\ObiWanFile\shell\open] @="Open File" [HKEY_CLASSES_ROOT\ObiWanFile\shell\open\command] @=""C:\\Program Files\\ObiWan\\SpecialScript\\SpecialScript.exe" "%1""
I also used the full file's path but i got an error in the conversion saying it could not be found.
Oh i am also having a problem with the #Include command. I assumed, as far as i read and understood, that it would include a specified file's contents in the exact position.
This it did, while still in the .ahk format meaning i was able to edit the external file and the main script would reflect those changes. But after i compiled the script into and .exe, it no longer works. It is as though when it compiled, the external file's contents were loaded into the main script. Is this how it is supposed to work?
Currently AutoHotkey cannot compile a file dynamically, and beside, a compiled script doesn't need the compiler. So at compile time, ahk2exe just gather the included files in a big script.
You cannot run an uncompiled script with just a compiled script, unless packaging AutoHotkey.exe with it (something similar has been already asked recently, except that user wanted to compile sub-script to get them encrypted).
If possible, just use a plain file and read it.
I shown a .reg file, similar to what you get when you export a registry key from regedit.
Sorry but i'm not sure how to use this.
Three ways to use this info:
1) Just create this file (name it ObiWanFile.reg for example); double-clicking on it (or using AHK's Run command) put its content to the registry (with user prompt for acknowledgment);
2) Generate this file with AHK, changing the paths dynamically, etc. Save it to disk and run it as above;
3) Use this file as blueprint for AHK's registry commands. The  parts are the keys, the @ marks the default value for this key.
This is how to register ahk files (open console and type those):
assoc .ahk=AutoHotKey ftype AutoHotKey="c:\program files\AHK\Autohotkey.exe" "%%1"
You can run this from console or you can create batch file in AHK and execute it via RUN command:
PSTR=AutoHotKey PEXT=.ahk PEXE=c:\program files\AutoHotKey\AutoHotkey.exe batch=( assoc %PEXT%=%PSTR% ftype %PSTR%="%PEXE%" "%%1" ) FileAppend %batch%, c:\register.bat RunWait c:\register.bat FileDelete c:\register.bat