mIRC Home    About    Download    Register    News    Help

Print Thread
How do you use /break, /run and where's close? #50393 20/09/03 02:01 PM
Joined: Sep 2003
Posts: 261
S
Scorpwanna Offline OP
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)
Re: How do you use /break, /run and where's close? #50394 20/09/03 02:04 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
/break is for use inside scripts, not from the command line.

Re: How do you use /break, /run and where's close? #50395 20/09/03 02:07 PM
Joined: Jan 2003
Posts: 150
J
J0ke Offline
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
read this


Go ahead, jump. 100,000 lemmings can't be wrong.
Re: How do you use /break, /run and where's close? #50396 20/09/03 02:46 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
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