• 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: Fri, 16 Jan 2015 10:29:49 +0100

I made tests with an other script and — at least for my old brain — the results are puzzling.

# Saved as an applet named testeur2.app


tell application "TextEdit"
activate
delay 0.5
set curName to name of current application
# I assumed that it will return "TextEdit" but it returns
--> testeur2
end tell

tell application "System Events"
set frontName to name of first process whose frontmost is true
# I assumed that it will return "TextEdit" and it returns
--> TextEdit
end tell
tell application "SystemUIServer" to display dialog "msg1 : " & return & curName & return & frontName
(*
msg1 :
testeur2
TextEdit
*)
tell me
activate
delay 0.5
set curName to name of current application
# I assumed that it will return "Testeur2" and it returns
--> testeur2
end tell
delay 0.5
tell application "System Events"
set frontName to name of first process whose frontmost is true
# I assumed that it will return "Testeur2" but it returns
--> TextEdit
end tell
tell application "SystemUIServer" to display dialog "msg2 : " & return & curName & return & frontName
(*
msg2 :
testeur2
TextEdit
*)

If I remove the three delays I get :
(*
msg1 :
testeur2
testeur2
*)
(*
msg2 :
testeur2
TextEdit
*)

Yvan KOENIG (VALLAURIS, France) vendredi 16 janvier 2015 10:29:25








 _______________________________________________
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: Shane Stanley <email@hidden>
  • Prev by Date: Re: Yosemite and activate failures
  • Next by Date: Re: Yosemite and activate failures
  • Previous by thread: Re: Dunning-Kruger [was: Re: Database events [way OT]]
  • Next by thread: Re: Yosemite and activate failures
  • Index(es):
    • Date
    • Thread