You, Skrommel, were kind enough to write a AHK program for me to provide a hotkey to display a little window showing what program owns the window under the cursor. When pushed a second time, the little window goes away. I use it all the time. (Program at end).
I tried to modify it to be a simple program, rather than a hotkey by removing this line:
!^w::
It sort of works, but the feature of the second call clearing the little window is gone. I don't know the AHK script language at all. Any idea what I did wrong.
Thanks -- Vincent
PS I wonder why you haven't made this one of your publicly available (or did I miss it). I find it invaluable.
Edit by Skwire: Added code tags.
I tried to modify it to be a simple program, rather than a hotkey by removing this line:
!^w::
It sort of works, but the feature of the second call clearing the little window is gone. I don't know the AHK script language at all. Any idea what I did wrong.
Thanks -- Vincent
PS I wonder why you haven't made this one of your publicly available (or did I miss it). I find it invaluable.
Code: (autoit)
;AutoHotkeys.ahk
;Vincent Kruskal's Hotkeys
;Skrommel @ 2007
;Kruskal @ 2007
#SingleInstance,Force
#NoEnv
!^w::
If ToolTipFlag=
{
MouseGetPos,x,y,winid,ctrlid
WinGet,pid,Pid,ahk_id %winid%
path:=GetModuleFileNameEx(pid)
ToolTip,%path%
ToolTipFlag = 1
}
Else
{
ToolTip,
ToolTipFlag =
}
Return
#q::
SoundPlay,C:\Documents and Settings\Administrator\My Documents\My Sound Effects\silence.wav
Return
GetModuleFileNameEx(p_pid) ;by shimanov at www.autohotkey
{
If A_OSVersion in WIN_95,WIN_98,WIN_ME
{
WinGet,name,ProcessName,ahk_id %p_pid%
Return,name
}
h_process:=DllCall("OpenProcess","uint",0x10|0x400,"int",false,"uint",p_pid) ; PROCESS_VM_READ=0x0010 PROCESS_QUERY_INFORMATION=0x0400
If (ErrorLevel or h_process=0)
Return
name_size=255
VarSetCapacity(name,name_size)
result:=DllCall("psapi.dll\GetModuleFileNameExA","uint",h_process,"uint",0,"str",name,"uint",name_size)
DllCall("CloseHandle",h_process)
Return,name
}Edit by Skwire: Added code tags.










defined in the script which made the script never exit/end.