Sign in to follow this  
Followers 0
Humper

Close a process.

4 posts in this topic

Hello I wonder how I close a process, and not kill it.

ProcessClose, this is the command for killing a process.

I mean like when you press alt+f4/press the X.

Regards Humper


[center][/center]

Share this post


Link to post
Share on other sites



Hello I wonder how I close a process, and not kill it.

ProcessClose, this is the command for killing a process.

I mean like when you press alt+f4/press the X.

Regards Humper

Maybe

#include <sendmessage.au3>

$hW = WingetHandle("Tiltle of window to close")
_SEndMessage($hW,$WM_CLOSE)

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Maybe

#include <sendmessage.au3>

$hW = WingetHandle("Tiltle of window to close")
_SEndMessage($hW,$WM_CLOSE)
Thanks but theres 2 of them and their both at tray.

[center][/center]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hello I wonder how I close a process, and not kill it.

ProcessClose, this is the command for killing a process.

I mean like when you press alt+f4/press the X.

Regards Humper

Closing a process(ProcessClose), is the same as 'killing' it. What you're talking about is closing a window, not its parent process.

As martin suggested, you just send a WM_CLOSE message to the window you want to close(though, I'd rather use WinClose because it does the same thing. but with native functions).

If you have several windows matching your title, you can go through them by listing all windows, with WinList.

Edited by FreeFry

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0