The Finest Hand-Selected Downloads
Individually reviewed & tested
Store News

SendMessage 1.1.4 (64-bit)

Control applications from shortcuts or the command line

Rating:
(0)
Operating Systems:
Windows 7 (64 bit), Windows 8, Windows Vista
License:
Open Source
Developer:
Stefan Kueng
Software Cost:
Free
Category
Developer & Programming
Date Updated:
10 September 2013
Downloads To Date:
859
Languages:
English
Download Size:
263.00 KB

SendMessage is a tool for sending Windows messages to any window. It's oriented very much at developers, but has applications for regular PC users, too (so if that's you, skip the next paragraph).

If you're a developer, then the program makes it easy to test how your application responds to a particular message - WM_ENDSESSION, say - without affecting anything else. There's a list of common messages built in, or you can specify another; you can enter WPARAM or LPARAM values; then choose your target window from a list, click "SendMessage" and watch the results.

What you can also do, though, is automate the process by passing parameters from the command line, and that has all kinds of possibilities. It can crash your system if you send the wrong message, so save your work first, but then try this example.

SendMessage.exe /message:16 /processname:cmd.exe

Message 16 is "WM_CLOSE", and so this one command will close every open command window on your system. Replace "cmd.exe" with some other executable name and it'll close that, instead.

You can also close windows by their title, like so:

SendMessage.exe /message:16 /windowtitle:"Untitled - Notepad"

That command will close every open Notepad window where you haven't opened or saved a file. (Or it'll try, anyway - if there's unsaved text then you'll be warned, first.)

If you just want to shut down programs from a shortcut then there are easier ways to do it, of course - the Windows TaskKill command in particular. But the whole point of SendMessage is it can handle any Windows message, which gives it all kinds of possibilities.

To minimize a window, say, try this.

SendMessage.exe /message:274 /windowtitle:"Untitled - Notepad" /wparam:61472

To maximize it, use this.

SendMessage.exe /message:274 /windowtitle:"Untitled - Notepad" /wparam:61488

You can even simulate clicks in an application. The following will click the Play/ Pause button in Windows Media Player.

SendMessage.exe /message:273 /windowtitle:"Windows Media Player" /wparam:32808 /lparam:0

Okay, that might not be something you want to automate right now, but it is a good example of the possibilities.

If you want to know more, then the documentation for scripting tools like AutoHotKey can provide some clues.

Be very careful, though. Sending the wrong messages could make an application behave oddly, or perhaps crash your system. Don't experiment while you've unsaved work.
 

Your Comments & Opinion

Related Downloads Other Downloads From This Category

Wine lets you run Windows applications directly on your Linux desktop without needing an emulator.

Open Source

Wine lets you run Windows applications directly on your Linux desktop without needing an emulator.

Open Source

Arrange program windows on your desktop to enhance your productivity

Free, for personal-use only

Call Windows API functions from the command line

Freeware

Control applications from shortcuts or the command line

Open Source
43,089,690
Downloads
Secure & Tested Software
6,454
Reviews
Instant Download 24/7
312,735
Members
10+ Years of Service