Wishful Coding

Didn't you ever wish your
computer understood you?

Excavator wheel base

Today I took out the RCX and made a wheelbase for the NXT excavator arm I made earlier.

I am satisfied with the look and maneuverability, the only problem remains where to put the RCX. Maybe I can put both the NXT and the RCX on the arm, or make some room in the wheelbase.

It will also be interesting to control the whole maschine. The NXT and RCX can’t really talk to each other, but both can talk to the computer over Bluetooth and Infrared respectivly. So maybe I wil make a command centre on the computer to control both devices.

[gallery columns=”2” ids=”423,424”]

Published on

Excavator

Today I spent some time building an excavator. I had to choose between controlling all parts of the arm and letting some parts move together mechanically.

I chose to do the former, which means I don’t have any motors left for the chassis, but can freely move all parts of the arm.

Maybe another NXT or RCX kit could serve as the base, which also needs 3 motors: 2 to drive and 1 for the rotating platform.

Published on

AppleScript tiling windows

On Linux I use all sorts of key combos to tile windows, even though I no longer use a real tiling window manager.

On Mac OS X my windows are still mostly stacked and all over the place in a big mess. Mac doesn’t even have a proper fullscreen button, other than you know… making it a space on its own.

I know there are tools to do the same thing in a more fancy way, but instead I wrote a few AppleScripts to split and maximise windows.

To use them, I placed them in my Scripts folder and enabled the AppleScript menu in the preferences of the AppleScript Editor.

AppleScript Editor preferences

tell application "System Events"
	set frontmostProcess to first process where it is frontmost
	set visible of frontmostProcess to false
	repeat while (frontmostProcess is frontmost)
		delay 0.1
	end repeat
	set secondFrontmost to name of first process where it is frontmost
	set frontmost of frontmostProcess to true
	set frontmostApplication to name of frontmostProcess
end tell

tell application "Finder"
	set screenSize to bounds of window of desktop
	set screenWidth to item 3 of screenSize
	set screenHeight to item 4 of screenSize
end tell

tell application frontmostApplication
	set bounds of the first window to {0, 0, screenWidth / 2, screenHeight}
end tell

tell application secondFrontmost
	set bounds of the first window to {screenWidth / 2, 0, screenWidth, screenHeight}
end tell
tell application "System Events"
	set frontmostProcess to name of first process where it is frontmost
end tell

tell application "Finder"
	set screenSize to bounds of window of desktop
end tell

tell application frontmostProcess
	set bounds of the first window to screenSize
end tell
Published on