mIRC Home    About    Download    Register    News    Help

Print Thread
#113682 07/03/05 02:23 PM
Joined: Mar 2005
Posts: 8
E
Exodus_ Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
E
Joined: Mar 2005
Posts: 8
menu channel {
AWaaay: /dialog -m AwDia AwDia
}
dialog AwDia {
title " _-=Away System=-_"
size -1 -1 135 100
option dbu
text " Away Nick", 1, 44 4 37 8
edit %awaynick, 2, 24 17 82 10
text " Away Message", 3, 40 29 46 8
edit %awaymsg, 4, 24 39 82 10
button "Away", 7, 44 52 37 12
button "Back", 8, 44 69 37 12
text " Auto Away Minute(s)", 9, 85 60 29 15
edit %idletime, 10, 115 64 16 11
icon 11, 33 87 64 9
radio "On", 5, 8 64 19 10
radio "Off", 6, 8 74 21 10
text " Logger", 12, 6 54 25 8
}
on *:dialog:AwDia:sclick:7: {
if ($away == $true) { echo -a ***Your already away | halt }
else {
set %oldnick $me
set %awdia on
set %awaynick $did(awdia,2).text
set %awaymsg $did(awdia,4).text
set %away.time $ctime
amsg 4·•5º°14Away5°º4•· 4·•5º°14 $+ %awaymsg $+ 5°º4•·
nick %awaynick
away %awaymsg
}
}
on 1:dialog:awdia:sclick:8:{
if (%awdia == on) {
set %awdia off
amsg 4·•5º°14Back5°º4•· 4·•5º°14 $+ %awaymsg $+ 5°º4•· 4·•5º°14 $+ $duration($calc($ctime - %away.time)) $+ 5°º4•·
nick %oldnick
away
else {
echo -a ***You are not set as away
}
}
}
on *:dialog:AwDia:sclick:5: {
set %away.log on
}
on *:dialog:AwDia:sclick:6: {
set %away.log off
}
on *:TEXT:*:#: {
if ( %away.log == on ) {
IF ($me isin $1- || %awaynick isin $1-) {
IF ($away == $true) {
if (!$window(@Away.log)) { window -l @Away.log 200 200 630 200 Arial 12 }
aline -c15 @Away.log :: $+ $time $+ :: $+ $chan $+ :: < $+ $nick $+ > $1-
}
}
}

ok the bolded part is for the auto away wher u type in the amount of minutes after being idle to set u as away. the problem is that i hav no clue how to make the auto away.

#113683 07/03/05 03:58 PM
Joined: Sep 2004
Posts: 237
Fjord artisan
Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
Try typing /help /away in your mIRC window and see if thats what you need?

#113684 07/03/05 11:26 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
It sounds like you want to have an alias that checks your $idle value against what you are setting in the dialog.
When the dialog is intialized you would set a timer to call an alias that checks $idle to your setting, and if its > your setting, triggers your aliase that sets you /away using the messages you have in the dialog.
Quote:

The On Dialog event
If a user changes the state of controls in the dialog, eg. clicks on a button, types text in an edit box, etc., this triggers the on dialog script event which allows you to monitor input from the user:

on 1:dialog:name:event:id: {
echo $dname $devent $did
}

Where name identifies the dialog, id is the id number of the control triggering the event, and event can be:

init just before a dialog is displayed, controls can be initialized in this event. id is zero

on 1:dialog: name:INIT:0: {


Link Copied to Clipboard