View Full Version : shut down process in task manager?
thesven
08-20-2003, 09:49 AM
scenario:
an external app is called and launched (all runs well)
the user then closes the application but the "process" remains running in task manager.
if the user launches the app again this causes a problem
is there a way to close/kill a process running in task manager from within AMS?
Find the Window using Window.Find to get the handle of the application. Then use Window.Close to close the appllication.
Here's a thread that uses the actions that you'll need to get the handle of the app. In this case it minimizes the app, but you could close it instead.
Go to Thread (http://www.indigorose.com/ubbthreads/showflat.php?Cat=&Board=UBB2&Number=23374&page=1&v iew=collapsed&sb=5&o=0&fpart=all&vc=1)
thesven
08-20-2003, 11:17 AM
there is no window as the application is actually a process that has to be killed, no window is running, only a process
thanks
You can still probably find the process using Window.GetTitles. Even though a process is not visible, it still has a name.
Try this:
<IR_ACTIONS_LIST>
<Action name="Get Titles">
<Type>129</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%WndTitles%</Variable>
<VariableDelimiter>;;</VariableDelimiter>
</Action>
<Action name="Message Box">
<Type>5</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<DialogTitle>Title</DialogTitle>
<DialogMessage>%WndTitles%</DialogMessage>
<Icon>3</Icon>
<Variable>%Result%</Variable>
<DialogType>0</DialogType>
<DefaultButton>0</DefaultButton>
</Action>
</IR_ACTIONS_LIST>
Look through the list, and see if your process is there, then use the name to close.
It's worth a shot anyway.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.