mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2003
Posts: 261
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
I've been a mIRC scripter for years, making dialogs, misc type things for friends etc... Yet these two things are boggling my mind, I have 2 questions.

The /break command, how exactly could it be used without a timer or in a while loop?

In the mIRC help file it states: You can use /break to break out of the current loop, and /continue to jump to the beginning of the loop.

My question is this, if you are in a while loop which stalls mirc until it's done, (meaning you can't even type in any text boxes or do anything with mirc until it's finished the loop) how in the world do you type /break to stop the loop? I know of the control break, but I don't want to have to use it.

I need to know this because I'm updateing a file lister dialog script that I have created, one that searches for music files or types of audio files and I want to use a stop button. So far the lister just lists all the files until it's finished the search loop. Since while a loop is in progress you can't even click on any buttons in dialogs or type anything, how would it be possible to break out of the loop without control+break?

Does the /break command actually work?

My next question is: There's a /run command in mirc to run other programs and or files using the programs. So where's the close program command? I have seen this close.dll mentioned in previous posts but was unable to find it. Does anyone know how to use the run command to close a program or know of a way to close a program using mirc?


We don't just write the scripts, we put them to the test! (ScriptBusters)
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
/break is for use inside scripts, not from the command line.

Joined: Jan 2003
Posts: 150
J
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
read this


Go ahead, jump. 100,000 lemmings can't be wrong.
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
if your using mirc 6.1, use this to test break.

Code:
alias brtest {
  .echo -q $findfile(c:\,*.txt,1,set %file $1-)
  .fopen file %file
  var %i 1
  while (%i <= 10000) {
    if ($feof) { echo -a Command Halted! | .unset %file | .fclose file | break }
    .fseek -l file %i 
    .echo -a file - $fread(file)
    inc %i
  }
  if ($fopen(0)) && ($fopen(file)) { .fclose file }
}

just dont read a text file any bigger than 10000 lines grin, type: /brtest


new username: tidy_trax

Link Copied to Clipboard