• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UI Scripting and sub-sub-menus in Photoshop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UI Scripting and sub-sub-menus in Photoshop


  • Subject: Re: UI Scripting and sub-sub-menus in Photoshop
  • From: Martin Orpen <email@hidden>
  • Date: Wed, 21 Jan 2004 09:34:06 +0000

on 21/1/04 12:05 am, Shane Stanley at email@hidden wrote:

> On Jan 21, 2004, at 9:50 AM, Martin Orpen wrote:
>
>> What am I missing?
>
> The fact that you can install the Listener plug-in, record the relevant
> action in javascript, edit and plug that javascript into your AS
> (holding nose as required), and skip playing with the interface
> entirely.
>
> For your Render --> Clouds example, that will give you something like:
>
> set theScript to "var id22 = charIDToTypeID( \"Clds\" );
> executeAction( id22, undefined, DialogModes.NO );
>
> "
> tell application "Adobe Photoshop 7.0"
> tell current document
> activate
> do javascript theScript
> end tell
> end tell


Shane, Shane, Shane

You misunderstand my *needs* and *insult* my scripting, my family and my
temple.

Let's lay down some ground rules here:

I believe in the *purity* of the AppleScript. To me, "do shell script" is an
admission of failure. And "do j*v*script" is so evil that I dare not speak
its name. I have registered the fact that the Script Editor *will* compile
this type of statement as a serious bug (RadarProblem666) and hope that the
AS team will get around to fixing it soon.

Your 3 lines may achieve the result that I want, but they go against the
*spirit* of AppleScript. Any solution, no matter how convoluted, just has to
be better if we can make it 100 per cent AS.

UI scripting is the icing on the big scrummy cake we call AppleScript. It
offers many benefits over your cold, utilitarian, non-AS solution. To name
but a few:

1. It looks good - beautiful chevrons of tell statements zigzagging through
your script.
2. The "Wow" factor - as in "wow it worked *that* time"
3. Security - nobody will steal your script as it's guaranteed that it ain't
gonna work on anybody else's Mac
4. Insights into the minds of other programmers - "oh, so that's where
button 1 is..."

It may have taken me 27 hours, but look at the beautiful shape of the
finished result:


tell app "Adobe Photoshop 7.0"
activate
tell application "System Events"
tell process "Adobe Photoshop 7.0"
tell menu bar 1
tell menu "Filter"
tell menu item "Render"
tell UI element 1
click menu item "Clouds"
end tell
end tell
end tell
end tell
end tell
end tell
end tell


Reminds me of my first glimpse of Concord as she flew above the school
playing fields <wipes tear away>.

All I need to do now is find a use for the "Clouds" filter.

--
Martin Orpen
Idea Digital Imaging Ltd -- The Image Specialists
http://www.idea-digital.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: UI Scripting and sub-sub-menus in Photoshop
      • From: Michael Grant <email@hidden>
    • Re: UI Scripting and sub-sub-menus in Photoshop
      • From: Shane Stanley <email@hidden>
    • Re: UI Scripting and sub-sub-menus in Photoshop
      • From: Shane Stanley <email@hidden>
References: 
 >Re: UI Scripting and sub-sub-menus in Photoshop (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Number Of Chosen Item
  • Next by Date: Still more strange things …
  • Previous by thread: Re: UI Scripting and sub-sub-menus in Photoshop
  • Next by thread: Re: UI Scripting and sub-sub-menus in Photoshop
  • Index(es):
    • Date
    • Thread