|
|
#1 |
|
Junior Member
Join Date: Jun 2007
Posts: 12
|
Script-Problem: Waiting for Window
Dear Friends,
the following script-part should be responsible for waiting until a window with the caption "xxx" is shown and closes the splashscreen with a call on newadvsplash::stop then. NSIS-CODE: " [...] TheEnd: Call func SectionEnd Function func loop: sleep 10 FindWindow $0 "" "xxx" IsWindow $0 0 loop System::Call 'user32::SetForegroundWindow(i r0)' newadvsplash::stop FunctionEnd " But it doesnt work: The splash is closed before the window is shown. Please help me! Thank you very much With best regards! MfG Inno |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Perhaps it would be better to compare the FindWindow value with 0 with StrCmp instead. Also the Sleep should probably be increased to 500ms at least (otherwise your code is being executed 100 times a second).
Stu |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2007
Posts: 12
|
Well, could you show me how to do that here:
IsWindow $0 0 loop Thank you very much! MfG Inno |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Also, what if the program launch fails? You will have an infinite loop on your hands.
code: Stu |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|