Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PhotoShop Clear Guidelines



Title: Re: PhotoShop Clear Guidelines
On 1/11/07 7:42 AM, Oakley Masten wrote:

> How do I tell PhotoShop CS2 to clear the guidelines in
> the current doc?
> I can't find any reference to this in any of the
> scripting photoshop pdfs.

It’s not possible using just AppleScript, so you'll need to delve into the _javascript_ inner workings of Photoshop. The following AppleScript handler will do the job.
Enjoy!

Stan C.

on clearGuides()
    tell application "Adobe Photoshop CS2"
        do _javascript_ "function deleteGuides()
        {
        var allGuides = new ActionDescriptor();
        var guidesRef = new ActionReference();
            guidesRef.putEnumerated(charIDToTypeID(\"Gd  \"), charIDToTypeID(\"Ordn\"), charIDToTypeID(\"Al  \"));
            allGuides.putReference(charIDToTypeID(\"null\"), guidesRef);
        executeAction(charIDToTypeID(\"Dlt \"), allGuides, DialogModes.NO);
        }
        deleteGuides();"
    end tell
end
clearGuides
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

References: 
 >PhotoShop Clear Guidelines (From: Oakley Masten <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.