Jump to content

Attribute positions in Progress commands


Recommended Posts

When comparing ProgressOn and ProgressSet I noticed that the positions for the attributes "maintext" and "subtext" are interchanged:

ProgressOn("title", "maintext" [, "subtext"][, x pos] [, y pos] [, opt])

ProgressSet( percent [, "subtext"] [, "maintext"])

Not quite intuitive IMO. Since in ProgressSet both attributes are optional why not making this

ProgressSet( percent [, "maintext"] [, "subtext"])?

Link to post
Share on other sites

When comparing ProgressOn and ProgressSet I noticed that the positions for the attributes "maintext" and "subtext" are interchanged:

Not quite intuitive IMO. Since in ProgressSet both attributes are optional why not making this

ProgressSet( percent [, "maintext"] [, "subtext"])?

My guess is because it seems much more likely that you are going to change the sub-text than the main text. By reversing the order, you would always have to specify the main text (Even if it didn't change the entire time you used ProgressSet) just to change the sub-text. Functionality over consistency.
Link to post
Share on other sites

My guess is because it seems much more likely that you are going to change the sub-text than the main text.

You think so? I would prefer the main text (see example below). But shouldn't that be left to the scripter himself, in any case?

$a = 0
$range = 200
$step = $range/100
$percentage = 0
$test = "Testrange is " & $a & " to " & $range

ProgressOn("Progress Test", "Processing...   " , $test ,-1,-1, 2) 
For $i = 1 to $range Step 1

;Scripting goes here
Sleep(20)

   If  $i/$step = int($i/$step) Then
       $a = $a + 1
       $percentage = "Processing...   " & $a & "%"
   EndIf
   ProgressSet($a, "", $percentage) 
Next
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...