Skip to content

Instantly share code, notes, and snippets.

@RataDP
Last active May 10, 2016 08:25
Show Gist options
  • Save RataDP/c4f42e068194a74c27f978bc29f86c4d to your computer and use it in GitHub Desktop.
Save RataDP/c4f42e068194a74c27f978bc29f86c4d to your computer and use it in GitHub Desktop.
[PS1] Change the active windows every X secons. Toogle windows
powershell.exe -windowstyle hidden -File "where_the_script_is.ps1" REM Open the powershell in hide style
pause REM To close the cmd windows
<#
@description: Script para ejecutar un ALT+SHIFT+ESC para cambiar a la última
ventana activa. Este comando se ejecutará de forma infinita y cada x segundos
indicados en la línea 14.
@author: Borja Blasco < bblasco@720tec.es >
@version: 1
@lastRevision: 6/05/16
#>
[void][reflection.assembly]::loadwithpartialname("system.windows.forms") # Para poder usar esa biblioteca
Do {
Start-sleep -Seconds 10 # Sleep de 10 segundos
[system.windows.forms.sendkeys]::sendwait('+%{ESC}') # Mandar ALT+SHIFT+ESC
} while (1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment