Archived
1
0
This repository has been archived on 2025-03-31. You can view files and clone it, but cannot push or open issues or pull requests.
U3Helper/U3H_appStop.ahk
mbirth 9f143344e0 x fixed bug in mb_EnvTools.ahk with not using EnvVars where the name was less than 2 characters (instead of not using EnvVars where the VALUE is less than 2 chars)
+ implemented multi-commands on all 4 events (hostConfigure, appStart, appStop, hostCleanUp)
x hostCleanUp-CopyDataFiles showed ERR instead of SKP
* grouped translation errors instead of displaying one MsgBox per error
+ added trying to delete single registry value if key is not found
2007-05-29 12:16:39 +00:00

47 lines
1.0 KiB
AutoHotkey

ASOnExit:
StepsAll = 1
If runstp0 > 0
StepsAll++
StepsStep := 100/StepsAll
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>, Stopping %AppName% ..., AHKProgress-%AppName%
WinSet Transparent, %PTrans%, AHKProgress-%AppName%
Loop %runstp0%
{
CurCmd := runstp%A_Index%
Progress % StepsPos*StepsStep+StepsStep*(A_Index-1)/runstp0, Running stop command ... %CurCmd%
CurCmd := EnvParseStr(CurCmd)
RunWait %CurCmd%
}
If runstp0 > 0
StepsPos++
SplitPath AppExe, AppFile, null, null, null, null
Counter = 0
CounterMax = 10
TryClose:
Progress % StepsPos*StepsStep+StepsStep*Counter/CounterMax, Stopping %AppName% ...
Process Exist, %AppFile%
If ErrorLevel
ProgPID = %ErrorLevel%
Else
Goto CloseDone
WinClose ahk_pid %ProgPID%, , 0.5
If Counter >= %CounterMax%
{
Progress 100, Killing %AppName% ...
Process Close, %ProgPID%
}
Counter += 1
Goto TryClose
CloseDone:
Progress 100, appStop done.
ExitApp