Wednesday, January 31, 2018

SprintDLL - v1.1

Today I made a few small improvements to SprintDLL. I noticed while testing some example scripts that supplying both the type and unit for a size caused a parse error. Apparently I forgot a SkipWhitespace() call, so the parser got a blank where it was supposed to get a comma or a size modifier. I fixed that oversight, so allocsize ... as ... in ... now works as intended.

Next, I added an "instruction" called // that does absolutely nothing, so starting a line with that makes it a comment. Due to how line parsing works, including a semicolon on a comment line (like any line) will start a new instruction, so it's not currently possible to have semicolons in comments.

Finally, I realized that it might be helpful to have a SprintDLL run return information to a script written in a different language. Therefore, readslot's "The value in slot name is value" could be cumbersome. readslot now has a /raw switch that causes it to only print the value on its own line.

These changes are live on GitHub and released as v1.1.

Tuesday, January 30, 2018

ODBC connection string for an SQL Server database

Today I needed to get an ODBC application to connect to an SQL Server database. Getting the connection string right was a bit tricky. This is what I ended up with:
Driver=SQL Server;Pooling=false;Server=.\SQLEXPRESS;Data Source=.\SQLEXPRESS;Uid=myUsername;Pwd=thePassword

The important parts are the Driver and the Server. This only works for databases running on the same machine as the client program - I haven't yet worked out how to cross the network.

Monday, January 29, 2018

Getting the download count for GitHub release binaries

Now that I'm using GitHub release management for SprintDLL, I'm curious about how many people are downloading it. I don't know of a nice GUI way to figure that out, but the GitHub API exposes it. It, along with a lot of other information about the repository's releases, is accessible via a simple GET request, so it can be seen in a normal web browser:

https://api.github.com/repos/Fleex255/SprintDLL/releases

The relevant part is the download_count property of the objects in the assets array of a release object. Using the release ID, the query can be refined a bit to include only the asset information from that release:

https://api.github.com/repos/Fleex255/SprintDLL/releases/9410477/assets

Sunday, January 28, 2018

Removing a provisioned Windows Store app from all users

One user wanted to know how to uninstall a specific Windows Store app that was provisioned for all users, removing it from all user profiles. As some of the articles they found mentioned, Remove-AppxProvisionedPackage is the relevant cmdlet. In particular, the -AllUsers switch will do the job. The full command the user needed is:

Remove-AppxProvisionedPackage -PackageName $pkgName -Online -AllUsers

Saturday, January 27, 2018

FMod - Settings dialog done

Today I finished implementing Abiathar's new settings dialog, which consisted of writing the color editor, laying out the Advanced tab, and adding the code that actually loads and saves the configuration.



The Colors tab shows the current color in the panel at the top. It renders a black and white checkerboard behind the color to demonstrate the level of transparency.

Friday, January 26, 2018

SprintDLL live on GitHub

I finally decided on a name for the perpetually untitled P/Invoke command-line utility: SprintDLL. (This is because it's an improvement over the Windows rundll32 utility, and sprinting is an improvement over running, at least in terms of getting to places fast.) I found a Super User question that would be perfectly solved by the tool, so I quickly published to GitHub and created a release. The only code change is the addition of an about instruction that prints the program name, my name, and the GitHub repo link.

Now I should probably document the syntax.

Thursday, January 25, 2018

FMod - Color editor designed

For a while, I pondered how to lay out the UI for the colors section of Abiathar's new settings window. At first I considered having a repeating group of controls, but that would be a lot of controls total because there are several parts to configure each color (hex entry, color picker button, preview, and opacity slider). Instead I decided to go with a single group of controls and have it apply to whichever color the user selects from a list of configurable colors. It might be possible to do some custom painting of the list box to show a preview of every color without making the user click on one to see it, but that's optional.