mIRC Homepage
Posted By: andymps Expire a dialog - 28/06/03 09:11 PM
Does anyone know how to make a dialog automatically close if it is idle for 60 seconds
and then to msg a person sayin im sorry the dialog has expired
Posted By: pheonix Re: Expire a dialog - 28/06/03 09:23 PM
on *:Dialog:name:*:*:{
/timerclose off
/timerclose 1 60 dialog -c name name
}
on *:Dialog:name:close:0:{
privmsg person the dialog has expired sorry!
}
that should work just fine, but if not ill make a more complicated 1 smile
Posted By: andymps Re: Expire a dialog - 28/06/03 11:32 PM
right u have lost me,
Code:
 
dialog Secure {
title "Secure Pm"
size -1 -1 177 96
option dbu
box "Message", 1, 1 3 174 50
text "Message Text", 2, 5 10 166 40
text "Nick:", 3, 2 56 24 8
text "Actual Nick", 4, 26 56 149 8
button "Accept", 5, 2 82 37 12
button "Decline", 6, 70 82 37 12
button "Permission", 7, 138 82 37 12
text "Address:", 8, 2 66 24 8
text "Actual Address", 9, 26 66 149 8
text "Hidden Timestamp", 10, 99 3 60 8, hide
text "hidden msg nostrip", 11, 99 13 46 8, hide nowrap
}

on ^1:open:?:*:{
var %DName = $+(PMChoice,.,$cid,.,$nick)
if ($dialog(%DName) == $null) {
.msg $nick AutoMsg $ddcol(4|8|7,1 I Will consider your request, plz wait)
dialog -m %Dname Secure
}
did -o %Dname 1 1 Message received at: $asctime(HH:nn:ss)
did -o %Dname 10 1 $ctime
did -o %Dname 2 1 $strip($1-)
did -o %dname 11 1 $1-
did -o %Dname 4 1 $nick
did -o %Dname 9 1 $address
haltdef
}

on 1:dialog:PMChoice.*:*:*: {
if ($devent == sclick) {
var %nick = $did(4)
if ($did = 6) {
.msg %nick AutoMsg $ddcol(4|8|7,1 Your Msg request has been declined have a nice day)
.ignore -pu60 $+(*!*@,$gettok($did(9),2,64))
dialog -x $dname
}
if ($did == 5) { .msg %nick AutoMsg ddcol(4|8|7,1 Your Msg request has been accepted) }
if ($did == 7) {
.msg %nick AutiMsg $ddcol(4|8|7,1 You have been given permission to msg me freely)
guser 15 %nick 
}
if (($did == 5) || ($did == 7)) {
query %nick
echo $color(normal) -i2 %nick $asctime($did(10),$timestampfmt) < $+ %nick $+ > $did(11)
dialog -x $dname
}
}
}

where and what do i put in that ???
Posted By: pheonix Re: Expire a dialog - 28/06/03 11:37 PM
anywhere in remote but change name to the name of your dialog
Posted By: andymps Re: Expire a dialog - 29/06/03 12:03 AM
i dont know what the name is, i am new to dialogs, someone did it for me
Posted By: andymps Re: Expire a dialog - 29/06/03 12:51 AM
also that above dialog, i need to put another button in, which just closes the dialog, thats it, can any one help?
Posted By: SladeKraven Re: Expire a dialog - 29/06/03 12:59 PM
Put this under your dialog.
Code:
on *:dialog:Secure:init:*: {
  timerSecure 1 60 dialog -x Secure Secure | raw privmsg nickname I'm sorry the dialog has expired.
}

on *:dialog:Secure:mouse:*: {
  timerSecure off
}


Your dialog name is Secure.
Posted By: SladeKraven Re: Expire a dialog - 29/06/03 01:18 PM
Code:
dialog Secure { 
  title "Secure Pm"
  size -1 -1 177 96
  option dbu
  box "Message", 1, 1 3 174 50
  text "Message Text", 2, 5 10 166 40
  text "Nick:", 3, 2 56 24 8
  text "Actual Nick", 4, 26 56 149 8
  button "Accept", 5, 2 82 37 12
  button "Decline", 6, 70 82 37 12 
  button "Permission", 7, 138 82 37 12
  [color:red]button "Close", 12, 113 82 20 12[/color] 
  text "Address:", 8, 2 66 24 8
  text "Actual Address", 9, 26 66 149 8
  text "Hidden Timestamp", 10, 99 3 60 8, hide
  text "hidden msg nostrip", 11, 99 13 46 8, hide nowrap
}

You might want to resize the button. smile
© mIRC Discussion Forums