x check for existence of INI-file to parse before doing anything
x OnExit-removal and missing ExitApp x changed Progress-title for appStop
This commit is contained in:
parent
376dc75b2d
commit
cb21cfa589
@ -30,3 +30,4 @@ Loop %0%
|
|||||||
}
|
}
|
||||||
OnExit ASOnExit
|
OnExit ASOnExit
|
||||||
RunWait %cmdl%
|
RunWait %cmdl%
|
||||||
|
OnExit
|
||||||
|
@ -6,7 +6,7 @@ If (StrLen(RunBeforeStop) > 0)
|
|||||||
StepsStep := 100/StepsAll
|
StepsStep := 100/StepsAll
|
||||||
StepsPos = 0
|
StepsPos = 0
|
||||||
|
|
||||||
Progress b2 x%PL% y%PT% w%PW% m FM%PFM% FS%PFS%, U3Helper %U3HVer% - (c)2006-2007 Markus Birth <mbirth@webwriters.de>, Cleaning up %AppName% ..., AHKProgress-%AppName%
|
Progress b2 x%PL% y%PT% w%PW% m FM%PFM% FS%PFS%, U3Helper %U3HVer% - (c)2006-2007 Markus Birth <mbirth@webwriters.de>, Stopping %AppName% ..., AHKProgress-%AppName%
|
||||||
WinSet Transparent, %PTrans%, AHKProgress-%AppName%
|
WinSet Transparent, %PTrans%, AHKProgress-%AppName%
|
||||||
|
|
||||||
If (StrLen(RunBeforeStop) > 0)
|
If (StrLen(RunBeforeStop) > 0)
|
||||||
@ -41,3 +41,4 @@ Goto TryClose
|
|||||||
|
|
||||||
CloseDone:
|
CloseDone:
|
||||||
Progress 100, appStop done.
|
Progress 100, appStop done.
|
||||||
|
ExitApp
|
||||||
|
@ -162,27 +162,30 @@ Else
|
|||||||
{
|
{
|
||||||
Progress % StepsPos*StepsStep+StepsStep*(A_Index-1)/datini0, Translating paths in file %CurFile% ...
|
Progress % StepsPos*StepsStep+StepsStep*(A_Index-1)/datini0, Translating paths in file %CurFile% ...
|
||||||
CurFile := datini%A_Index%
|
CurFile := datini%A_Index%
|
||||||
TmpFile := "$$$" . CurFile
|
IfExist %U3_APP_DATA_PATH%\%CurFile%
|
||||||
FileMove %U3_APP_DATA_PATH%\%CurFile%, %U3_APP_DATA_PATH%\%TmpFile%, 1
|
|
||||||
Progress % StepsPos*StepsStep+StepsStep*(A_Index-0.5)/datini0, Translating paths in file %CurFile% ...
|
|
||||||
Loop Read, %U3_APP_DATA_PATH%\%TmpFile%, %U3_APP_DATA_PATH%\%CurFile%
|
|
||||||
{
|
{
|
||||||
IfNotInString A_LoopReadLine, =
|
TmpFile := "$$$" . CurFile
|
||||||
|
FileMove %U3_APP_DATA_PATH%\%CurFile%, %U3_APP_DATA_PATH%\%TmpFile%, 1
|
||||||
|
Progress % StepsPos*StepsStep+StepsStep*(A_Index-0.5)/datini0, Translating paths in file %CurFile% ...
|
||||||
|
Loop Read, %U3_APP_DATA_PATH%\%TmpFile%, %U3_APP_DATA_PATH%\%CurFile%
|
||||||
{
|
{
|
||||||
; no key/value-pair --- skip processing
|
IfNotInString A_LoopReadLine, =
|
||||||
FileAppend %A_LoopReadLine%`n
|
{
|
||||||
Continue
|
; no key/value-pair --- skip processing
|
||||||
|
FileAppend %A_LoopReadLine%`n
|
||||||
|
Continue
|
||||||
|
}
|
||||||
|
IfNotInString A_LoopReadLine, \
|
||||||
|
{
|
||||||
|
; no paths to replace --- skip processing
|
||||||
|
FileAppend %A_LoopReadLine%`n
|
||||||
|
Continue
|
||||||
|
}
|
||||||
|
SplitFirst(IKey, IVal, A_LoopReadLine, "=")
|
||||||
|
FileAppend % IKey . "=" . EnvUnparseStr(IVal) . "`n"
|
||||||
}
|
}
|
||||||
IfNotInString A_LoopReadLine, \
|
FileDelete %U3_APP_DATA_PATH%\%TmpFile%
|
||||||
{
|
|
||||||
; no paths to replace --- skip processing
|
|
||||||
FileAppend %A_LoopReadLine%`n
|
|
||||||
Continue
|
|
||||||
}
|
|
||||||
SplitFirst(IKey, IVal, A_LoopReadLine, "=")
|
|
||||||
FileAppend % IKey . "=" . EnvUnparseStr(IVal) . "`n"
|
|
||||||
}
|
}
|
||||||
FileDelete %U3_APP_DATA_PATH%\%TmpFile%
|
|
||||||
}
|
}
|
||||||
|
|
||||||
If datini0 > 0
|
If datini0 > 0
|
||||||
|
@ -101,27 +101,31 @@ Loop %datini0%
|
|||||||
{
|
{
|
||||||
Progress % StepsPos*StepsStep+StepsStep*(A_Index-1)/datini0, Translating paths in file %CurFile% ...
|
Progress % StepsPos*StepsStep+StepsStep*(A_Index-1)/datini0, Translating paths in file %CurFile% ...
|
||||||
CurFile := datini%A_Index%
|
CurFile := datini%A_Index%
|
||||||
TmpFile := "$$$" . CurFile
|
IfExist %U3_APP_DATA_PATH%\%CurFile%
|
||||||
FileMove %U3_APP_DATA_PATH%\%CurFile%, %U3_APP_DATA_PATH%\%TmpFile%, 1
|
|
||||||
Progress % StepsPos*StepsStep+StepsStep*(A_Index-0.5)/datini0, Translating paths in file %CurFile% ...
|
|
||||||
Loop Read, %U3_APP_DATA_PATH%\%TmpFile%, %U3_APP_DATA_PATH%\%CurFile%
|
|
||||||
{
|
{
|
||||||
IfNotInString A_LoopReadLine, =
|
TmpFile := "$$$" . CurFile
|
||||||
|
FileMove %U3_APP_DATA_PATH%\%CurFile%, %U3_APP_DATA_PATH%\%TmpFile%, 1
|
||||||
|
Progress % StepsPos*StepsStep+StepsStep*(A_Index-0.5)/datini0, Translating paths in file %CurFile% ...
|
||||||
|
Loop Read, %U3_APP_DATA_PATH%\%TmpFile%, %U3_APP_DATA_PATH%\%CurFile%
|
||||||
{
|
{
|
||||||
; no key/value-pair --- skip processing
|
IfNotInString A_LoopReadLine, =
|
||||||
|
{
|
||||||
|
; no key/value-pair --- skip processing
|
||||||
FileAppend %A_LoopReadLine%`n
|
FileAppend %A_LoopReadLine%`n
|
||||||
Continue
|
Continue
|
||||||
}
|
}
|
||||||
IfNotInString A_LoopReadLine, `%
|
IfNotInString A_LoopReadLine, `%
|
||||||
{
|
{
|
||||||
; no envvars to replace --- skip processing
|
; no envvars to replace --- skip processing
|
||||||
FileAppend %A_LoopReadLine%`n
|
FileAppend %A_LoopReadLine%`n
|
||||||
Continue
|
Continue
|
||||||
}
|
}
|
||||||
SplitFirst(IKey, IVal, A_LoopReadLine, "=")
|
SplitFirst(IKey, IVal, A_LoopReadLine, "=")
|
||||||
FileAppend % IKey . "=" . EnvParseStr(IVal) . "`n"
|
FileAppend % IKey . "=" . EnvParseStr(IVal) . "`n"
|
||||||
|
|
||||||
|
}
|
||||||
|
FileDelete %U3_APP_DATA_PATH%\%TmpFile%
|
||||||
}
|
}
|
||||||
FileDelete %U3_APP_DATA_PATH%\%TmpFile%
|
|
||||||
}
|
}
|
||||||
|
|
||||||
If datini0 > 0
|
If datini0 > 0
|
||||||
|
Reference in New Issue
Block a user