Sign in to follow this  
Followers 0
DaLiMan

Progress Meter

3 posts in this topic

I want to make a progress meter wich shows how far I am in my loop.

I thought of something like below, but this isn't working.

Does anyone have a good idea?

If _FileReadToArray("C:\Documents and Settings\Default User\Local Settings\Temp\ArtNR1.txt", $AARRAY) Then
ProgressOn("Progress Meter", "Starting step 1 of 3", "0 percent",0,0)
 MsgBox(0, "Array Output records", $AARRAY[0])
  Run("Notepad.exe", "", @SW_MAXIMIZE)
   For $X = 1 To $AARRAY[0]
    ProgressSet( $AARRAY[$X], "Progess ...")
    WinActivate("Untitled - Notepad", "")
    Sleep(750)
    Send($AARRAY[$X] & "{ENTER}")
     

Next

It shows the meter, but it stays blank.

Share this post


Link to post
Share on other sites



Look and learn:

If _FileReadToArray("C:\Documents and Settings\Default User\Local Settings\Temp\ArtNR1.txt", $AARRAY) Then
ProgressOn("Progress Meter", "Starting step 1 of 3", "0 percent",0,0)
MsgBox(0, "Array Output records", $AARRAY[0])
 Run("Notepad.exe", "", @SW_MAXIMIZE)
  For $X = 1 To $AARRAY[0]
   $Percent = ($X / $AARRAY[0]) * 100
   ProgressSet($Percent, $AARRAY[$X], "Progress ...")
   WinActivate("Untitled - Notepad", "")
   Sleep(750)
   Send($AARRAY[$X] & "{ENTER}")
    
Next

Share this post


Link to post
Share on other sites

Look and learn:

OK, I had to calculate the % first.

Thanks for showing! :iamstupid:

Share this post


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
Sign in to follow this  
Followers 0