VBA: What? Just… What?

whatisthismadness

I know shockingly little about Excel. And that is somewhat unsettling because most of my jobs, which I depend on for food and rent and coffee, require a fuck-ton* of spreadsheets.

In the interest of keeping myself rolling in coffee grounds, I’ve made myself sludge through VBA tutorials this weekend and put together a few lines that’ll transfer a cell from one workbook to another.

*Is fuck-ton hyphenated?

Continue reading “VBA: What? Just… What?”

Scheme: How to Loop GIMP Functions

happynewyear

For my first script of the new year, I started learning an entirely new language for an entirely different program that has resulted in my enduring a genuinely disturbing number of migraines over the last few days.

Tangential Warning: I don’t recommend scheme for beginners. I wouldn’t recommend it for any living creature because scheme is a monumental asshat of a language. It demands that you restructure the way you write math. Who the HELL decided THAT was a good idea? Oh, everyone in the world is accustomed to writing 2+2? Fuck those bastards, we’re going to force them to do +2 2 because programming is SUPPOSED to be confusing. And just to make it extra fun, EVERYTHING needs to go in parentheses. That way, even if the morons manage to get the expressions figured out, they’ll still have to spend HOURS guessing where the missing ) needs to go.

Continue reading “Scheme: How to Loop GIMP Functions”

AHK: How to Loop Code through Images

Need to make changes to every pixel in an image? As it turns out, that’s not so difficult with AutoHotkey. From what I’ve been able to gather, all you really need is the height and width of the picture so that the loop knows how many times to run and the XY coordinates of the picture’s upper left corner.

The Code

Note that CoordMode, Pixel, Screen tells the computer to use the XY coordinates relative to the screen rather than the window.

CoordMode, Pixel, Screen

Height:=Height of the Image
Width:=Width of the Image
Xaxis:=X-Coordinate to start at
Yaxis:=Y-Coordinate to start at

loop, %Height%
{
loop, %Width%
{

Do This Code, Xaxis, Yaxis

Xaxis++

}
Xaxis:= Xaxis-Width
Yaxis++
}

How the Loops Work

Continue reading “AHK: How to Loop Code through Images”