Change the font size by hotkey

User-to-User discussion about the PhraseExpress macro programming.
Post Reply
henrique88
Posts: 3
Joined: 24 Apr 20, 17:13

Change the font size by hotkey

Post by henrique88 » 28 Apr 20, 16:57

I know that a lot of software uses CTRL + SHIFT +. Or , to change the font size, so I created a macro that applies 12x the command CHTL + SHIFT + . to increase the size (I'm trying to simulate a Markdown, H1, H2 ...), but I would also like to be able to go back to the original size by pressing the same key, is it possible?
And it would be even better if you had some way to determine the exact parameters like font, size, bold, etc., so it would not depend on the initial format.

Flogisch
Posts: 16
Joined: 19 Jul 17, 06:59

Post by Flogisch » 28 Apr 20, 17:30

Hey there!
I'm not quite sure if you're meaning something like that:

Code: Select all

{#cond -if {#forminput -text HTML or BBcode? -type 4 -items HTML|BBcode -vals HTML|BBcode -def HTML -variablename HTML/BBCode} == HTML -then {#clipboard -cut -variablename Cut Clipboard}<font style= "font-size:{#forminput -text Pixel size: -type 0 -def 12 -required numbers -visgroup HTML -variablename Pixel}px; font-weight:{#forminput -text Font Weight: -type 4 -items normal|bold|100|200|300|400|500|600|700|800 -vals normal|bold|100|200|300|400|500|600|700|800 -def normal -visgroup HTML -variablename weight}; color:{#forminput -text Font color: -type 0 -def #000000 -visgroup HTML -variablename color}; font-family: '{#forminput -text Font family: -type 0 -def Arial -visgroup HTML -variablename family}'">{#clipboard -paste -variablename Paste Clipboard}</font> -else {#clipboard -cut -variablename Cut Clipboard}[font={#forminput -text Font family: -type 0 -def Arial -visgroup HTML -variablename family}][color={#forminput -text Font color: -type 0 -def #000000 -visgroup HTML -variablename color}][size={#forminput -text Size: -type 0 -def 100 -required numbers -visgroup BBcode -variablename Size}]{#clipboard -paste -variablename Paste Clipboard}[/size][/color][/font] -variablename If-Then-Else Abfrage}
(CTRL+SHIFT+C is the best choice for this macro)

Best regards,
Flo

henrique88
Posts: 3
Joined: 24 Apr 20, 17:13

Post by henrique88 » 28 Apr 20, 19:16

This would literally insert text, I want something to directly format the text in text editors.
But it gave me an idea, cut out the words and paste already formatted.

So thanks.

henrique88
Posts: 3
Joined: 24 Apr 20, 17:13

Post by henrique88 » 28 Apr 20, 19:26

It also didn't work. 😪

Post Reply