mIRC Home    About    Download    Register    News    Help

Print Thread
Expire a dialog #32809 28/06/03 09:11 PM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
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

Last edited by andymps; 28/06/03 09:16 PM.

Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
Re: Expire a dialog #32810 28/06/03 09:23 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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

Last edited by pheonix; 28/06/03 09:23 PM.

new username: tidy_trax
Re: Expire a dialog #32811 28/06/03 11:32 PM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
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 ???


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
Re: Expire a dialog #32812 28/06/03 11:37 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
anywhere in remote but change name to the name of your dialog


new username: tidy_trax
Re: Expire a dialog #32813 29/06/03 12:03 AM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
i dont know what the name is, i am new to dialogs, someone did it for me


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
Re: Expire a dialog #32814 29/06/03 12:51 AM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
also that above dialog, i need to put another button in, which just closes the dialog, thats it, can any one help?


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
Re: Expire a dialog #32815 29/06/03 12:59 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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.

Re: Expire a dialog #32816 29/06/03 01:18 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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