Archive for the ‘“how to”’ Category

Getting Started with Photoshop CS2 Scripting

September 18, 2005

I am finally getting back to revisiting Photoshop Scripting. I beta tested with Photoshop CS and wrote tons of scripts. Things have changed in CS2 but for the better :)

New features in CS2 scripting:

  • File Includes
  • Self Contained Scriptlet (New File extension)
  • Script Events

It is a one liner to include files in your CS2 script.

//Global contants or variables can be defined in another file.
//This line should go before any code that will execute methods.
// @include "YourFileToInclude.jsx"

The self contained scriptlet is also a one liner.

// This enables double clicking on the Mac OS or on Windows
// This line of code should be first if you want your script
// to be a self contained scriptlet
#target photoshop

The Scripting Events feature is not so much about coding but more about executing scripts when a given event happens within Photoshop CS2. Let’s say I always want a specific size of document, specific font selection, specific ruler units, and specific font color selected whenever I create a new document. I can write a script that will execute on CS2′s New Document Event. (That is another how to).

Sharing the iTunes Music Folder between Multiple Users under OS X

July 2, 2004

Overview:

I wanted to have a common iTunes library between user accounts on the same machine to make life a little easier (my iLife that is). This feat is very easily accomplished by changing the iTunes Music folder location for all User Accounts to point at the same directory. The directory can be anywhere that a folder can be placed. I have a self-powered external Lacie firewire drive where all my machines music is stored.

Setting up the Master folder:

  1. Decide where you want to have your music stored. You can either create a new folder, or you can also use an existing folder, in which case you don’t do anything for this step.
  2. From the iTunes Application menu select preferences, select the Advanced Setting screen by clicking on the gear icon at the far right.
  3. The iTunes Music folder location path can now be viewed. It can be changed by clicking the Change… button and navigating to your folder of choice.
  4. Repeat the above steps for all User Accounts.

Setting Folder Permissions:

  1. From the Finder, select your new iTunes Music folder and choose Get Info (Command > i ) from the File menu.
  2. From the Info window, click the delta next to the Ownership & Permissions category. Then click the delta next to Details.
  3. You will have to be the owner of this folder or have Admin privileges to make changes.
  4. Click the padlock icon to unlock the detail menus.
  5. Change the Group menu to guest.
  6. Change the Access and Others menus to Read & Write.
  7. Click the padlock icon to lock the details menus and close the info window.
  8. The iTunes Music folder can now be accessed and written to by all User Accounts on your macintosh.

User Workflow:

Users now only have to update their own iTunes library when they know another User has added songs to the Master library.

Do the following:

  1. From the iTunes File menu, select Add to Library… (Command > o), and navigate to the Master iTunes folder. Then click the Choose button to update your library.
  2. Your iTunes library will be updated with any new songs within your master folder. This includes any music located in directories within the master folder. iTunes will not add songs that have already been added in the past.

Why is this a good solution?

Apple gives us the ability to share our music with Rendezvous but other User Accounts can view the music only if the other User Accounts are logged on at the same time. The users that are logged on also have to be running iTunes. The Music sharing Apple provides is also read only to the other accounts that you are allowing to share your music.

The solution above takes care of all these shortcomings.