Sg2.9
News
Recent RSS
From:  Jürg Lehni
Date:  3. December 2010, 16:25

Version 2.9.070 just landed, fixing a row of nasty bugs that were introduced by the recent coordinate switch, but also adding a row of great new features, mostly related to the User Interface.

Interface Changes

It is now possible to navigate through the Scriptographer palette using only keyboard short-cuts, increasing the hacker-friendliness of the plugin a lot. When in the list of scripts, the arrow keys navigate the tree list of folders and files in the same way as we are used to for example from OS X's Finder: Up and Down navigate to the previous / next item in the list, while Left and Right collapse and expand folders. Hitting Enter then opens the currently selected script in the script editor of choice, and Cmd-E executes the script. New scripts can be created using Shift-Alt-Cmd-E, and all running scripts can be stopped using Cmd-., even when the interface is unresponsive due to a running loop. If you forgot about these short-cuts, just hover over the buttons in the palette to see them again.

So why don't you download it straight away and play around with the new features. And if you are curious, here a mini change-log for the most important changes and bug fixes.

Change-log

  • Fix coordinate system adjustments when working with gradient colors
  • Fix coordinate system related crash on CS3
  • Fix coordinate system adjustments on CS2
  • Correct matrix orientation of PlacedFile, PlacedSymbol and Raster objects
  • Fix update flicker when modifying TextItem objects.
  • Cause screen redraw in tools when new items are created already in onMouseDown, not only when the first onMouseDrag happens.
  • Fix issue in Console where document would not point to the currently active document.
  • Change short-cuts to not collide with internally assigned ones for tab-switching.
  • Fix 'Unknown error' exception in Dialog.fileOpen on Windows.
5 Comments
From:  Jürg Lehni
Date:  3. October 2010, 22:23

Just in time for this week's Scriptographer workshop at the ECAL School of Art and Design in Lausanne, we finished work on the new version 2.9. Download while it's fresh!

In this release we added a few important changes that we would like to highlight here:

Coordinate System Switch

To go along with Adobe's switch of the coordinate system orientation in Illustrator CS5, we decided to make the top-down coordinate system the standard setting for new scripts. But since many existing scripts were written specifically for the bottom-up coordinate system that was standard until version 2.8 and CS4, we added a simple switch for users to turn on backward compatibility in their scripts:

script.coordinateSystem = 'bottom-up';

Hello Degrees, Goodbye Radians

And while we were in the process of yet another transition (maybe one day we will become as good at it as Apple), we figured this was a good moment to say goodbye to the confusing angle units in radians, and welcome the good old degrees as the new standard. Again, there is a switch for scripts to turn on radians instead and remain compatible with old code:

script.angleUnits = 'radians';

We have added these switches to all scripts on the Scriptographer website, to make them backwards compatible with the latest version.

Read in more detail about these changes in the tutorials about The Coordinate System and Vector Geometry.

Tutorials

Speaking of tutorials, we spent a lot of time improving the existing ones and writing new ones such as Working with Mouse Vectors, so you may want to have a close look at all the Tutorials.

New Relative Drawing Functions

We also added very convenient new relative drawing functions to the Path object, such as pathItem.lineBy(vector), pathItem.arcBy(vector) and pathItem.curveBy(throughVector, toVector). These define vector shapes relative to the current location using vectors, which in our experience results in much simpler and more readable code.

These are exciting times for Scriptographer users, as working with Scriptographer keeps getting simpler, and learning to do so too, thanks to a growing amount of resources available online. We think it is a good moment to join the community, as the API is getting more and more finalized and stable too.

On this occasion we would like to express a big thank you to ECAL for helping us with our focused efforts by means of a financed research project.

Yours truly, the Scriptographer Team (Florian, Jonathan, and Jürg)

1 Comment
From:  Jürg Lehni
Date:  20. July 2010, 15:36

Version 2.8.055 of Scriptographer was just released, including one new feature and a row of bug fixes:

The very convenient pathItem.getIntersections(other) function was added, which returns all intersections between two path items as CurveLocation objects, whether they are open or closed, simple or compound paths. Behind the scenes, this function performs a simple form of bezier clipping. CurveLocation objects are now used in many other places as well. See the reference for further information, and bear with us while we prepare tutorials to explain their function better. This is functionality that the Pathfinder does not offer itself. In fact, none of the Adobe Illustrator tools offer this exact functionality, so we believe this should open doors to a nice new family of scripts.

The release also fixes these known isues:

  • Fix wrong active components in prompt dialogs.
  • Fix an issue where list components were not correctly initialised based on their initially set value.
  • Fix an issues with keyboard short-cuts: Bringing up the main palette window and the console should work now when documents are open.
  • Fix various issues with SpinEdits positions and enabled / disabled states.
  • Fix an issue where displaying prompt dialogs would mess up the undo history.

