• 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: Phil Stokes <email@hidden>
  • Date: Thu, 06 Oct 2016 12:40:56 +0700


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




 _______________________________________________
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

  • Follow-Ups:
    • Re: Accessibility
      • From: Brian Christmas <email@hidden>
References: 
 >Accessibility (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: Calling AppleScript from delegate methods
  • Next by Date: Re: Accessibility
  • Previous by thread: Accessibility
  • Next by thread: Re: Accessibility
  • Index(es):
    • Date
    • Thread