mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
#112737 28/02/05 08:24 AM
Joined: Feb 2005
Posts: 10
L
Pikka bird
Offline
Pikka bird
L
Joined: Feb 2005
Posts: 10
Lord_Raiden tips hat

Thanks a million man! grin

Will report back

Lord_Raiden tips hat


"Raiden... Lord of Thunder"
#112738 28/02/05 07:22 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
You also might include an on close event to close any hidden queries or to unhide them if you prefer. May as well use this event to save the current position/size too.

Code:
on *:close:%QuerWindow:{
  while $line(%QuerWindow,1,1) {
    close -m $v1 | ; Use this to close the queries
    ; window -w $v1 | ; Use this to unhide them 
    dline -l %QuerWindow 1
  }
  writeini $+(",$mircini,") windows %QuerWindow $window($target).x $window($target).w $window($target).y $window($target).h
}
alias QuerWindow {
  set %QuerWindow $+(@Message,$chr(160),Queuer)
[color:blue]  if (!$window(%QuerWindow)) { window -odeSl11k0 %QuerWindow @Quer.MENU }[/color]
  return %QuerWindow
}

#112739 01/03/05 12:45 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Ill post what I did to mine, i added the nick change stuff for you, I personally dont care when someone changes nicks also not many people i talk to change them so it wasnt likely to happen to me. The problem with tracking nick changes is that you need to be in a channel with them, and also they might start changing nicks to ones you have convos logged for, so do you keep the old one or rename the current one and replace the old ones convo etc etc. I just did what i felt like smile whcih was delete $newnick log, then rename $nick log to $newnick log.
If u dont like it ill refund your money ok? (please see contact my accounts lady Helen Waite for assistance on this)

What have I done to this
(1) Fixed bad filenames I use a custom fix rather than $mkfn comes to the same thing mostly.
(2) Monitor for nick changes
(3) Confirm on window close, and close all hidden query windows if closing
(4) Double click whois info gets displayed in background

The code is getting a bit big to be posted in total over and over BUT i thought that some might like what i did with the Double Click Whois so ill post it once here, I been experementing with the process ever since Iori came up with this quick clean method of making bitmaps in mirc.
I didnt spend much time on checking what RAW's a whois uses just looked at my debug window and took a punt at 300-320, and 614, if there wrong sue me smile

Someone give me some feed back on the whois info thing, is it good or just poser material?

