Suppose we do not know the ClassName or TitleName for the notepad.exe
for now we use from the other apps (for sample autoit) for find the applications ClassName and TitleName...
this code give me ClassName and TitleName but just show class and title the windows focused on that!
Section
Loop:
Sleep 555
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})'
SetDetailsPrint both
DetailPrint "($1)($2)($3)"
SetDetailsPrint none
Goto Loop
SectionEnd
now i try all ways to do it,but i failed
for sample i try this:
System::Call user32::GetForegroundWindow(notepad.exe)i.r1
System::Call 'USER32::GetClassName(ir1,t.r2,i ${NSIS_MAX_STRLEN})'
System::Call 'USER32::GetWindowText(ir1,t.r3,i ${NSIS_MAX_STRLEN})'