How to transfer styles between computers

User avatar
Site Admin
Posts: 20775
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall

Sat Sep 23, 2006 1:09 pm Post

Thanks to mms for this one. If you use text styles a lot, you will probably want to transfer them between machines along with your project at some point if you use more than one machine.

mms had this problem recently and was kind enough to e-mail me a solution, which I paste below for anybody else who has the same problem:

I've ended up writing a couple of applescripts to drive shell scripts to automate the process... This applescript to get the styles out to a file on the desktop:

do shell script "defaults read -g NSFavoriteStyles

The resulting file created on the desktop then needs to be transferred to
the desktop of the computer onto which you want to transfer the styles, and then you run an Applescript on the second computer like this:

do shell script "thestyles=\"$(defaults read ~/Desktop/stylesbackup)\";
defaults write -g NSFavoriteStyles \"$thestyles\""

Though probably the latter would ideally be something like:

do shell script "bash; thestyles=\"$(defaults read
~/Desktop/stylesbackup)\"; defaults write -g NSFavoriteStyles
\"$thestyles\"; exit"

... to cater for people who (like me, before this whole sorry business
started) are running tsch rather than bash because they'd upgraded from
previous versions of OSX, and frankly have no understanding of what the
difference is.