Forum Discussion
Oferv
14 years agoSuper Contributor
Hi Hellen,Robert,
sorry but i'm still experiencing the same issue.
the application is closing but he process is still running in the task manager and Tc is unable to close or terminate it
here is the function i'm using to exit the application
function Exit()
{
Log["AppendFolder"]("Start exit")
// Obtains the App.exe process
var Process = Sys["Process"]("App");
//Moves the mouse cursor to the menu item specified and then simulates a single click.
Aliases["App"]["HwndSource_MainWindow"]["MainWindow"]["Grid"]["TabControl"]["Grid"]["DockPanel"]["Menu"]["WPFMenu"]["Click"]("File|Exit")
Delay(20000,"Give some time for the App.exe process to close")
// Kill the process if didn't close by using File-->Exit
if (Process["Exists"])
{
Log["Warning"]("App process is still running.It will be force to close now")
//Close App process
Process["Close"]();
//If process still running
if (Process["Exists"])
{
Log["Warning"]("App process is still running.It will be terminate now")
Process["Terminate"]();
}
}
else
Log["Message"]("App exit properly")
Log["PopLogFolder"]()
}
what else can i do?
thanks
sorry but i'm still experiencing the same issue.
the application is closing but he process is still running in the task manager and Tc is unable to close or terminate it
here is the function i'm using to exit the application
function Exit()
{
Log["AppendFolder"]("Start exit")
// Obtains the App.exe process
var Process = Sys["Process"]("App");
//Moves the mouse cursor to the menu item specified and then simulates a single click.
Aliases["App"]["HwndSource_MainWindow"]["MainWindow"]["Grid"]["TabControl"]["Grid"]["DockPanel"]["Menu"]["WPFMenu"]["Click"]("File|Exit")
Delay(20000,"Give some time for the App.exe process to close")
// Kill the process if didn't close by using File-->Exit
if (Process["Exists"])
{
Log["Warning"]("App process is still running.It will be force to close now")
//Close App process
Process["Close"]();
//If process still running
if (Process["Exists"])
{
Log["Warning"]("App process is still running.It will be terminate now")
Process["Terminate"]();
}
}
else
Log["Message"]("App exit properly")
Log["PopLogFolder"]()
}
what else can i do?
thanks