mIRC Homepage
Posted By: sp00ky Checkmarks in popup menus. - 09/07/06 08:46 AM
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.
Posted By: RusselB Re: Checkmarks in popup menus. - 09/07/06 08:51 AM
/help Menu Styles
Posted By: MikeChat Re: Checkmarks in popup menus. - 09/07/06 07:17 PM
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
Posted By: sp00ky Re: Checkmarks in popup menus. - 10/07/06 04:17 AM
Thanks for the help guys, I got it.
© mIRC Discussion Forums