Code:
;
; ** Misc **
;
alias -l Fix.Str2File { return $replace($1,&,&26,\,&5C,/,&2F,:,&3A,*,&2A,?,&3F,",&22,<,&3C,>,&3E,|,&7C,.,&2E) }
alias -l Fix.File2Str { return $replace($1,&5C,\,&2F,/,&3A,:,&2A,*,&3F,?,&22,",&3C,<,&3E,>,&7C,|,&2E,.,&26,&) }
;
; ** Menus **
;
menu @Quer.MENU {
  ;mouse  :/echo -st mouse moved at $mouse.x $mouse.y in $active $1
  ;sclick :/echo -st single click at $mouse.x $mouse.y
  ;dclick :/echo -st double click at $mouse.x $mouse.y
  ;uclick :/echo -st mouse released at $mouse.x $mouse.y
  ;rclick :/echo -st single right-click at $mouse.x $mouse.y in $active $1
  ;leave  :/echo -st mouse left $leftwin
  ;drop   :/echo -st drag and drop at $mouse.x $mouse.y
  ;lbclick:/echo -st lbclick at $mouse.x $mouse.y in $active $1
  lbclick: {
    sline -l $QuerWindow $1
    clear $QuerWindow
    background -x $QuerWindow 
    if ($sline($QuerWindow,0) == 1) {
      quer.titlebar
      var %f = $+(QuerLogs\Quer.,$Fix.Str2File($sline($QuerWindow,1)),.jpg) | if ($isfile(%f)) { background -p $QuerWindow %f }
      var %f = $+(QuerLogs\Quer.,$Fix.Str2File($sline($QuerWindow,1)),.txt) | if ($isfile(%f)) { loadbuf -pi $QuerWindow %f }
    }
  }
  dclick: {
    if ($sline($QuerWindow,0) == 1) {
      whois $sline($QuerWindow,1)
      set %Quer.Whois $sline($QuerWindow,1)
    }
  }
  Close $$1 Conversation: {
    if ($sline($QuerWindow,0) == 1) {
      clear $QuerWindow
      write $+(QuerLogs\Quer.,$Fix.Str2File($1),.txt) Session ended: $+([,$asctime,],$lf,$lf)
      close -m $1
      background -x $QuerWindow
      titlebar $QuerWindow
      dline -l $QuerWindow $sline($QuerWindow,1).ln
    }
  }
  Delete $$1 History: {
    if ($sline($QuerWindow,0) == 1) {
      clear $QuerWindow
      close -m $1
      background -x $QuerWindow
      titlebar $QuerWindow
      dline -l $QuerWindow $sline($QuerWindow,1).ln
      .remove $+(QuerLogs\Quer.,$Fix.Str2File($1),.txt)
    }
  }
}
;
; ** identifiers **
;
alias QuerWindow {
  set %QuerWindow $+(@Message,$chr(160),Queuer)
  if (!$window(%QuerWindow)) { window -odeSl11k0 %QuerWindow 245 250 594 266 @Quer.MENU }
  return %QuerWindow
}
;
; ** Aliases **
;
alias Quer.Titlebar { titlebar $QuerWindow - Conversation with $sline($QuerWindow,1) - $iif(%QuerTextWin,TW,NW) - $iif(%QuerConfirmOff,IM,CM) }
;
; ** Events **
;
on ^*:open:?:*:{ query -n $nick | window -h $nick }
;
on ^*:text:*:?:{ quer.open.and.text.event $1- }
on ^*:action:*:?:{ quer.open.and.text.event $1- }
alias quer.open.and.text.event {
  mkdir QuerLogs
  var %t = $+($iif($event == action, $+ $color(action)),[,$time(HH:nn),]) $iif($event == action,* $nick,$+(<,$nick,>)) $1-
  write $+(QuerLogs\Quer.,$Fix.Str2File($nick),.txt) %t
  aline -ln $QuerWindow $nick 
  if ($sline($QuerWindow,1) == $nick) { aline -pi $QuerWindow %t }
  window -g1 $QuerWindow
  window -h $nick
  haltdef
}
;
on *:input:@:{
  if ($active == %QuerWindow) {
    if ((%QuerTextWin) || ($ctrlenter) || (/* !iswm $1-)) { .quer.msg $1- }
    else { .timer 1 0 savebuf $QuerWindow $+(QuerLogs\Quer.,$Fix.Str2File($sline($QuerWindow,1)),.txt) }
  }
}
alias quer.msg {
  if ($sline($QuerWindow,0) == 1) {
    if ((%QuerConfirmOff) || ($input(Secure Send Message $+ $crlf $+ Send this message to $sline($QuerWindow,1) $+ ? $+ $crlf $+ $crlf $+ $1-,c,Send Message.) == $true)) {
      PRIVMSG $sline($QuerWindow,1) $1-
      aline -p $QuerWindow $+([,$time(HH:nn),] <,$me,>) $1-
      haltdef
    }
    else { editbox $QuerWindow $1- }
    savebuf $QuerWindow $+(QuerLogs\Quer.,$Fix.Str2File($sline($QuerWindow,1)),.txt)
  }
}
;
on *:NICK:{
  if ($fline($QuerWindow,$nick,1,1)) { 
    if ($sline($QuerWindow,1) == $nick) {
      dline -l $QuerWindow $fline($QuerWindow,$nick,1,1)
      aline -ln $QuerWindow $newnick
      sline -l $QuerWindow $fline($QuerWindow,$newnick,1,1)
      quer.titlebar
    }
    else {
      dline -l $QuerWindow $fline($QuerWindow,$nick,1,1)
      aline -ln $QuerWindow $newnick
    }
  }
  var %of = $+(QuerLogs\Quer.,$Fix.Str2File($nick),.txt)
  if ($isfile(%of)) { 
    var %nf = $+(QuerLogs\Quer.,$Fix.Str2File($newnick),.txt)
    .remove %nf
    .timer 1 0 .rename %of %nf
  }
  var %of = $+(QuerLogs\Quer.,$Fix.Str2File($nick),.jpg)
  if ($isfile(%of)) { 
    var %nf = $+(QuerLogs\Quer.,$Fix.Str2File($newnick),.jpg)
    .remove %nf
    .timer 1 0 .rename %of %nf
  }
}
;
on *:Keydown:%QuerWindow:*: { 
  ;/echo -st DN $keyval .. $keyrpt 
  ;splay sounds\typewriter.wav
  if ($keyval == 18) { 
    var %cycle = $!false $!false/$true $!false/$true $!true/$false $!true/$false $!false
    var %cycle = $gettok(%cycle,$calc($findtok(%cycle,%QuerTextWin %QuerConfirmOff,1,47)+1),47)
    set %QuerTextWin $gettok(%cycle,1,32)
    set %QuerConfirmOff $gettok(%cycle,2,32)
    Quer.Titlebar
  }
  elseif ($keyval == 27) { window -c $QuerWindow }
}
;
on *:CLOSE:%QuerWindow:{
  window -n $QuerWindow
  if ($?!="Are you sure you want to close the $QuerWindow window?" != $true ) {
    close -@ $QuerWindow $+ Closing
    renwin $QuerWindow $QuerWindow $+ Closing
    filter -cpzww $QuerWindow $+ Closing $QuerWindow *
    filter -czwwlL $QuerWindow $+ Closing $QuerWindow *
    if ($sline($QuerWindow $+ Closing,1).ln) {
      sline -l $QuerWindow [ $v1 ]
      Quer.Titlebar
      var %f = $+(QuerLogs\Quer.,$Fix.Str2File($sline($QuerWindow,1)),.jpg) | if ($isfile(%f)) { background -p $QuerWindow %f }
    }
  }
  else {
    background -x $QuerWindow
    var %i = $line($QuerWindow,0,1)
    while (%i) { 
      close -m $line($QuerWindow,%i,1)
      dec %i
    }
  }
}
;
;ON WHOIS uses RAW 300-320,614 (maybe some others?) see below
alias quer.whois.image {
  set %quer.whois.image @quer.whois.image
  if (!$window(%quer.whois.image)) { 
    window -c %quer.whois.image
    set %Quer.whois.image.x 5
    set %Quer.Whois.image.y 5
    window -hp %quer.whois.image 1 1 100 100
    set %Quer.whois.image.w.adjust $calc($window(%quer.whois.image).w - $window(%quer.whois.image).bw + 10)
    set %Quer.whois.image.h.adjust $calc($window(%quer.whois.image).h - $window(%quer.whois.image).bh + 10)
  }
  return %quer.whois.image
}
alias quer.whois.line {
  ;/echo -st RAW $numeric : $1-
  var %width = $width($1-,$window($quer.whois.image).font,$window($quer.whois.image).fontsize,0,1) + %Quer.whois.image.w.adjust
  var %height = $height($1-,$window($quer.whois.image).font,$window($quer.whois.image).fontsize)
  window $quer.whois.image 1 1 %width $calc(%Quer.whois.image.y + %height + %Quer.whois.image.h.adjust)
  drawtext -p $quer.whois.image $color(normal text) 5 %Quer.whois.image.y $1-
  inc %Quer.whois.image.y %height
  haltdef
}
alias quer.whois.finish {
  window $quer.whois.image 1 1 1 240
  var %f = $+(QuerLogs\Quer.,$Fix.Str2File(%Quer.whois),.jpg)
  drawsave $quer.whois.image %f
  background -p $QuerWindow %f
  window -c $quer.whois.image
  haltdef
}
raw 300:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 301:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 302:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 303:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 304:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 305:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 306:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 307:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 308:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 309:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 310:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 311:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 312:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 313:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 314:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 315:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 316:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 317:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 318:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.finish
raw 319:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 320:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 614:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-

#112740 01/03/05 12:49 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Sorry missed that, didnt relaiase there was a second page to the thread, untill i posted and couldnt find my post. frown

#112741 01/03/05 01:10 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Nice update there Dave, just a minor note to those who want to see new updates please keep posting, I never thought it'd get this far to be honest it was just an idea I had so my switchbar wasn't filling up with PM's.

Thanks mainly to Iori and Dave, for telling me how to improve it. grin

And to everyone who has tried it.

#112742 01/03/05 01:47 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
*** I've made a few adjustments, I've removed the comments in the splay part and changed it to isfile so it will either play the files or it wont. *** smile

*** Changed the $?!="" on close to $input to play the system sound associated with the question mark icon. ***
Code:

alias -l Fix.Str2File { 
  return $replace($1,&,&26,\,&5C,/,&2F,:,&3A,*,&2A,?,&3F,",&22,<,&3C,>,&3E,|,&7C,.,&2E) 
}
alias -l Fix.File2Str { 
  return $replace($1,&5C,\,&2F,/,&3A,:,&2A,*,&3F,?,&22,",&3C,<,&3E,>,&7C,|,&2E,.,&26,&) 
}

menu @Quer.MENU {
  lbclick: {
    sline -l $QuerWindow $1
    clear $QuerWindow
    background -x $QuerWindow 
    if ($sline($QuerWindow,0) == 1) {
      quer.titlebar
      var %f = $+(QuerLogs\Quer.,$Fix.Str2File($sline($QuerWindow,1)),.jpg) | if ($isfile(%f)) { 
        background -p $QuerWindow %f 
      }
      var %f = $+(QuerLogs\Quer.,$Fix.Str2File($sline($QuerWindow,1)),.txt) | if ($isfile(%f)) { 
        loadbuf -pi $QuerWindow %f
      }
    }
  }
  dclick: {
    if ($sline($QuerWindow,0) == 1) {
      whois $sline($QuerWindow,1)
      set %Quer.Whois $sline($QuerWindow,1)
    }
  }
  Close $$1 Conversation: {
    if ($sline($QuerWindow,0) == 1) {
      clear $QuerWindow
      write $+(QuerLogs\Quer.,$Fix.Str2File($1),.txt) Session ended: $+([,$asctime,],$lf,$lf)
      close -m $1
      background -x $QuerWindow
      titlebar $QuerWindow
      dline -l $QuerWindow $sline($QuerWindow,1).ln
    }
  }
  Delete $$1 History: {
    if ($sline($QuerWindow,0) == 1) {
      clear $QuerWindow
      close -m $1
      background -x $QuerWindow
      titlebar $QuerWindow
      dline -l $QuerWindow $sline($QuerWindow,1).ln
      .remove $+(QuerLogs\Quer.,$Fix.Str2File($1),.txt)
    }
  }
}

alias QuerWindow {
  set %QuerWindow @Quer
  if (!$window(%QuerWindow)) { 
    window -odeSl11k0 %QuerWindow 245 250 594 266 @Quer.MENU 
  }
  return %QuerWindow
}

alias Quer.Titlebar { 
  titlebar $QuerWindow - Conversation with $sline($QuerWindow,1) - $iif(%QuerTextWin,TW,NW) - $iif(%QuerConfirmOff,IM,CM) 
}

on ^*:open:?:*: {
  query -n $nick 
  window -h $nick 
}

on ^*:text:*:?: { 
  quer.open.and.text.event $1-
}

on ^*:action:*:?: {
  quer.open.and.text.event $1-
}

alias quer.open.and.text.event {
  mkdir QuerLogs
  var %t = $+($iif($event == action, $+ $color(action)),[,$time(HH:nn),]) $iif($event == action,* $nick,$+(<,$nick,>)) $1-
  write $+(QuerLogs\Quer.,$Fix.Str2File($nick),.txt) %t
  aline -ln $QuerWindow $nick 
  if ($sline($QuerWindow,1) == $nick) {
    aline -pi $QuerWindow %t
  }
  window -g1 $QuerWindow
  window -h $nick
  haltdef
}

on *:input:@:{
  if ($active == %QuerWindow) {
    if ((%QuerTextWin) || ($ctrlenter) || (/* !iswm $1-)) { 
      .quer.msg $1- 
      if ($isfile(sounds/enter.wav)) { splay sounds/enter.wav }
    }
    else { 
      .timer 1 0 savebuf $QuerWindow $+(QuerLogs\Quer.,$Fix.Str2File($sline($QuerWindow,1)),.txt)
    }
  }
}
alias quer.msg {
  if ($sline($QuerWindow,0) == 1) {
    if ((%QuerConfirmOff) || ($input(Secure Send Message $+ $crlf $+ Send this message to $sline($QuerWindow,1) $+ ? $+ $crlf $+ $crlf $+ $1-,c,Send Message.) == $true)) {
      PRIVMSG $sline($QuerWindow,1) $1-
      aline -p $QuerWindow $+([,$time(HH:nn),] <,$me,>) $1-
      haltdef
    }
    else { editbox $QuerWindow $1- }
    savebuf $QuerWindow $+(QuerLogs\Quer.,$Fix.Str2File($sline($QuerWindow,1)),.txt)
  }
}

on *:NICK:{
  if ($fline($QuerWindow,$nick,1,1)) { 
    if ($sline($QuerWindow,1) == $nick) {
      dline -l $QuerWindow $fline($QuerWindow,$nick,1,1)
      aline -ln $QuerWindow $newnick
      sline -l $QuerWindow $fline($QuerWindow,$newnick,1,1)
      quer.titlebar
    }
    else {
      dline -l $QuerWindow $fline($QuerWindow,$nick,1,1)
      aline -ln $QuerWindow $newnick
    }
  }
  var %of = $+(QuerLogs\Quer.,$Fix.Str2File($nick),.txt)
  if ($isfile(%of)) { 
    var %nf = $+(QuerLogs\Quer.,$Fix.Str2File($newnick),.txt)
    .remove %nf
    .timer 1 0 .rename %of %nf
  }
  var %of = $+(QuerLogs\Quer.,$Fix.Str2File($nick),.jpg)
  if ($isfile(%of)) { 
    var %nf = $+(QuerLogs\Quer.,$Fix.Str2File($newnick),.jpg)
    .remove %nf
    .timer 1 0 .rename %of %nf
  }
}

on *:Keydown:%QuerWindow:*: {
[color:red] 
  if ($isfile(sounds\typewriter.wav)) { 
splay sounds\typewriter.wav 
}
[/color]
[color:red]
  if ($keyval == 8) {  
    if ($isfile(sounds\back.wav)) { 
splay sounds\back.wav 
}
  }
[/color]
  if ($keyval == 18) { 
    var %cycle = $!false $!false/$true $!false/$true $!true/$false $!true/$false $!false
    var %cycle = $gettok(%cycle,$calc($findtok(%cycle,%QuerTextWin %QuerConfirmOff,1,47)+1),47)
    set %QuerTextWin $gettok(%cycle,1,32)
    set %QuerConfirmOff $gettok(%cycle,2,32)
    Quer.Titlebar
  }
  elseif ($keyval == 27) { 
    window -c $QuerWindow
  }
}

on *:CLOSE:%QuerWindow:{
  window -n %QuerWindow
  if ($input(Are you sure you want to close the $QuerWindow window?,dq,Confirm close) != $true) {
    close -@ $QuerWindow $+ Closing
    renwin $QuerWindow $QuerWindow $+ Closing
    filter -cpzww $QuerWindow $+ Closing $QuerWindow *
    filter -czwwlL $QuerWindow $+ Closing $QuerWindow *
    if ($sline($QuerWindow $+ Closing,1).ln) {
      sline -l $QuerWindow [ $v1 ]
      Quer.Titlebar
      var %f = $+(QuerLogs\Quer.,$Fix.Str2File($sline($QuerWindow,1)),.jpg) | if ($isfile(%f)) { 
        background -p $QuerWindow %f
      }
    }
  }
  else {
    background -x $QuerWindow
    var %i = $line($QuerWindow,0,1)
    while (%i) { 
      close -m $line($QuerWindow,%i,1)
      dec %i
    }
  }
}

alias quer.whois.image {
  set %quer.whois.image @quer.whois.image
  if (!$window(%quer.whois.image)) { 
    window -c %quer.whois.image
    set %Quer.whois.image.x 5
    set %Quer.Whois.image.y 5
    window -hp %quer.whois.image 1 1 100 100
    set %Quer.whois.image.w.adjust $calc($window(%quer.whois.image).w - $window(%quer.whois.image).bw + 10)
    set %Quer.whois.image.h.adjust $calc($window(%quer.whois.image).h - $window(%quer.whois.image).bh + 10)
  }
  return %quer.whois.image
}

alias quer.whois.line {
  var %width = $width($1-,$window($quer.whois.image).font,$window($quer.whois.image).fontsize,0,1) + %Quer.whois.image.w.adjust
  var %height = $height($1-,$window($quer.whois.image).font,$window($quer.whois.image).fontsize)
  window $quer.whois.image 1 1 %width $calc(%Quer.whois.image.y + %height + %Quer.whois.image.h.adjust)
  drawtext -p $quer.whois.image $color(normal text) 5 %Quer.whois.image.y $1-
  inc %Quer.whois.image.y %height
  haltdef
}

alias quer.whois.finish {
  window $quer.whois.image 1 1 1 240
  var %f = $+(QuerLogs\Quer.,$Fix.Str2File(%Quer.whois),.jpg)
  drawsave $quer.whois.image %f
  background -p $QuerWindow %f
  window -c $quer.whois.image
  haltdef
}

raw 300:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 301:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 302:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 303:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 304:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 305:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 306:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 307:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 308:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 309:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 310:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 311:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 312:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 313:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 314:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 315:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 316:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 317:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 318:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.finish
raw 319:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 320:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-
raw 614:$(& $iif(%Quer.whois,$v1,-) *):quer.whois.line $3-

#112743 01/03/05 02:32 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
I've made a few adjustments, I've removed the comments in the splay part and changed it to isfile so it will either play the files or it wont.


LOL didnt even notice it, i must have remarked it in the first version and not unmarked it since.

Quote:

if ($sline($QuerWindow $+ Closing,1).ln) {
sline -l $QuerWindow [ $v1 ]
Quer.Titlebar
var %f = $+(QuerLogs\Quer.,$Fix.Str2File($sline($QuerWindow,1)),.jpg) | if ($isfile(%f)) {
background -p $QuerWindow %f
}


I see you dont like putting some things on the same lines, your choice of course, no harm either way, i just find if its one command, i might as well do it, it makes code more straight down in my eyes.

But i actually quoted this for another reason, its the
if ($sline($QuerWindow $+ Closing,1).ln) {
sline -l $QuerWindow [ $v1 ]

If your altering any of the code watch out for using $v1 $v2 and $ifmatch, around the custom $identifiers, the [ ] around [ $v1 ] is there on purpose as they are needed so its evaluated Prior to $QuerWindow, as that $identifier well alter the contents of $v1, something I have got used to in my coding, but is a easy trap to miss, you end up staring at the code, going ,well theres $v1 and next i use it here, why isnt it set correctly?!?!?!?!?

#112744 01/03/05 02:45 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Hehe yeah it was in the first version.

When coding something I will always put them on about 3-4 lines and then go back and put them on one line for some reason. It's something I have always done as you'll see in my posts, another thing as you'd define as hardcoding window names into scripts, that's another thing I've always done.

As you said there's no harm in it, it's just something over a long period of time you become somewhat comfortable with it. smile

Joined: Oct 2015
Posts: 15
Pikka bird
Offline
Pikka bird
Joined: Oct 2015
Posts: 15
Hey,

Sorry for opening an old thread.
I like this code, but can I do that in 2018 so that a private name will flash?
If I have 3-4 query openings, and I see who wrote?


Ps! English is not my native language. Sorry wink

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
It seems your question is unrelated to this thread. They are scripting to evade the behavior you're asking for, which should already be happening unless you've changed something.

By default, mirc-options/display has the box checked for "flash icons". When that box is checked, the query window in the switchbar and the treebar flashes each time a query window receives a message, otherwise it's a solid color. The color dropdown at the bottom of that same menu window controls which color the query window uses.

Page 2 of 2 1 2

Link Copied to Clipboard