Use user data directory for logs.
This commit is contained in:
parent
a6928208f6
commit
809d91868a
1 changed files with 16 additions and 1 deletions
17
src/Main.ahk
17
src/Main.ahk
|
@ -32,7 +32,22 @@ SetWinDelay, 10
|
||||||
#WinActivateForce
|
#WinActivateForce
|
||||||
|
|
||||||
; pseudo main function
|
; pseudo main function
|
||||||
Log_init("bugn_log.txt", False)
|
|
||||||
|
|
||||||
|
EnvGet, appDir, APPDATA
|
||||||
|
bugnDir := appDir . "\bug.n"
|
||||||
|
IfNotExist, %bugnDir%
|
||||||
|
FileCreateDir, %bugnDir%
|
||||||
|
FileGetAttrib, attrib, %bugnDir%
|
||||||
|
IfNotInString, attrib, D
|
||||||
|
{
|
||||||
|
MsgBox, The file path '%appDir%' already exists and is not a directory. Aborting.
|
||||||
|
Return
|
||||||
|
}
|
||||||
|
logFile := bugnDir . "\bugn_log.txt"
|
||||||
|
Log_init(logFile, False)
|
||||||
|
|
||||||
|
|
||||||
Log_msg("====== Initializing ======")
|
Log_msg("====== Initializing ======")
|
||||||
If 0 = 1
|
If 0 = 1
|
||||||
Config_filePath = %1%
|
Config_filePath = %1%
|
||||||
|
|
Loading…
Reference in a new issue