Quake Style Powershell Console v2

Edit: Updated to fix a problem when there are spaces in the path where Console2.exe is.

I decided I would get this idea working again, when I did, it fell short a few times. I needed a few extra features:

  • Elevated Powershell Console
  • x64 Console
  • I wanted it to work without adding anything to the %path% environmental variable

The goal

win + `

=

Quake Mode Powershell

What you need

Instructions

  1. Download and install AutoHotKey (while you are at it, grab the autocorrect script here
  2. Download and extract Console2 x64 to a folder.
  3. Extract my script file into the same folder
  4. Make sure all files are unblocked (right click, properties, unblock if they are).
  5. Create a shortcut to QuakeMode.ahk in the Startup folder in the start menu

How to use

Press the windows key + ` (tilde, above tab) to activate the console. You will see a few command windows run, and you will be prompted to put in your password (or press yes) to elevate the process. If you have UAC disabled, turn it back on :P

powershellcommand-line
Posted by: Jake Ginnivan
Last revised: 09 Jun, 2011 02:37 AM

Comments

Vagner Aniceto
Vagner Aniceto
17 Aug, 2011 06:42 PM

Hi, Jake.

I did a modification to your script that brings back the focus to the last active window used before the console, improving usabilty:

IfWinExist ahkclass Console2Main { IfWinActive ahkclass Console2Main { WinHide ahkclass Console2Main ; need to move the focus somewhere else. ; so, let's try to bring it back to the last active windows IfWinExist ahkid %activeid% { WinActivate, ahkid %activeid% } ; otherwise we take a default action else { WinActivate ahkclass ShellTrayWnd } } else { WinGet, activeid, ID, A ; to get de id of the actual active window before we change it WinShow ahkclass Console2Main WinActivate ahkclass Console2Main } }

I hope you appreciate.

blog comments powered by Disqus