Re: UI Scripting - Pastor.app
Re: UI Scripting - Pastor.app
- Subject: Re: UI Scripting - Pastor.app
- From: John Stewart <email@hidden>
- Date: Thu, 15 Jan 2004 04:56:52 -0500
On 01/15/04 at -0000 email@hidden said this
>
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
--
A thing is not necessarily true because badly uttered, nor false because spoken
magnificently.
_______________________________________________
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.