• 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: Javascript wrapper for Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Javascript wrapper for Applescript


  • Subject: RE: Javascript wrapper for Applescript
  • From: Dennis Cox <email@hidden>
  • Date: Thu, 10 Jun 2004 09:55:25 -0500

> ----------
> From: David Andrews
> Sent: Wednesday, June 9, 2004 8:00 PM
> To: AppleScript
> Subject: Re: Javascript wrapper for Applescript
>
> On Jun 9, 2004, at 7:37 AM, Dennis Cox wrote:
>
> >> ----------
> >> From: David Andrews
> >> Sent: Tuesday, June 8, 2004 10:30 PM
> >> To: email@hidden
> >> Subject: Javascript wrapper for Applescript
> >>
>
> >> BTW: When the script runs, the RealOne Play window reverts to its
> >> default size. Is there a way to tell it, using System Events, to "Zoom
> >> Window" in the "Window" menu so that it goes back to its former size?
> >> Everything I've tried gives "AppleScript Error, System Events got an
> >> error: NSReceiverEvaluaionScriptError: 4"
> >>
>
>
> > As for your second question, did you try this? Watch the breaks, the
> > click
> > menu ... menu bar 1 command should be on one line.
> >
> > tell application "RealOne Player" to activate --to get the right menu
> > tell
> > tell process "RealOne Player"
> > click menu item "Zoom" of menu "Window" of menu bar item
> "Window" of
> > menu bar 1
> > end tell
> > end tell
> > end
>
> Yes, I tried it and get the above error, in fact, I've tried it for
> Mail and Address Book and get the same error with those apps as well --
> so what gives? (I also tried "Zoom Window" in place of "Zoom" in
> RealOne Player since that is how it appears in the "Window" menu of
> that app.)
>
Yes, I don't have Real so I don't know how the menus look. The script works
for me in both.

> I'm running MacOS 10.3.4, Script Editor 2.0 (v4.3), AppleScript 1.9.3.
>
Me too.

> I can tell application "System Events"
> ...
> tell process "RealOne Player"
> keystroke " " -- the space key toggles the
> pause/play button
> ...
> which works just fine.
>
Hmm, "Enable access for assistive devices" is not checked in the Universal
Access pref pane? keystroke works without "Enable access..." checked, but
anything that would involve using a mouse would be disabled.

> Unfortunately, there is no keystroke for the "Zoom Window" menu item,
> so I added one.
>
How fortunate... :-)

> How do I "keystroke" a Command-Shift-z?
>
keystroke "z" using {command down, shift down}
or
keystroke "Z" using command down

> Or, perhaps if I could tell System Events to click the green (+) button
> on the RealOne Player window (which would also zoom the window), how
> would I do that?
>
Don't go there! :-)

Dennis
_______________________________________________
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.


  • Prev by Date: Re: Asyncronous AppleScript executing
  • Next by Date: Re: How to hide toolbar
  • Previous by thread: Re: Javascript wrapper for Applescript
  • Next by thread: Re: Javascript wrapper for Applescript
  • Index(es):
    • Date
    • Thread