Humper Posted October 19, 2008 Posted October 19, 2008 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]
martin Posted October 19, 2008 Posted October 19, 2008 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 HumperMaybe #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.
Humper Posted October 19, 2008 Author Posted October 19, 2008 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]
FreeFry Posted October 19, 2008 Posted October 19, 2008 (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 HumperClosing 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 October 19, 2008 by FreeFry
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now