mIRC Home    About    Download    Register    News    Help

Print Thread
#202630 26/07/08 10:09 PM
Joined: Jul 2008
Posts: 12
M
mOX Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Jul 2008
Posts: 12
Someone has an idea why do not I get the last letter "c" in the title?
Code:
alias -l _titulo {
  var %title = D,I,A,L,O,G, m,I,R,C
  var %c = 1
  while (%c <= $numtok(%title,44)) { 
    .timer -mo 1 $+(%c,00) dialog -t $dname %h | %h = $+(%h,$gettok(%title,%c,44))
    inc %c 
  }
  unset %title %c %h
}

mOX #202631 26/07/08 10:26 PM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
are you expecting the timer to execute two commands: a | b on a delay ?

because it's only executing 'a' and mIRC is immediately executing b right after the timer is registered.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
mOX #202632 26/07/08 10:42 PM
Joined: Feb 2006
Posts: 181
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
Code:
alias -l _titulo {
  var %title = D,I,A,L,O,G, m,I,R,C
  var %c = 1,%h
  while (%c <= $numtok(%title,44)) {
    %h = $+(%h,$gettok(%title,%c,44)) 
    .timer -mo 1 $+(%c,00) dialog -t $dname %h
    inc %c 
  }
}


%title,%c,%h are variables there is no need to unset them

Crinul #202636 26/07/08 11:11 PM
Joined: Jul 2006
Posts: 4,172
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,172
Local variable, there is no need to unset them because they are local, not because they are "variable".
Certainly a typo smile


Last edited by Wims; 27/07/08 12:21 AM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #202637 26/07/08 11:23 PM
Joined: Feb 2006
Posts: 181
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
My mistake: Local Variables smile

Originally Posted By: Wims
there is no need too unset
typo? smile

Last edited by Crinul; 26/07/08 11:29 PM.
mOX #202643 27/07/08 12:07 AM
Joined: Jul 2008
Posts: 12
M
mOX Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Jul 2008
Posts: 12
I'm happy, I could create a simpler way
Code:
alias _titulo {
  var %l = 1
  while (%l <= $len($1)) { .timer -mo 1 $+($v1,00) dialog -t $dname $mid($1,1,$v1) | inc %l }
}

$_titulo(DIALOG mIRC)

Thanks to all grin


Link Copied to Clipboard