This way if the name of the main script or exe is changed a corresponding ini file can be created/used, avoiding errors.
Just in case anybody is wondering why I am posting small trivialities like this, it's that I am in the process of writing a minimalist shell based on AHK
and these are functions used in it and I thought they might come in handy by others.
I'll be posting more stuff in the next few days just do a search for Tasman (runbox replacement, volume replacement etc., things normally handled by explorer)
dbase := getscriptname() ; get the base name of this program without the extension ini = %A_ScriptDir%\%dbase%.ini ; and create the name of, for instance an ini file to use with this script. MsgBox, %ini% getscriptname(){ dbase = %A_ScriptName% Length := StrLen(A_ScriptName)-4 StringLeft, dbase, A_ScriptName, Length return %dbase% }
I have a working version of the shell running on my own computer but its not ready for the primelight yet. You need to be carefull with shells, if you mess up you might not be able to get windows running again.
A lot of testing remains before I post all of it.