View Single Post
Old 19th April 2016, 18:52   #13
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 343
Find the (handle|ClassName|Title) that windows focus is on it

Quote:
Originally Posted by Anders View Post
Stop asking these silly questions, you already have the System plugin code that calls GetForegroundWindow and you cannot change the focus unless your application already has focus.

I found it:
PHP Code:
Sleep 6666
System
::Call user32::GetForegroundWindow()i.r1
System
::Call 'USER32::GetClassName(ir1,t.r2,i ${NSIS_MAX_STRLEN})'
System::Call 'USER32::GetWindowText(ir1,t.r3,i ${NSIS_MAX_STRLEN})'
MessageBox mb_ok "Windows Focus Handle= ($1)$\r$\nWindows Focus Class Name= ($2)$\r$\nWindows Focus Title Name= ($3)" 
Now can:
1-Find Handle programs windows focus on its (Find Handle)
2-Find ClassName programs windows focus on its (Find ClassName)
3-Find Title programs windows focus on its (Find Title)

Thanks Mr Anders
r2du-soft is offline   Reply With Quote