mIRC Home    About    Download    Register    News    Help

Print Thread
picwin #240048 18/12/12 05:42 PM
Joined: Jul 2008
Posts: 51
R
RiMaJoy Offline OP
Babel fish
OP Offline
Babel fish
R
Joined: Jul 2008
Posts: 51
Hi all,

I can't get to work like it should.
I get a /window: insufficient parameters error that keeps me from closing the picwin.
I'm no expert and i'm lucky i got this far.
Also when more the one request is open it doesn't work frown
My guess is to make some variable for the nick and link that to the picwin so that when the menu is being used the right picwin window/query window will be closed.
I'v e been trying now for 2 days but my knowlegde is leaving me alone.

I tryed on open .......
Code:
set %nick $nick


This is what i made:

Code:
on *:OPEN:?: {  if ($away) { notice $nick Sorry, but $me is away. | close -m $nick }
  elseif (porn isin $strip($1-) || http:// isin $strip($1-) || www isin $strip($1-) || $chr(35) isin $1-) {  .msg $nick Go spam somewhere else ..... you r ignored.  | .ignore -u300 $nick | close -m $nick } 
  else {
    .msg $nick Query Blocker - Please Be Patient untill i accept or decline
    %pos = 4
    var %x 0
    var %y $comchan($nick,0)
    while (%x < %y) {
      inc %x
      var %a %a $+ $chr(32) $+ $comchan($nick,%x) $+ $chr(32)
    }
    set %querytext. [ $+ [ $nick ] ] $1-
    window -pdCf +be @Query- $+ $nick -1 -1 320 140
    drawfill -r @Query- $+ $nick $color(text) 1 1 1
    setlayer 215 @Query- $+ $nick
    drawtext -p @Query- $+ $nick $color(other) Anonymous 10 4 %pos Query Request from $nick | inc %pos 26
    drawtext -p @Query- $+ $nick $color(other) Anonymous 10 4 %pos Time $+ $c1 $timestamp | inc %pos 13
    drawtext -p @Query- $+ $nick $color(other) Anonymous 10 4 %pos ComChans $+ $c1 %a | inc %pos 13
    drawtext -p @Query- $+ $nick $color(other) Anonymous 10 4 %pos Message $+ $c1 %querytext. [ $+ [ $nick ] ] | inc %pos 13
  }
}
alias -l c1 return $+($chr(3),$color(ctcp).dd,$1,$chr(3),05,:,$chr(3),$color(info).dd,$2,$chr(15))

menu @Query* { 
  Sclick: window -a $nick | window -c @Query- $+ $nick | unset %querytext. [ $+ [ $nick ] ]
  rclick: close -m $nick | window -c @Query- $+ $nick | unset %querytext. [ $+ [ $nick ] ]
  dclick: .ignore -p120 $nick | close -m $nick | window -c @Query- $+ $nick | unset %querytext. [ $+ [ $nick ] ]
} 


I hope here i can find some help.

Re: picwin [Re: RiMaJoy] #240049 18/12/12 05:53 PM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
In your menu, you probably want $active instead of $nick, since the latter one has no meaning in that context.