Немного проапгрейдил твой метод, может потом кому пригодится:
If MouseDown(2) And context_button<2 And alMouseFree() Then
context_button=context_button+1
If context_button=1 Then
context_x=MouseX()
context_y=MouseY()
EndIf
alOpenContext(contex_menu,0,0,context_x,context_y)
ElseIf Not(MouseDown(2)) Then
context_button=0
EndIf