Weave Silk, scripting, and vanity website headers
Weave Silk is amazing.
But I wanted more. I wanted to write my name in Weave Silk for a personal website I’m putting together. After trying to write it out manually and not being happy with the results (colors were never what I wanted them to be, my hand couldn’t stay steady for long enough, I would miss time the wind) I decided to look into the source code, even though I barely know how to write a “hello world” program in JavaScript. Obviously that failed nearly instantly. I’m sure I could go through it and do what I want to do, but that might take days or longer.
Enter: The Lowly AutoHotkey Script. (see below for a video of the script in action)
I use these as a last resort (usually in Excel) when deadlines are fast approaching. Compared with Ruby, or even VBA, AHK scripts are a source of constant surprise.
I’ve always needed to riddle my code with “sleep 10” just to get the most basic key presses to work reliably. The script tries to execute so fast that either my OS or the application I’m using doesn’t register the scripted key strokes.
Also, in certain cases, there is just no way of using a variable where you want to. Rather than setting variables as being accessible by prefixing them with an “@” or “@@” as in Ruby, you need to invoke the keyword “global” within the function you want to call the otherwise inaccessible variable. But in predefined functions it raises an error when you call “global” so you are out of luck. I’m sure that somebody somewhere knows how to do it, but I’ve googled around enough to give up trying to solve that problem.
Anyways, here is the video of the script at work!
http://www.youtube.com/watch?v=bUr_rZMY61A
If you’re struggling with an AHK script and want to give me a shout feel free to email me: zachaysan@gmail.com