Estou tentando ter um arquivo em lotes que minimize todas as outras janelas além dele mesmo
Você pode usar o nircmd de nirsoft para fazer isso.
Linha de comando:
nircmd sendkeypress rwin+home
Arquivo em lote:
@echo off
setlocal
nircmd sendkeypress rwin+home
endlocal
Notas:
- Coloque
nircmd
em algum lugar no seu PATH
ou use o nome completo no arquivo em lote.
Referência de Comando NirCmd - sendkeypress
sendkeypress [Keys Combination 1] [Keys Combination 2] [Keys Combination 3] ...
Sends one or more key press combinations to the system. The operating
system will behave exactly as the user really pressed the specified
keys combination.
The [Key Combination] parameter specifies a single key press to send
or a combination of a single key and shift/ctrl/alt/Windows keys,
delimited by '+' character.
The key in the [Key Combination] parameter can be specifed as numeric
virtual key code (For example: 0x2e for Delete key), or as one of the
following predefined values: a - z and 0 - 9 (for alphanumeric keys),
F1 - F24 (for Fxx keys), shift, ctrl, alt, enter, esc ,leftshift,
rightshift, leftctrl, rightctrl, leftmenu, rightmenu, spc (space),
down, up, left, right, home, end, insert, delete, plus, comma, minus,
period, lwin, rwin (Windows key), apps, pageup, pagedown, tab,
multiply, add, subtract, separator, divide, backspace, pause,
capslock, numlock, scroll, printscreen.
Fonte Referência de Comando NirCmd - sendkeypress
O que é o nircmd?
NirCmd is a small command-line utility that allows you to do some useful tasks without displaying any user interface. By running NirCmd with simple command-line option, you can write and delete values and keys in the Registry, write values into INI file, dial to your internet account or connect to a VPN network, restart windows or shut down the computer, create shortcut to a file, change the created/modified date of a file, change your display settings, turn off your monitor, open the door of your CD-ROM drive, and more...
Fonte nircmd
Aviso de isenção
Eu não sou afiliado com nirsoft de qualquer forma, eu sou apenas um usuário final do software.