Project

General

Profile

Actions

Bug #3578

closed

Multi loops causing issues in some cases

Added by westor (GR) over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Scripting
Target version:
Start date:
07/12/2017
Due date:
% Done:

0%

Estimated time:
Operative System:
All
Regression:
No

Description

Hello,

I am trying to execute that code and i saw that the second loop doesn't looping correctly, i can provide an short video of the correct behavour that it should be act.

Example Code:

/pb 10 100 or /pb 90 100

alias pb {
  var %w = @loading
  var %i = 1
  var %l = 500
  if ($window(%w)) { window -c %w }
  window -aCkodpDk1w0 +fedL %w 1 1 %l 50
  drawrect -fr %w 0 0 0 0 %l 50
  while (%i <= %l) {
    drawrect -rnf %w 0 0 0 0 %l 50
    drawrect -frn %w 212 0 -2 0 %i 50
    drawtext -rni %w $rgb(255,255,255) Verdana 20 160 9 Loading... $round($calc(%i / %l * 100),0) $+ %
    drawdot %w
    inc %i
    var %t = 1
    while (%t <= $1) { inc %t } 
  }
  .timer -mo 1 500 window -c %w 
}

Example Video: http://a.pomf.cat/knlqig.mp4

- Thanks!

Actions #1

Updated by Per Amundsen over 7 years ago

  • Status changed from New to Resolved

Loops are working fine, but the picture window was painted asynchronous, so you don't see the updates until the end, I have fixed that for next beta.

Actions #2

Updated by Per Amundsen over 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF