mIRC Home    About    Download    Register    News    Help

Print Thread
#152975 09/07/06 08:46 AM
Joined: Jul 2006
Posts: 2
S
sp00ky Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Jul 2006
Posts: 2
I haven't had mIRC in a number of years so needless to say I've forgotten quite a lot about scripting. I'm planning on making an away system and would love some help with just two things.

I'm going to have it in a channel popup menu, which is easy enough to make. It'll have the menu Away, and as submenus On and Off. Whenever I choose one, I'd like to know how to place a checkmark beside whichever option is chosen.

Also, whenever I come back (choose Off) I'd like it to let me know how long I've been away in hours/minutes/seconds.

Any help will be greatly appreciated. These two factors will benefit me for something larger I'm making.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
/help Menu Styles

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
just as a sample of the controls you wanted I did this
Code:
using a group to just get the checkmark
menu status,channel,query {
  Away System Sample
  .  $style($iif($group(#away.on) == off,0,1)) Away System On : { .disable #away.* | .enable #away.on | set %awaytime $ctime | echo -a Away 3ON }
  .  $style($iif($group(#away.off) == off,0,1)) Away System Off : { .disable #away.* | .enable #away.off | awaytime }
}
#away.on off
#away.on end
#away.off on
alias awaytime {
  echo -a $me was away:12 $duration($calc($ctime - %awaytime))
  unset %awaytime
}
#away.off end

Joined: Jul 2006
Posts: 2
S
sp00ky Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Jul 2006
Posts: 2
Thanks for the help guys, I got it.


Link Copied to Clipboard