OK, I see what you mean now.

Try this ...
Code:
btn1:                   'actionare buton up

if but1=1 and rel2=0  then
         high rel1
                                 
         pause 20
                          
         while but1=1 
         call check
         wend
         pause 20
                                       
         while but1 = 0 AND but2=0      
         call check
                  if rel1=0  then
                  GOTO Btn1PressDone
                  endif
         wend
         LOW rel1

         while but1=1 OR but2=1
         wend
         pause 20     

endif
Btn1PressDone:
And yes, the check: routine seems to work "only after 5 times".