Open griffithska opened 3 months ago
Thanks for reporting it.
I never thought about #Include scenarios.
I'm not in a place, physically or mentally, to write code or fix anything right now.
If I get better, I'll fix it.
Thank you for the response. Sorry to hear and I hope things improve for you.
I downloaded the latest definition_updater.v2.ahk script and added an #Include in my main.ahk script. When it ran to update itself it overwrote my main.ahk script with itself. I reverted the changes and ran it again and found that in the dialog box it was was asking to overwrite main.ahk again.
It appears that if the script is run using an #Include from another script the A_ScriptFullPath is that parent script, not the actual updater script. I did some experimenting and found that replacing A_ScriptFullPath with A_LineFile seems to produce the correct file path regardless of if it is running independently or via an #Include.
At Line 114: file_path := A_LineFile ;A_ScriptFullPath