Radomír Měch| Adobe
Overview
Photoshop CS6 contains five scripted patterns that can be accessed by right clicking on a path, selecting Fill, or by selecting Fill from the Edit Menu. Once you have the fill dialog box you choose Pattern in the Use selection box, and check the checkbox Scripted Patterns:

Here are examples of patterns generated by scripted Deco pattern fills in Photoshop CS6: Brick Fill (a), Cross Weave (b), Random Fill (c), Spiral (d), and Symmetry Fill (e).

Under the hood
Photoshop CS6 includes five JavaScript files that define five distinct patterns. These patterns are executed by the Deco framework, which is a scriptable environment that is tailored for creating procedural patterns. These five JavaScript files are located in the following directory:
Windows 32 bit:
Program Files (x86)\Adobe\Adobe Photoshop CS6\Presets\Deco
Windows 64 bit:
Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Presets\Deco
Mac:
/Applications/Adobe Photoshop CS6/Presets/Deco
It is possible to create new patterns by defining new scripts and placing them into the directories above. The Deco script file acts as a pattern preset and when a new file is added to these directories, the name of the file appears in the Scripted Patterns pull-down menu and the pattern is ready to be used.
Where to get new patterns
There has been a vibrant community of users already at the pre-release forums. A few users created new scripts and some managed to cleverly combine regular Photoshop scripts with Deco scripts to extend the functionality of the feature. For example, Chuck Ubele created a Photoshop script that provides a rich menu of options for the shipped Deco script and one new script (see his website). Others then created beautiful patterns using these new scripts.
For now you can dowload new scripts at the end of this page or from the forum http://forums.adobe.com/community/photoshop/photoshop_scripting.
Once you dowload a script, place it to the directory listed above. The file needs to have the extension jsx. You may have to make the directory writeable to do be able to copy the file there. Depending on your version of Photoshop the new fill (with the same name as your script file) will appear in teh pull down menu for scripted fills either when you open the Fill panel or after you restart Photoshop.
Where to meet other users interested in scripted patterns
The topic related to Deco scripted patterns are discussed in the Photoshop Scripting forum: http://forums.adobe.com/community/photoshop/photoshop_scripting
How to create your own scripted patterns
You can download a documentation on writing your own Deco scripts below. Feel free to contact Radomír Měch or ask other users in the forum. Don’t forget to share your scripts or the resulting patterns! Have fun!
Deco Scripted Patterns
These scripts should be placed to Presets directory, listed above. Please save them with a jsx extension (select Save As in the browser - in the menu or right click on the link, select type All Files and add the .jsx to the file name - Firefox does better job at it than Internet Explorer). New fills will appear in the Fill palette pulldown menu:
Photoshop Scripts Combined with Deco Scripts
These scripts were created by Richard Y. Kain. They combine a regular photoshop script that defines a user interface and a deco script that then defines the resulting pattern using the input from the regular script.
Photoshop Script Providing UI for Shipped Scripts
This is a regular Photoshop script that enhance enhance the functionality of scripted patterns. It can be placed anywhere and then it should be executed using File->Scripts->Browse.
Documentation