mIRC Home    About    Download    Register    News    Help

Print Thread
#150278 30/05/06 11:57 PM
Joined: Jan 2006
Posts: 61
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2006
Posts: 61
Hi everyone!
I was construct one Phone List Addon, and everything goes fine, but now im stock in a code i dont know how to do it...

I have one .txt file containing names of people, and one while to read all the file and put these names in a List on Dialog; But what i wanna is do a progressBar with MDX.dll, i allready done the progressBar but the code inside is empty because i dont know what put there!

I try this:

Code:
 
;;This is the normal code, whitout the feature i want...

Alias Test {
  var %Procura = 1
  while (%Procura <= $lines(PhoneList.txt)) {
    .did -a PhoneList 50 $read(PhoneList.txt,%Procura) 
    inc %Procura
  }
}
 


I try the following code:

Code:
 
;;This is the normal code, whitout the feature i want...

Alias Test {
  var %Procura = 1
  while (%Procura <= $lines(PhoneList.txt)) {
    .did -a PhoneList 50 $read(PhoneList.txt,%Procura) 
;Add bar to the ProgressBar (Dlg PhoneList ID 21)
    .did -a PhoneList 21 1
    inc %Procura
  }
}
 


This code works fine, when the while put the first name on list, put 1 bar on the progressBar, but the progressbar have these dimentions: text "",21, 107 370 200 15 , and the .txt file contain 465 lines,

i wanna finish the reading txt at the same time as ProgressBar, and this is not working...the progressBar finishes first!

How to calculate when the .txt is started to read, and the progressbar move on, and when the .txt file is finished the ProgressBar stop too in 100%?

Tanks *

Thats all

*


The practice do the Master...
Joined: Dec 2005
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Dec 2005
Posts: 58
Try this Command In While ;

did -ra phonelist 21 %procura $lines(phonelist.txt)

Last edited by SCNDRL; 31/05/06 11:31 AM.
Joined: Jan 2006
Posts: 61
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2006
Posts: 61
Dont work, the progressbar not even move frown
Anyone else know how an i fix my problem?

Thats all

*


The practice do the Master...
Joined: Dec 2005
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Dec 2005
Posts: 58
oh sry try this i can work
Code:
Alias Test {  var %Procura = 1  
while (%Procura <= $lines(PhoneList.txt)) {  
did -a PhoneList 50 $read(PhoneList.txt,%Procura) 
 .did -a PhoneList 21 %procura 0 $lines(phonelist.txt)    
inc %Procura  
}
}


i like that
Joined: Jan 2006
Posts: 61
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2006
Posts: 61
Tanks a lot =D, works perfectly!
Tank's again! **

Thats all

*


The practice do the Master...

Link Copied to Clipboard