• 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: Accessibility
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessibility


  • Subject: Re: Accessibility
  • From: Brian Christmas <email@hidden>
  • Date: Thu, 06 Oct 2016 17:14:25 +1100

G’day Phil

You’re right, the repeat and delay don’t make much sense. They’re there because I have to be utterly sure the routine won’t get bypassed. The user MUST know that Accessibility is NOT turned on. So I simply added the repeat in case something was wrong with the try loop, and the delay to make sure the menu was ready. Just safeguards, as I’ve learnt to be very careful over the past few years, and cover everything that might, just might, go wrong.

Probably a waste of coding, but.

However, back to the most important point, what can I use to replace Bill’s routine, in a simple way, if possible?

Regards

Santa


On 6 Oct. 2016, at 4:40 pm, Phil Stokes <email@hidden> wrote:


On 6 Oct 2016, at 10:36, Brian Christmas <email@hidden> wrote:

Anyone got anything simpler, please?



Well, this doesn’t make much sense to me:

tell application “TextEdit"
--
do shell script ("sleep 1")
tell application "System Events" to tell process "TextEdit"
try
do shell script ("sleep 0.2”)


And your repeat seems redundant. No matter what the condition (pass or fail), you’re 
exiting the repeat, so this script is only ever going to run once. How about:

set assistTrial to false
tell application "TextEdit"
activate
try
close every window saving no
end try
end tell

delay 1

tell application "System Events" to tell process "TextEdit"
try
click menu item "Preferences…" of menu 1 of menu bar item "TextEdit" of menu bar 1
set my assistTrial to true
on error errmsg number errnum
set my assistTrial to false
end try
end tell





And what, you ask, was the beginning of it all?
And it is this......
Existence that multiplied itself
For sheer delight of being
And plunged with numberless trillions of forms
So that it might
find
itself
innumerably

Sri Aurobindo



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Accessibility (From: Brian Christmas <email@hidden>)
 >Re: Accessibility (From: Phil Stokes <email@hidden>)

  • Prev by Date: Re: Accessibility
  • Next by Date: Re: Accessibility
  • Previous by thread: Re: Accessibility
  • Next by thread: Re: Accessibility
  • Index(es):
    • Date
    • Thread