Skip to content
⌘ NSIS Forum Archive

how can check process full load OR user interface is open?

8 posts

r2du-soft#

how can check process full load OR user interface is open?

1) when open some apps It takes a little time to load the user interface (gui) _ Like Photoshop..
2) some apps process is load and see user interface. when close user interface,app load in system try but dont see user interface (gui).... _ like internet download manager (idm).

now how can check a process is full load?
or how can check user interface (gui) is load and shown?
Anders#
There is a Windows function called WaitForInputIdle but depending on the app, it might not work correctly if it has a splashscreen etc.
r2du-soft#
not problem,i want test that but i do not know how use from WaitForInputIdle
first i want test that on internet download manager (idm) for example
when IDM open in system tray when use this codes:

FindWindow $0 "" "Internet Download Manager 6.30"
MessageBox MB_OK "$0"
variable $0 value is 66248 and Internet Download Manager found! but user interface is not visible!
i want when user interface is visible and shown message idm user interface Is displayed
i dont how can use WaitForInputIdle for do it work mr Anders
    System::Call 'USER32::WaitForInputIdle(ir1,2000)i'
Anders#
WaitForInputIdle is for application startup. After FindWindow you should probably check if the window is visible.
r2du-soft#
Originally Posted by Anders View Post
WaitForInputIdle is for application startup. After FindWindow you should probably check if the window is visible.
FindWindow $1 "" "Internet Download Manager 6.30"
System::Call 'USER32::WaitForInputIdle(ir1,2000)i.r2'
its true?
Anders#
No, don't use WaitForInputIdle if the application is a tray application. You need to check if the window is visible and/or positioned on screen.
r2du-soft#
thanks Mr Anders


Check IDM User Interface Visible or not Visible:
FindWindow $1 "" "Internet Download Manager 6.30"
${If} $1 S!= "0"
		System::Call "user32::IsWindowVisible(i $1)i.r0"
		${If} $0 S== "1" 
			MessageBox MB_OK "User Interface In Visible(Shown)"
		${Else}
			MessageBox MB_OK "User Interface In Not Visible(Not Shown)"
		${EndIf}
${Else}
		MessageBox MB_OK "Internet Download Manager Not Found,Process Is Not Open."
${EndIf}


Check NOTEPAD User Interface Visible or not Visible:
FindWindow $1 "Notepad" ""
${If} $1 S!= "0"
		System::Call "user32::IsWindowVisible(i $1)i.r0"
		${If} $0 S== "1" 
			MessageBox MB_OK "User Interface In Visible(Shown)"
		${Else}
			MessageBox MB_OK "User Interface In Not Visible(Not Shown)"
		${EndIf}
${Else}
		MessageBox MB_OK "Notepad Not Found,Process Is Not Open."
${EndIf}