mIRC Home    About    Download    Register    News    Help

Print Thread
#222655 28/06/10 08:44 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline OP
Hoopy frood
OP Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
$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.


hixxy #232254 26/05/11 11:54 PM
Joined: May 2007
Posts: 37
C
Ameglian cow
Offline
Ameglian cow
C
Joined: May 2007
Posts: 37
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.

Joined: Sep 2005
Posts: 2,881
H
hixxy Offline OP
Hoopy frood
OP Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
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


Link Copied to Clipboard