Problem with executing commands

0

Currently I'm doing some tests with the execution of commands through the mouse and with loops, see below:

if $MouseOnEvent == -1 
  if @teste == 1
    print "test"
    @teste = 0
  end 
end

if $MouseOnEvent != -1
  @teste = 1
  return
end

The condition says that whenever the mouse is outside of that area, it will execute the "print" command. When you exit, it just directs you to make the condition again.

My problem is that when the condition is satisfied, the print command runs several times (about 30) until it stops (this should not happen since the first time it should already change the @test value), I would like to know a possible cause for this.

    
asked by anonymous 27.04.2015 / 00:03

0 answers