Measuring on-screen pixels

There are times when measuring pixels on-screen may be useful. This is especially true when following redline specifications (just make sure your browser zoom is set to 100%). There exist many free tools to aid in this task, and this SuperUser thread lists many of them. Luckily for you, I’ve tested most of the utilities proposed in the thread and the winner is… Cropper !

Image

Even though it’s a screen capture utility, it works very well for pixel measuring. Some of its useful features (the full list appears on their site):

  • Always On Top
  • F8 Show the main form
  • Arrow keys Nudge the main form one pixel (hold Ctrl for 10 pixels)
  • Alt+Arrow keys Resize the main form one pixel (hold Ctrl for 10 pixels)

When you need that extreme precision, you can use it in conjunction with the Windows Magnifier:

  • Win + ‘+’ Magnify (will also open the magnifier if not already open)
  • Win + ‘-‘ Reduce
  • Win + Esc Close Magnifier

An honorary mention goes to Meazure. It is an excellent choice if you prefer a more verbose, extremely detailed UI with many features.

Image

There are also various browser extensions that offer similar functionality, but a global tool is obviously better (I actually didn’t like any of the extensions I tried regardless).

Introducing TvGameLauncher

EDIT – check out TvGameLAuncherGUI!

I recently blogged about Playing PC games on your HDMI-connected TV, and I mentioned a couple of programs you could use to get the job done, along with a couple of batch files you could whip up to ease the process.

Secretly though, I knew it wasn’t enough. So I wrote TvGameLauncher to take care of everything for you (including something I forgot – preventing computer sleep). Everything is now done automatically in one fell swoop.

For example, in order to run ioquake3 on your TV, you could run a command such as TvGameLauncher.exe -t -h 2 -s 0 -e “F:Gamesioquake3ioquake3.x86.exe”

And in order to run Hotline Miami (through Steam): TvGameLauncher.exe -t -h 2 -s 0 -l steam://rungameid/219150 -e HotlineGL.exe

Again, thanks go to Dave Amenta and Michael Welter for their useful utilities that made this possible (EDIT – TvGameLauncher now utilized NirCmd instead – thanks Nir!)

I have some ideas for improvements, but this should suffice for now.

Enjoy!

Image

Playing PC games on your HDMI-connected TV

Many people have a TV connected to their computer via HDMI as their secondary monitor. It is very convenient for HTPC usages, but playing games on the TV can be nice as well (especially when you have a gamepad connected).

The trouble is, most games will only run on the primary monitor, and the only way to get them to run on the TV is to make it the primary monitor. Windows makes this rather easy, but still, doing it manually each and every time before playing can be cumbersome. Fortunately, Michael Welter comes to the rescue with W7ToggleDisplay, a simple command-line tool that does the switching (don’t worry about the name, it works on Windows 8.1 as well). Simply run w7toggledisplay.exe /primary to make the switch.

Another annoyance is in the audio department. Presumably, when you play a game on the TV, you want the audio to come out of it as well (be it through its speakers or through some audio system connected to it). Since HDMI can carry audio, the easiest thing to do is switch the default playback device to the HDMI audio device. Again, this is easy enough to do but a nuisance to do every time. Fortunately, Dave Amenta created AudioEndPointController, a command-line tool that switches playback devices (even though the post mentions Windows 7, I’ve used it on Windows 8.1 without a hitch). First run EndPointController.exe and note the number identifiers for your regular and HDMI audio devices (the X in Audio Device X:). Then Run EndPointController.exe X where X is the number of the device you want to switch to.

Putting it all together

Now that we have all the prerequisites, we can create the following batch file to switch primary monitors, switch to HDMI audio output, run the game, and finally when the game is over switch everything back:

EndPointController.exe X
w7toggledisplay.exe /primary
Game.exe
EndPointController.exe Y
w7toggledisplay.exe /primary

Where X is the ID of your HDMI audio device, Y is the ID of your regular audio device, and Game.exe is the executable of your game.

Steam

Unfortunately, the above won’t work for Steam games, since they are not launched directly via their executable. Instead, they are launched via a special protocol that looks like steam://rungameid/219150. You can replace Game.exe above with start steam://rungameid/X where X is the steam ID of your game (as it appears in the original shortcut). This will launch the game, but the trouble is it won’t wait for the game to quit, switching the audio and display immediately back (the /wait switch doesn’t help). I haven’t found a way around that (if anyone is aware of one I’d be happy to hear), so for Steam games I use two batch files. One to switch primary display and audio, and run the game:

EndPointController.exe IdOfHdmiAudioDevice
w7toggledisplay.exe /primary
start steam://rungameid/SteamId

And then another script to toggle everything back (I give it a shortcut so I don’t have to find the icon on the TV every time):

EndPointController.exe IdOfRegularAudioDevice
w7toggledisplay.exe /primary

Happy gaming !