• 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 - Pastor.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UI Scripting - Pastor.app


  • Subject: Re: UI Scripting - Pastor.app
  • From: email@hidden
  • Date: Thu, 15 Jan 2004 10:27:56 +0000

John,

The application itself does not have shortcuts assigned to those buttons (read my reply to Daniel).
I thought you were on to a winner with the suggestion to define my own shortcuts, but sadly when trying to add the Pastor application to the list, I get greeted with "You cannot assign keyboards shortcuts to the application Pastor".
Me very sad :(

DP

Nope! tried that as well but it makes no difference. In both cases, the
button does momentarily turn blue, but the expected action (opening a
new entry window) doesn't happen.

My guess:
Delete the word application in your script and try again ...

window 1 of process "Pastor"

Henrik

tell application "System Events"
click button "New Entry" of window 1 of application process "Pastor"
end tell

I've had similar problems with some apps, it acts like the click's duration is
too short to actually trigger the button. If the button is the default then you
can use -

tell application "System Events" to keystroke (ASCII character 13) -- "Return"

or

tell application "System Events" to keystroke (ASCII character 3) -- "Enter"

If it isn't the default then you can trigger it's shortcut assignment (assuming
it has one) by using something like -

tell application "System Events" to keystroke "n" using command down --
command+n

Where it doesn't have a key shortcut assignment you can assign one. Some
applications have the ability to assign them internally or you can resort to
the Keyboard & Mouse Preference Pane (Keyboard Shortcut section) which needs to
be carefully thought out. The drawback to this is that your app won't be
portable since you can't reasonably expect others to have defined the same key
combinations as yourself.

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

References: 
 >Re: UI Scripting - Pastor.app (From: John Stewart <email@hidden>)

  • Prev by Date: Re: inheritance
  • Next by Date: Re: inheritance
  • Previous by thread: Re: UI Scripting - Pastor.app
  • Next by thread: How do I schedule a script.
  • Index(es):
    • Date
    • Thread