Atalho de teclado para alterar a cor da fonte no onenote 2013?

Atalho de teclado para alterar a cor da fonte no onenote 2013?

Existe uma maneira de alterar a cor da fonte no onenote usando um atalho de teclado?

(Quero transformar as duas fontes destacadas em uma cor diferente e de forma que, se eu começar a digitar, ela mude de cor).

Responder1

No OneNote, se você puder alternar para a cor desejada usando uma sequência de teclas, poderá juntá-las em umAutoHotKeymacro.

Por exemplo, no OneNote 2013 em inglês, consigo mudar para a cor da fonte vermelha (com valor RGB = 255,0,0) enviando:

Alt+ h, f, c, m, Ctrl+ PgDn, Alt+ r, 2, 5, 5, Tab, 0, Tab, 0,Enter

Então aqui você tem alguns exemplos de macros:

  • Ctrl+ Alt+ P=roxo- escolhido em amostras de cores (redefine a cor paraAutomáticoantes disso)
  • Ctrl+ Alt+ R=vermelho- escolhendoMais cores...e inserindo valores RGB 255, 0, 0
  • Ctrl+ Alt+ B=azul- escolhendoMais cores...e inserindo valores RGB 0, 0, 255
  • Ctrl+ Alt+ A=automático- escolheAutomáticocor encontrada no topo das amostras de cores

A listagem completa (use copiar e colar):

; some helpful setup first
SetTitleMatchMode, RegEx ; match window titles by regular expressions

#IfWinActive - OneNote$ ; ------ only in windows with title ending with "- OneNote"

^!p::Send !hfca!hfc{Down 7}{Right 4}{Enter}
^!r::!hfcm^{PgDn}!r255{Tab}5{Tab}0{Enter} ; red (255, 0, 0)
^!b::!hfcm^{PgDn}!r0{Tab}5{Tab}255{Enter} ; blue (0, 0, 255)
^!a::!hfca ; automatic color (i.e. reset font color to "none")

#IfWinActive ; ------ end of section restricted to specific windows

Testado, funciona muito bem!

Dessa forma, você pode atribuir atalhos de teclado a quase todas as ações no OneNote ou em outros aplicativos.

(Se você não estiver familiarizado com expressões regulares, poderá simplificar a correspondência de títulos de janelas. Consulte a ajuda do SetTitleMatchModecomando. E omita $de OneNote$.)

Responder2

esta é minha opinião sobre a mesma ideia, mas melhorada em relação ao funcionamento do OneNote, principalmente no que diz respeito ao comportamento da janela de cores, você não pode alternar as cores na hora porque ela permanece na mesma aba.
Além disso, adicionei uma matriz para que você possa modificar facilmente as cores sem precisar alterar um número em linha.

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
; some helpful setup first
SetTitleMatchMode, RegEx ; match window titles by regular expressions

#IfWinActive - OneNote$ ; ------ only in windows with title ending with "- OneNote"
; change the number in "RGB :=" between  [#,#,#] using RGB colorspace 
{
    {
    ^!p::
        RGB := [167,21,157] ; purple
        Send !hfcm^{PgDn}!r
        Send % RGB[1]
        Send {Tab}
        Send % RGB[2]
        Send {Tab}
        Send % RGB[3]
        Send {Enter}{Right 1}
        GoSub, ^!a
    return
    }
    {
    ^!r::
        RGB := [255,0,0] ; Red
        Send !hfcm^{PgDn}!r
        Send % RGB[1]
        Send {Tab}
        Send % RGB[2]
        Send {Tab}
        Send % RGB[3]
        Send {Enter}{Right 1}
        GoSub, ^!a
    return
    }
    {
    ^!o:: 
        RGB := [235,110,26] ; Dark Orange
        Send !hfcm^{PgDn}!r
        Send % RGB[1]
        Send {Tab}
        Send % RGB[2]
        Send {Tab}
        Send % RGB[3]
        Send {Enter}{Right 1}
        GoSub, ^!a
    return
    }
    {
    ^!b::
        RGB := [0,0,255] ; Blue
        Send !hfcm^{PgDn}!r
        Send % RGB[1]
        Send {Tab}
        Send % RGB[2]
        Send {Tab}
        Send % RGB[3]
        Send {Enter}{Right 1}
        GoSub, ^!a
    return
    }
    {
    ^!c::
        RGB := [91,155,213] ; cyan
        Send !hfcm^{PgDn}!r
        Send % RGB[1]
        Send {Tab}
        Send % RGB[2]
        Send {Tab}
        Send % RGB[3]
        Send {Enter}{Right 1}
        GoSub, ^!a
    return
    }

^!a::Send !hfca ; automatic color (i.e. reset font color to "none")

; #IfWinActive ; ------ end of section restricted to specific window
}

Espero que seja útil para alguém.

Responder3

Eu tenho a versão sueca doOneNote2016, então este é o "código" que usei no AutoHotKey (já que os comandos-chave são diferentes da versão em inglês do OneNote). Parabéns ao miroxlav que me deu a orientação inicial em sua resposta, e acabei de adotá-la para a versão sueca do Onenote2016

^!p::Send, !wfel^{PgDn}!r167!ö21!b157{Enter} ; purble (167, 21, 157)
^!r::Send, !wfel^{PgDn}!r255!ö0!b0{Enter} ; red (255, 0, 0)
^!b::Send, !wfel^{PgDn}!r0!ö0!b255{Enter} ; blue (0, 0, 255)
^!g::Send, !wfel^{PgDn}!r0!ö135!b0{Enter} ; green (0, 135, 0)
^!a::Send, !wfea ; automatic color

.. então o que você tenta é pressionar "Alt" quando estiver na sua nota e ver quais letras aparecem para entrar no menu onde você muda sua cor. Se necessário eu poderia fazer um pequeno vídeo de como fazer isso. Estou absolutamente perfeito agora que funciona!

informação relacionada