Bringing system Windows to front

OK, just uploaded a macro/script to reposition and resize the macOS Character Viewer.
I note that you are not running the English language of macOS, so you may need to translate/revise these statements in the script:

  tell application "System Events"
    
    set oWin to {}
    set oWin to window "Character Viewer" of application process "CharacterPalette"
    if (oWin = {}) then error "Character Viewer Window is NOT open"
    
    tell oWin
      set oPos to position
      set oSize to size
      
      --- CHANGE Window Position and Size ---
      set position to winPos
      set size to ptyWinSize
      
      perform action "AXRaise"

These lines may need changing for your language:

  tell application "System Events"
     set oWin to window "Character Viewer" of application process "CharacterPalette"
    if (oWin = {}) then error "Character Viewer Window is NOT open"
      perform action "AXRaise"

Here's my macro:

MACRO: Set Position and Size of macOS Emoji Character Viewer [Example]

Please note that you will first need to manually open the Character Viewer window.
I have not been able to find a reliable way to do it by script. You might be able to do it using KM Found Images.

Let us know if this works for you.

1 Like