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

Re: Old scripts failing


  • Subject: Re: Old scripts failing
  • From: Iurista GmbH <email@hidden>
  • Date: Tue, 16 Apr 2019 16:36:40 +0200

Am 16.04.2019 um 01.58 schrieb Robert Poland:

> Hi,
>
> This old script now fails after running for over a year.
>
> “# /Users/rpoland/Desktop/T'ai Chi Chih~ƒ” is path to file.
>
> What’s changed? Do I need the “Use” gibberish to make it work now?
>
> <script>
> (* open_T’ai_Chi_Chih - 12/16/2017 By R L Poland.   modified name to make
> script not error.
> *)
>
> tell application "Finder"
>       activate
>       set chiFolder to "" & (path to desktop folder as text) & "T'ai Chi
> Chih~ƒ"
>       # display dialog chiFolder
>       set windowList to name of Finder windows as text
>       display dialog windowList
>       if windowList contains "Chi Chih" then
>               close window "T'ai Chi Chih~ƒ"
>       else
>               open folder chiFolder
>       end if
> end tell
>
> # /Users/rpoland/Desktop/T'ai Chi Chih~ƒ
>
> 1error "Finder got an error: Can’t get window \"T'ai Chi Chih~ƒ\"." number
> -1728 from window "T'ai Chi Chih~ƒ"error "Finder got an error: Can’t get
> window \"T'ai Chi Chih~ƒ\"." number -1728 from window "T'ai Chi Chih~ƒ”
> </script>
>
> Tia,

with the IF block, I have that error since OS 10.6.8.
I learned to use a TRY block with "on error" instead of the "IF"

Rudolf
 _______________________________________________
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: 
 >Old scripts failing (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Sending mail from an Applescript on Mojave
  • Next by Date: Re: Old scripts failing
  • Previous by thread: Re: Old scripts failing
  • Next by thread: Re: Old scripts failing
  • Index(es):
    • Date
    • Thread