• 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: Yosemite and activate failures
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Yosemite and activate failures


  • Subject: Re: Yosemite and activate failures
  • From: Deivy Petrescu <email@hidden>
  • Date: Sat, 17 Jan 2015 09:01:35 -0500
  • Sun-java-system-smtp-warning: Lines longer than SMTP allows found and truncated.

> On Jan 16, 2015, at 22:40 , Shane Stanley <email@hidden> wrote:
>
> On 17 Jan 2015, at 10:18 am, Deivy Petrescu <email@hidden> wrote:
>>
>> However, I would expect such behavior only inside a tell block.
>
> That's precisely where the problem is happening.
Not really
>
>> By the way, even inside a tell block, there are some instances that the script have to be told to hold (delay ).
>> When telling Safari to open an URL that is always the delay command.
>> Inside a tell block.
>
> Yes, that's the 1%. But it's generally only cases like opening a URL, where the definition of when an action is complete is hard to define, and in the case of commands that take a long time.
>>
>> To my point of view is it working as expected.
>
> You have a funny view of the world, if I may say so. Here's a simple classic script:

I’ve been told that many times… :-)
>
> tell application "Whatever"
> 	activate
> 	display dialog "Hello"
> end tell
>
> For the past 20-odd years, you could guarantee that that dialog would be presented by an active "Whatever". As of Yosemite, you can't. How can changed behavior like that be "as expected”?

Well, Shane, things change. And yes, it is the expected behavior.

Here, lets try to write the script above using JSA:

<script JSA>
finder=Application('Finder')
finder.activate()
finder.displayDialog('Hello’)
</script>
—>Error -1708: Message not understood.

<script JSA>
sa=Application.currentApplication()
sa.includeStandardAdditions=true
finder=Application('Finder')
finder.activate()
sa.displayDialog('Hello')
</script>
No error.
It has been changed for a while and AS was being lenient by accepting errors without stopping the  script.
Display dialog is a SA command.
May be JSA introduce  more stringent rules.
But you were not using the tell app block when using display dialog.

If you had written something as

tell app finder
set m to make new file at someplace
set name of m to something
end

and you’ve had an error can’t set name of m to something because m does not exist, this is a bug.

>
> --
> Shane Stanley <email@hidden>
> <www.macosxautomation.com/applescript/apps/>
>

but I do ave a funny view of the world.

Deivy Petrescu
email@hidden




 _______________________________________________
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: Yosemite and activate failures
      • From: Yvan KOENIG <email@hidden>
References: 
 >Script that "Tells" Finder just Focuses on Finder instead of running (From: Alex Hall <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: Deivy Petrescu <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: 2551 <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: Alex Hall <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: Deivy Petrescu <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: Shane Stanley <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: Deivy Petrescu <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: Shane Stanley <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: Deivy Petrescu <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: Shane Stanley <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: Shane Stanley <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: Yvan KOENIG <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: Shane Stanley <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: Yvan KOENIG <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: Shane Stanley <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: Alex Hall <email@hidden>)
 >Re: Yosemite and activate failures (From: Shane Stanley <email@hidden>)

  • Prev by Date: a bit of Help on Contacts (addressBook)
  • Next by Date: Re: Yosemite and activate failures
  • Previous by thread: Re: Yosemite and activate failures
  • Next by thread: Re: Yosemite and activate failures
  • Index(es):
    • Date
    • Thread