 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
majkinetor
Joined: 24 May 2006 Posts: 3589 Location: Belgrade
|
Posted: Thu Jan 03, 2008 11:04 pm Post subject: |
|
|
You can get the pointer to your own window procedure already, with GetWindowLong. Then you can subclass the window to monitor its messages.
When third party processes are in question, you can't do this from AHK as dll is mandatory. _________________
 |
|
| Back to top |
|
 |
Mustang
Joined: 17 May 2007 Posts: 359 Location: England
|
Posted: Fri Jan 04, 2008 2:27 am Post subject: |
|
|
I guess keyboard and mouse event dont require a dll hook because they are not process specific?
What I was actually trying to do was capture WM_CREATE message from all processes on my system
I also guess that the GetModuleHandle was returning a handle to AHK?
So I was only hooking my AHK process rather than all system processes?
Please let me know if the above statements are anywhere along the right lines
So if I do require a dll to hook all processes has there been any progress with regards this lately?
i.e. Successfully hooking them all without crashing
Or is there another way I might monitor system wide messages? |
|
| Back to top |
|
 |
ABCza Guest
|
Posted: Sat Jan 12, 2008 4:20 am Post subject: |
|
|
| Any suggestion to hook the "Process Start" operation for determinate process and catch the command line? |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3589 Location: Belgrade
|
Posted: Sat Jan 12, 2008 12:49 pm Post subject: |
|
|
| Quote: | | What I was actually trying to do was capture WM_CREATE message from all processes on my system |
a-a
| Quote: | | So I was only hooking my AHK process rather than all system processes? |
aha
| Quote: | | So if I do require a dll to hook all processes has there been any progress with regards this lately? |
The only way to do it is to do the same as JGR, but using SetWIndowsHookEx. But, I wouldn't dare go into that direction....
| Quote: | | Or is there another way I might monitor system wide messages? |
a-a
Eventualy, you could make a dll using AHK dotNet dynamicaly.... _________________
 |
|
| Back to top |
|
 |
steliyan
Joined: 20 Apr 2007 Posts: 26
|
Posted: Mon May 12, 2008 9:14 am Post subject: |
|
|
| Is it possible to hook the change of program's title bar? |
|
| Back to top |
|
 |
majkinetor! Guest
|
Posted: Mon May 12, 2008 11:29 am Post subject: |
|
|
| no |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2472 Location: Australia, Qld
|
Posted: Mon May 12, 2008 12:18 pm Post subject: |
|
|
Yes it is.
| Code: | #Persistent
; EVENT_OBJECT_NAMECHANGE = 0x800C
; WINEVENT_OUTOFCONTEXT = 0x0000
DllCall("SetWinEventHook", "uint", 0x800C, "uint", 0x800C
, "uint", 0, "uint", RegisterCallback("ObjectNameChange")
, "uint", 0, "uint", 0, "uint", 0)
ObjectNameChange(hWinEventHook, event, hwnd, idObject, idChild, thread, time)
{
; If the object is a window (OBJID_WINDOW),
if (idObject = 0)
; is not hidden,
&& WinExist("ahk_id " hwnd)
; and is not a child window,
&& DllCall("GetAncestor","uint",hwnd,"uint",1) = DllCall("GetDesktopWindow")
{ ; tooltip its new title.
WinGetTitle, title, ahk_id %hwnd%
ToolTip % hwnd " : " title
}
} |
|
|
| Back to top |
|
 |
Guest
|
Posted: Wed May 14, 2008 12:05 am Post subject: |
|
|
| Lexikos wrote: | Yes it is.
| Code: | #Persistent
; EVENT_OBJECT_NAMECHANGE = 0x800C
; WINEVENT_OUTOFCONTEXT = 0x0000
DllCall("SetWinEventHook", "uint", 0x800C, "uint", 0x800C
, "uint", 0, "uint", RegisterCallback("ObjectNameChange")
, "uint", 0, "uint", 0, "uint", 0)
ObjectNameChange(hWinEventHook, event, hwnd, idObject, idChild, thread, time)
{
; If the object is a window (OBJID_WINDOW),
if (idObject = 0)
; is not hidden,
&& WinExist("ahk_id " hwnd)
; and is not a child window,
&& DllCall("GetAncestor","uint",hwnd,"uint",1) = DllCall("GetDesktopWindow")
{ ; tooltip its new title.
WinGetTitle, title, ahk_id %hwnd%
ToolTip % hwnd " : " title
}
} |
| wokin? |
|
| Back to top |
|
 |
n-l-i-d Guest
|
|
| Back to top |
|
 |
Micahs
Joined: 01 Dec 2006 Posts: 328
|
Posted: Wed May 14, 2008 1:09 pm Post subject: |
|
|
I laughed so hard I snorted! _________________
 |
|
| Back to top |
|
 |
majkinetor! Guest
|
Posted: Wed May 14, 2008 4:08 pm Post subject: |
|
|
I guess I missed that one.... |
|
| Back to top |
|
 |
nonov Guest
|
Posted: Sat May 31, 2008 11:47 am Post subject: |
|
|
can i hook sysmenu(alt+space) by this method?
i'm trying to make exactly same as Powermenu doing.
i've searched google day by day. what i found was i need a dll that does global hook for me.
the Powermenu has also a Powermenuhook.dll that i don't know exactly that how it is working.
can anyone please tell me if i'm on right way? |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|