Jump to content

Small utility to select fonts


AMFC
 Share

Recommended Posts

Hi,

I have incorporated a small improvement to an existing utility. This is a small utility to select System fonts and easily put the corresponding instruction in a Script.

 

In the popup window, select the font you need and then use [Ctrl] + [v] to paste the instruction code into the corresponding line of your Script.

This is a very simple utility, but I find it very useful.

 

;***************************************************************************
; Utilidad para mostrar las FUENTES existentes en el Sistema y construir
; directamente la instrucción AUTOIT que debe escribirse en la Script.
; La instrucción se guarda en el PORTAPAPELES y se puede volcar en la Script
; con: [Ctrl] + [v]
;
; Antonio Fernandez Corcobado
;***************************************************************************
#include <Misc.au3>

Global $Fuente
Global $Instruccion

While 1
   $Fuente = _ChooseFont()
   If (@error) Then
      Exit
   Else
      $Instruccion = 'GUICtrlSetFont(-1,'&$Fuente[3]&','&$Fuente[4]&','&$Fuente[1]&',"'&$Fuente[2]&'")'
      ClipPut($Instruccion)
      $txt = "Font Name: " & $Fuente[2] & @CRLF & @CRLF
      $txt&= "Size: " & $Fuente[3] & @CRLF
      $txt&= "Weight: " & $Fuente[4] & @CRLF & @CRLF
      $txt&= "Attributes: " & $Fuente[1] & @CRLF& @CRLF
      $txt&= "COLORREF rgbColors: " & $Fuente[5] & @CRLF
      $txt&= "Hex BGR Color: " & $Fuente[6] & @CRLF
      $txt&= "Hex RGB Color: " & $Fuente[7]
      MsgBox(0, "",$txt)
   EndIf
WEnd
Exit

 

 

 

 

 

 

Link to comment
Share on other sites

English Version:

 

;***************************************************************************
; Utility to display the existing FONTS in the System and directly construct
; the AUTOIT instruction that should be written in the Script.
; The instruction is saved to the CLIPBOARD and can be pasted into the Script
; using: [Ctrl] + [v]
;
; Antonio Fernandez Corcobado
;***************************************************************************
#include <Misc.au3>

Global $Font
Global $Instruction

While 1
$Font = _ChooseFont()
If (@error) Then
Exit
Else
$Instruction = 'GUICtrlSetFont(-1,'&$Font[3]&','&$Font[4]&','&$Font[1]&',"'&$Font[2]&'")'
ClipPut($Instruction)
$txt = "Font Name: " & $Font[2] & @CRLF & @CRLF
$txt&= "Size: " & $Font[3] & @CRLF
$txt&= "Weight: " & $Font[4] & @CRLF & @CRLF
$txt&= "Attributes: " & $Font[1] & @CRLF& @CRLF
$txt&= "COLORREF rgbColors: " & $Font[5] & @CRLF
$txt&= "Hex BGR Color: " & $Font[6] & @CRLF
$txt&= "Hex RGB Color: " & $Font[7]
MsgBox(0, "",$txt)
EndIf
WEnd
Exit

 

Kind Regards
Skeletor

"Coffee: my defense against going postal."

Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...