• 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: Yvan KOENIG <email@hidden>
  • Date: Thu, 15 Jan 2015 20:45:10 +0100



Hello

As I got the described results with the original script, I edited it this way :


set appNameReportText to ""
tell application "Finder"
activate
set thisAppName to my getFrontmostAppName()
end tell
set appNameReportText to appNameReportText & thisAppName & return
say thisAppName

tell application "Mail"
activate
set thisAppName to my getFrontmostAppName()
end tell
set appNameReportText to appNameReportText & thisAppName & return
say thisAppName

tell me to activate
tell current application
activate
set thisAppName to my getFrontmostAppName()
say thisAppName
set appNameReportText to appNameReportText & thisAppName & return


end tell
tell application "SystemUIServer" to display dialog appNameReportText


on getFrontmostAppName()
tell application "System Events"
set frontmostName to item 1 of (get name of processes whose frontmost is true)
end tell
return frontmostName
end getFrontmostAppName
----------------


I got the correct application names.
As I am curious, I replaced the three instructions:

say thisAppName


by
say ""

With this new version I retrieved the original behaviour.
As My curiosity has no end, I retried with three instructions :

say " "

and this time I got the correct result.

This result let me think that there is a problem of delay.
So I replaced the three say " " instructions by three

delay 1

With this version I got also the correct result.

As my family wait for the dinner, I don't make more tests but it seems that the problem is really a delay one.

Yvan KOENIG (VALLAURIS, France) jeudi 15 janvier 2015 20:44:35









 _______________________________________________
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>)
 >Yosemite and activate failures (From: Ray Robertson <email@hidden>)

  • Prev by Date: Re: Launch agent issue
  • Next by Date: "AppleScript Needs Programmers" [Re: Database events [way OT]]
  • Previous by thread: Yosemite and activate failures
  • Next by thread: Re: Yosemite and activate failures
  • Index(es):
    • Date
    • Thread