ok again thank you for letting solve this. it is a real pleasure to get an idea and try to make it work. here is what i did to fix it. if you think you can do better holler at me. lol.

old code:
Code:

 if (!$dialog($1)) return
  var %x = $3, %y = $4, %o = 4
  if ($calc($ticks - $5) > $6) { 
    dialog -s $1 %x %y $7 &8
    return
  }
  elseif ($2 == 0) { inc %x %o | inc %y %o }
  elseif ($2 == 1) { dec %x %o | inc %y %o }
  elseif ($2 == 2) { inc %x %o | dec %y %o }
  elseif ($2 == 3) { dec %x %o | dec %y %o }
  elseif ($2 == 4) { dec %x %o | inc %y %o }
  elseif ($2 == 5) { inc %x %o | dec %y %o }
  $+(.timer.$1.,$1) -m 1 30 dnudge $1 $calc(($2 + 1) % 6) $3-
  dialog -s $1 %x %y $7 $8
}





New code

Code:

 if (!$dialog($1)) return
  var %x = $3, %y = $4, %o = 4
  if ($calc($ticks - $5) > $6) { 
    dialog -s $1 %x %y $7 404
    return
  }
  elseif ($2 == 0) { inc %x %o | inc %y %o }
  elseif ($2 == 1) { dec %x %o | inc %y %o }
  elseif ($2 == 2) { inc %x %o | dec %y %o }
  elseif ($2 == 3) { dec %x %o | dec %y %o }
  elseif ($2 == 4) { dec %x %o | inc %y %o }
  elseif ($2 == 5) { inc %x %o | dec %y %o }
  $+(.timer.$1.,$1) -m 1 30 dnudge $1 $calc(($2 + 1) % 6) $3-
  dialog -s $1 %x %y $7 404
}




the only thing i had to change was $8 which was holding the value of the height of the dialog. When i entered the starting height(404), it worked awesomely. thank you again.

Last edited by kkoser; 12/05/08 05:00 AM.