mIRC Homepage
Posted By: hixxy $sfont, $scolor - 28/06/10 08:44 PM
$sfont - pops up the font dialog and returns the font name and font size of the chosen font.

$scolor/$scolour - pops up the colour dialog and returns the colour chosen.

Posted By: Chessnut Re: $sfont, $scolor - 26/05/11 11:54 PM
I was planning on making a new topic to suggest exactly these two ideas, but since hixxy already posted I figured it would be better just to resurrect this topic since no feedback/reply/discussion was ever made on this idea.

These two features would be incredibly useful, and I'm surprised they haven't been implemented already.
Posted By: hixxy Re: $sfont, $scolor - 27/05/11 12:57 PM
I still strongly support these ideas, no reason for them not to be included really and it would be handy to have access to them smile

I've been playing with sendkeys to open the font dialog and set the font of a custom window, but my attempt is thwarted by the fact that you can't catch the font dialog closing, which means you don't know when to /return the result frown

You might want to have a play and see if you can come up with anything. I tried using a while loop to freeze mIRC while the font dialog is open, but it unfortunately stops it from opening.

Code:
alias sfont {
  window @sfont
  var %object = sfont. $+ $ticks, %ticks = $ticks
  .comopen %object wscript.shell
  .comclose %object $com(%object,sendkeys,1,bstr,% $+ vf)
  while ($calc($ticks - %ticks) < $1) noop
  if ($window(@sfont).font $window(@sfont).fontsize $window(@sfont).fondbold $window(@sfont).fontitalic != $null) noop
  window -c @sfont
  return $v1
}


$sfont(5000) for a 5 second dialog (5 seconds to choose a font) was my theory, but it failed :p
© mIRC Discussion Forums