DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: IDEA: WhoIsThis Hotkey  (Read 6,128 times)

Kruskal

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 72
IDEA: WhoIsThis Hotkey
« on: June 10, 2007, 04:42 AM »
I'd find it really use for to place the mouse over a window and be told the full path name of the program that this window represents.  I don't know any way to get this information.  I can think of two ways to convey the information back to the user:

1- Pop-up a window with the name.
2- Put the name in the copy buffer.

Or, maybe, the pop-up with an INI option to also place it in the copy buffer.  Or, maybe, have a way for the mouse to tell the pop-up to place its contents in the copy buffer.

Thanks -- Vincent

kimmchii

  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 360
Re: IDEA: WhoIsThis Hotkey
« Reply #1 on: June 10, 2007, 06:07 AM »
i use Process Explorer.

it shows the full path of all the running progs.
If you find a good solution and become attached to it, the solution may become your next problem.
~Robert Anthony

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • Participated in NANY Challenge Twice
    • Coding Snacks
Re: IDEA: WhoIsThis Hotkey
« Reply #2 on: June 10, 2007, 01:42 PM »
:) Try this script!

Save it to the file WinProcPath.ahk, and download and install AutoHotkey.

Code
;WinProcPath.ahk
; Show the filename of the windows below the mouse
;Skrommel @ 2007

#SingleInstance,Force
#NoEnv

Loop
{
  MouseGetPos,x,y,winid,ctrlid
  WinGet,pid,Pid,ahk_id %winid%
  path:=GetModuleFileNameEx(pid)
  ToolTip,%path%
  Sleep,100
}


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 
}
« Last Edit: June 10, 2007, 01:43 PM by skrommel »

Kruskal

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 72
Re: IDEA: WhoIsThis Hotkey
« Reply #3 on: June 10, 2007, 05:36 PM »
:) Try this script!
That works great!  I changed it to be hotkey driven (Ctr-Alt-W) and it is just what I need.

And my FIRST AutoHotkey script (although you did 99% of the coding)!

Thanks -- Vincent

Original address: https://www.donationcoder.com/forum/index.php?topic=8821.0