Douglas Gaskell

Month: August 2015

Using MahApps To Improve My WPF Visuals

After making my login helper, I realized that it looks pretty crappy. It may  have the behavior I want, but no one it going to look twice at an application that appears to have come from the Windows 98 era. I searched around for a solution, and decided to go with a Metro design. There are a ton of different frameworks for metro-like applications, however MahApps seemed like the best choice for me.

The Setup:

First things first, get the Nuget package via:  Install-Package MahApps.Metro -Version 1.12  this will install the current (as of today) stable release. For more release info go here.  Getting the ball rolling with MahApps is hilariously simple, they have a quickstart guide on their site here that walks you through making your first metro window. Actually, their entire site details most of the frameworks features. I don’t need to tell you how to set this up, just refer to their quickstart as well as their controls guide for that!


So I went ahead and stayed up till 4:00 A.M. and made my application look a LOT prettier than it was before. I also played a bit with XAML animations to produce this effect for my password popup:


Here is a .gif of the new application look: websiteLogins2

I’m happy with the results

Logging Into Websites Programmatically

I recently started a new job providing low-level support for a startup food delivery company.  During my first couple weeks I noticed a small inconvenience that stemmed from the companies disorganized structure.  We have 1/2 a dozen tools and sites that we need to log into when our shift starts, each one requires you to type in your very lengthy company email and password.

Now you may be thinking “wow, 6 logins, no big deal”, but think of it in terms of wasted time. If you have 30 people spending 5 minutes of their day logging into their tools, that’s 2.5 wasted man hours every morning. Not to mention how annoying it is for everyone involved to type out the same login over and over at the beginning of each day. I decided it was my time to shine, put some of my novice programming skills to the test. I went home that night and started working on a WPF application to automatically log into these sites, it only requires you to type in your password each morning.

Most of my coworkers use the same password for all their tools, this means I only need them to type in their password once. For sites they use a different password on, I can just include an option to type in that sites unique password before login. So I’ve figured out what I want to do, now how am I going to actually accomplish this?

If we used Internet Explorer, this would be a piece of cake and I could have just created a PowerShell script to log everyone in, but we use Chrome. This really throws a wrench into my plans, I need to figure out a way to programmatically manipulate Google Chrome into logging into these sites for me. After a little research I stumbled upon Selenium, a library designed to use Web Drivers made for various browsers to programmatically simulate a users input. I wanted to use it for Chrome, according to the documentation this meant I needed to get my hands on the ChromeDriver, an open source Chromoum project.

After many days, lots of research (nearly 400 google searches in 1 week), hacked behavior, and frustrating dead ends. I finally created an application that will log you into almost any website.

Here is a .gif of it in action:



I’ll be making a multi-part post with a general overview of how to make this soon!


© 2017 Douglas Gaskell

Theme by Anders Noren edited by Douglas GaskellUp ↑