DaLiMan Posted July 12, 2004 Share Posted July 12, 2004 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. Link to comment Share on other sites More sharing options...
SlimShady Posted July 12, 2004 Share Posted July 12, 2004 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 Link to comment Share on other sites More sharing options...
DaLiMan Posted July 12, 2004 Author Share Posted July 12, 2004 Look and learn:OK, I had to calculate the % first.Thanks for showing! :iamstupid: Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now