As always, happy coding, and do not hesitate to get in touch if things do not work as they should or are not clear.

4 Comments
From:  Jürg Lehni
Date:  8. June 2010, 16:46

Here a short note to inform you that the new version 2.8.052 was just uploaded. The previously released 2.8.050 introduced a few regressions due to the many under the hood changes, which were quickly identified and fixed. There are not enough changes for a real change-log, but below a list of what was fixed.

If you encountered problems with the previous release, please test again with this one first before reporting.

  • Fixed a bug in document.getItems(attributes) that prevented attributes.type from being recognised correctly.
  • Fixed UI layout issues with older scripts that directly work with the ADM package, where certain items would appear to have their bounding rectangles set incorrectly.
  • Fixed an error in the undo history tracking code that prevented item deletion from being detected in some situations and therefore leading to item.isValid() falsely returning true for such items.
  • Got version for Mac CS to compile correctly again.
  • Fixed a row of issues in the code that generates the Reference templates and improved documentation for some of the new features.
8 Comments
From:  Jürg Lehni
Date:  3. June 2010, 22:05

It has been a busy couple of weeks here at the Scriptographer HQ, as we were adding new features and writing tutorials, squashing bugs, simplifying things further and also adding support for the new Illustrator CS5.

We are quite excited about the mixture of new things, simplifications and more stability that we added to this release and think it was well worth the wait.

Refer to the change-log for a more complete list of what is new, but here some of the highlights:

Script Repository Manager

We introduced a new way to organise your scripts that is far more flexible and also more secure, as it prevents you from accidentally overriding your own script files: The Scriptographer Repository Manager lets you define multiple script repositories that serve as root folders for your scripts. These root folders show up in the Scriptographer Main Palette as if they were all nested together in one parent folder, but in fact they can be located anywhere on your hard-drive, and really should be located outside of the Scriptographer folder. In the future this will allow far simpler updates of Scriptographer to new versions, without the risk of any changes to your scripts lost – that is as long as you do not store your changes inside the default Examples folder.

Here is how it looks like with my personal configuration of multiple projects done with Scriptographer, all located in different parts of my harddrive:

Palette Improvements

We also spent a lot of time thinking about how the already great new Palette class could be made even more useful, simple and flexible. And we believe we came up with some really great ideas that we are soon going to write more about in the tutorial about Displaying Dialog Windows. We also changed many of the example scripts in the Tools folder to use this powerful new feature, so until the tutorials are done, the best way to see how to use it is to look at these scripts.

Components in palettes now support a couple of new values for component.type: 'font', 'color', 'ruler', 'menu-entry' and 'menu-separator'. But what's even better: If a script changes properties in the values object that is passed to palettes on creation, the palette gets updated automatically and efficiently. In the same way, the components object that is passed to the it now offers simpe access to the created Components, allowing the components to be disabled and enabled again, hidden and shown, list options can be changed, etc.

Please note:

From this release on, the classes previously available through the UI package are now deprecated. The reason for this is that the technology they are based on (ADM) will go away in CS6 when Illustrator will be ported to Cocoa.
In order to prepare for this transition early, and also to simplify the way people work with Scriptographer, we decided to come up with this new way of making UI in Illustrator that we believe is very powerful and incredibly easy. The only classes you need to know of are Palette, Component and Dialog.
Documentation for the previous UI package, now dubbed ADM, is still available at http://scriptographer.org/legacy/adm/.

Timers

Lastly we would like to highlight a feature that might produce a whole new category of scripts: In this release, timers finally became reliable, much faster and stable, allowing them to be used to write background scripts that can continuously change items in the document. This can for example be used for animations, or other playful things, such as the new Throw.js script in the Examples folder. Timers are currently not documented in the reference, but you can use them in the same way as you would in browsers: setInterval() / setTimeout() to set a periodic / one-shot timer, and clearTimeout() / clearTimeout() to abort them again.

This should give a good overview of what is new. We are aware that a lot of things still need better documentation and will now again focus on that part.

We hope you will have as much fun with this release as we had making it.

So that's about it for now from us, time to download and start writing your own scripts!

10 Comments
Scripts
08.01.12, 08:40
08.01.12, 08:18
04.01.12, 11:04
28.12.11, 10:42
16.11.11, 09:40
28.10.11, 10:47
Posts
26.01.12, 23:12
26.01.12, 14:47
25.01.12, 19:03
25.01.12, 01:21
25.01.12, 00:22
24.01.12, 01:40
Script of the Moment
Variator 08.01.12
Donation

If you use Scriptographer regularly or for commercial purposes, please consider making a donation via PayPal:

Thank you!