VMware Capitalization

So we all know that you write VMware with a capital VM and lower case ware. At least you know now. I was talking with a co-worker today and they mentioned that it made them twitch when it wasn’t right. Now don’t get me wrong here I’m particular about a lot of things. As my friend Sean would say its CDO not OCD. Must be alphabetically sorted. I’m the same way. But making someone twitch is also a lot of fun.

Enter my new VMware Typer app:

Haven’t you always wanted a way to do random capitalization of VMware at the click of a button? Well I hadn’t but I do now. It’s been a while since I’ve built a windows app. Figured it might as well be a c++ or c# app since I don’t really know either very well. Learn something new and all. I was going for simple so SendKeys seemed like an easy way to get things done. What I ended up with is an app the uses ALT+TAB to switch back to the last window and then send vMWare with random caps. It uses an always on top form so as long as it’s running you can press the button. I probably should have used activate window and watched for the last used windows. Would have been much more deterministic but I’m lazy.

I used the generated code in Visual Studio for everything except the button click event:

//Switch To Previous App
SendKeys::SendWait("%{TAB}");
Thread::Sleep(500);
//Random 0 or 1 for upper/lower
Random^ rand = gcnew Random();
if (rand->Next(0, 2) == 0) {
	SendKeys::Send("V");
}
else {
	SendKeys::Send("v");
}
if (rand->Next(0, 2) == 0) {
	SendKeys::Send("M");
}
else {
	SendKeys::Send("m");
}		if (rand->Next(0, 2) == 0) {
	SendKeys::Send("W");
}
else {
	SendKeys::Send("w");
}		if (rand->Next(0, 2) == 0) {
	SendKeys::Send("A");
}
else {
	SendKeys::Send("a");
}		if (rand->Next(0, 2) == 0) {
	SendKeys::Send("R");
}
else {
	SendKeys::Send("r");
}		if (rand->Next(0, 2) == 0) {
	SendKeys::Send("E");
}
else {
	SendKeys::Send("e");
}

SOOO many better ways to do this but it works so I’m done. Now whenever I need to type VMwARe in the chat I just click the button. vmWArE vmwAre VMWArE vmware vmWarE vMwArE VMWArE. You get the idea.

https://github.com/khensler/vmware-typer/

The binary is out there as well. You probably need some sort of dependencies to run it. I don’t know I’m not a Windows developer.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: