View Single Post
Old 20th November 2007, 12:05   #13
mazdakam
Junior Member
 
mazdakam's Avatar
 
Join Date: Nov 2007
Posts: 35
Thumbs down

Offf I get tired of recoding to find solution
please some one take a look of this and tell me why it dowse not work correct

PHP Code:
Function closeWFP

nok
:
${If} 
$R1 <= 10
    Iswindow 
$0 0 ok
    FindWindow 
$"" "Windows File Protection"
    
System::Call 'user32::PostMessageA(i,i,i,i) i($0,${WM_COMMAND},2,0)'

    
FindWindow $"" "Windows File Protection"
    
System::Call 'user32::PostMessageA(i,i,i,i) i($1,${WM_COMMAND},6,0)'
    
    
MessageBox MB_OK "found a window"
    
goto Break
    
    
ok:
    
Sleep 1000
    IntOp $R1 $R1 
1
    
goto nok
${Else}
 goto Break
${EndIf}

Break:

FunctionEnd 
or tell me how can i break the loop after window find and closed
PHP Code:
Function closeWFP

${For} $R1 1 10

 
;Find and close first dialog
     FindWindow 
$"" "Windows File Protection"
    
System::Call 'user32::PostMessageA(i,i,i,i) i($0,${WM_COMMAND},2,0)'

;Find and close second dialog
    FindWindow 
$"" "Windows File Protection"
    
System::Call 'user32::PostMessageA(i,i,i,i) i($1,${WM_COMMAND},6,0)'

Sleep 1000
${Next}
FunctionEnd 
mazdakam is offline   Reply With Quote