I designed spooky for me and my personal use. If you like the program, use it. Feel free to copy and adapt this script to your need - but please don't give it away without the little readme.txt.


Spooky is a an AppleScript, designed to give you the ability to handle front window size and position with your keyboard by using shortcuts to the script. You need another program like Butler or QuickSilver to do this. Spark is another hotkey starter.

You can resize your front window

You can move your front window

Furthermore you can grow or shrink your front window size to some special values. The window size will be set to the next bigger or smaller size

By the way: you can set the resolution ratio in the script to 4:3, 16:10 or any value you like, so that it is possible to get any window size you like.

If your dock is visible, its space will be reserved.

If you don't like the window fit till the border of the screen you can set a margin for the four sides of the screen (one for all).

spooky has an undo-function, which means, that if you e.g. maximize a window and "maximize" it again, it will resize to its original size and position. This works with every action except growing and shrinking your front window. The undo does not depend on the time between restarting the same action - only the window action and size is responsible. Have a try. Undo will slow down the speed of the script - so it is off as default. Set it to on in the scriptcode.

There are two shell scripts in spooky. spooky runs faster, if you set the two values derived by the shell scripts by hand: the screen resolution and the visibility of the dock. There are comments in the scriptcode "SET BY HAND ...".

If you don't like (this) script or this is to complicated to you, try GeekBind - a cocoa application for window movement and resizeing of the front window. If this is unavailable try the search function on http://www.sourceforge.net


spooky is a set of the following files - you can store them wherever you like.



First of all you must enable "access for assistance devices" - without this the script won't work (this is for GUI scripting). Go to your system preferences and klick on "Universal Access" (the little white man in the blue circle :-) and enable "access for assistance devices".

Alternatively you can try the script "spooky - test GUI scripting" - it will test and guide you through the process.


Zuerst muss der "Zugriff fuer Hilfsgeräte" aktiviert werden, sonst funktionieren die Skripte leider nicht. In den Systemeinstellungen findet sich dies unter "Bedienungshilfen" (das kleine weisse Maennchen im blauen Kreis :-). Ganz unten ist die gesuchte Option.

Alternativ kann man auch das Skript "spooky - test GUI scripting" verwenden - es testet die Option und Öffnet bei Bedarf die Systemeinstellungen.

both languages

Start the "spooky starter.scpt" script with the action you like (choose it within the script by uncommenting one line in the script). For the first time spooky starts it will ask you where you stored "spooky.scpt". Choose the script "spooky.scpt" - its path will be stored in a preference-file in ~/Library/Preferences/net.doernte.spooky.plist (your personal preference-folder). For the next time starting spooky with the starter-script the path will be read out of the preference file.

Using the script with hotkeys

Best you run the scripts within Butler or QuickSilver with a Hotkey (Spark is a good hotkey-starter too).

There is only one script "spooky.scpt" with all 20 actions in it. Then there is a second script "spooky starter.scpt" to start the wanted action. You must make a copy of the starter-script for every action you want need. Start the starter-script with a hotkey.

Then you have to choose the action at the beginning of the starter-script by uncommenting (and activating) the action you like the script to do.

Then you can asign hotkeys to the starter-scripts. A good idea is to assign the keys of your numberpad like

On an iBook, Powerbook or MacBook (Pro) try the "num-keys" of the keyboard


Mac OS X 10.4 Tiger (testet)

But the script should work with other Mac OS X versions too - please tell me.


The scripts won't do anything.



The scipts won't work with program xyz
Todo and known problems

Please send me a mail, if there are incompabilities or problems: doernte@gmx.de.

Do the same if you have any idea to optimize the script or to enhance its features.

Tell me about programs which doesn't work with these script.

History & What's new in this Version

Version 1.6.1 - 6-2006

Add comments to the script, where you can change something to run the script faster.

Version 1.6 - 5-2006

spooky can use standard zoom and unzoom function (green button on window top). Add functionality for Excel and PowerPoint.

Version 1.5 - 5-2006

spooky has an undo. If you start an action twice, the window will become its old position and size (except the actions "grow" and "shrink").

Version 1.4 - 5-2006

spooky has a starter script, so that the usability of the script is much better. "spooky.scpt" is the script with the function and "spooky starter.scpt" is the script, that will start the wanted action.

Version 1.3 - 5-2006

Now there is only one script - but with the full functionality (I learned how to use handles in AppleScript). Now you can choose the action of the script at its beginning by activating its action. This is a great job for maintenance of the script.

Version 1.2 - 5-2006

You can choose the windows ratio when you grow or shrink the front window. Choose any value you like, try 16:10 - or 4:3-sized windows. Set it manually at the begin of the scripts "window grow" and "window shrink" (since Version 1.3 there ist only one script - you can set the ration at the beginning of "spooky.scpt"). For better maintenance these values are at the beginning of every script - but with no functionality.

Version 1.1 - 5-2006

You can set a margin between the windows and the border of the screen, so that there is a little space between the windows and the screenborder. Set it manually at the begin of each script.

Version 1.0.1 - 5-2006

More move and max possibilities: You can move to the four edges and to the four sides of the screen. You can maximize to the four edges and to the four sides of the screen.

Version 1.0 - 5-2006

Same functionality - but easier code.

Version 0.2 - 5-2005

Even Word does its job :-)

Version 0.1 - 5-2006

First working scripts - only Word doesn't work :-(

How much does it cost?

Nothing, Spooky is completely free for personal use. If you use these scripts in a commercial environment, please contact me.

Allthough writing these scripts is fun to me, I would be a happy man, if you honor my work. It took me hours of thinking and testing to wrote these spripts. If everyone who likes - an uses - these scripts very much, donates just 1 Euro or 1 $, I hopefully will get rich :-).

Send your Paypal donations to doernte@gmx.de.


These scripts were inspired by the small free Microsoft Windows-program FreeSnap. There is no Mac-version, so I wrote a this AppleScript based on a script from Michael Bach - found on www.apfeltalk.de.

Rights/Law - don't know how to name this

I am not related to Blue Onion Software, Microsoft or Apple, I'm just a user and I don't want to offend against any rights of these companys and there trademarks - please tell me if I do so.

Butler, Quicksilver and Spark are just programs I had heard of (I use Butler - greetings to Peter Maurer :-) - I am not related to the authors.

My english is full with germanisms (I like this word - does it excist?) - I hope you understand, what I like to say.
Home    Über mich    Mathematik    Physik    Informatik    Software    Links    Kontakt