10.5: Make CopyPaste-X work in all Spaces

Apr 15, '08 07:30:00AM

Contributed by: ptejad

The problem is that when CopyPaste (from Script Software) launches, Spaces is already running, and somehow does not allow CopyPaste on all Desktops. You can substitute this AppleScript at login to make things work correctly:

tell application "CopyPaste-X" to launch
delay 20
tell application "System Events" to tell spaces preferences of expose preferences
  set app_bindings to application bindings
  set |com.peter_hoerster.copypaste| of app_bindings to 1
  set application bindings to app_bindings
  set |com.peter_hoerster.copypaste| of app_bindings to 65544
  set application bindings to app_bindings
end tell
Here's how to implement it:
  1. Open Script Editor, paste the above script, save it as an Application
  2. In CopyPaste's Preferences, disable launch at login
  3. Open the Accounts System Preferences panel
  4. Remove CopyPaste from Login Items
  5. Add your saved script to Login Items
  6. Logout, and back in to see it work
Note that there is a 20 second delay to allow CopyPaste to be fully launched before "re-Spacing" it. Also note that this script can be modified for any program; just replace the com.peter_hoerster.copypaste BundleID with the one from your desired program.

[robg adds: I haven't tested this one.]

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20080409155637247