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
Other alternative will be to record an action with “Clear Guides” command then just

tell application "Adobe Photoshop CS2"
        
tell document 1
           do action "DeleteGuides" from "CYB"


Carlos Ysunza B.
Director
Ysunza/Santiago
Comunicación Visual • Automatización
Tel. (52)55 5256-0336
email@hidden

http://www.ysunzasantiago.com
http://www.thesecretmexico.com
http://www.softrobot.com.mx



From: Stan Cleveland <email@hidden>
Date: Thu, 11 Jan 2007 11:39:45 -0800
To: "email@hidden" <email@hidden>
Subject: 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: 
 >Re: PhotoShop Clear Guidelines (From: Stan Cleveland <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.