• 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: Active Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Active Application


  • Subject: Re: Active Application
  • From: Emmanuel <email@hidden>
  • Date: Sat, 15 Mar 2003 13:01:41 +0100

At 8:10 AM +0000 15/03/03, John Delacour wrote:
Can anyone explain this? If I run this script ...

try
set ap to get name of current application
display dialog ap
on error e
display dialog e
end try


... in Script Editor I get "Script Editor"
in Smile I get ""
and running from a KeyXing key I get "Can't get name"

You understand what KeyXing does when you know that the "null" descriptor is how Apple Event refers to the application that is running the script. An app "SurfWriter" receives the descriptor for its "object id 123 of object id 456 of object 789" as a sort of list {123, 456, 789}, which thus really means "object id 123 of object id 456 of object 789 of application "SurfWriter"", so it's natural that the empty descriptor refers to the application.

You understand what Smile does when you know that "name" is a property of the application, and that no one sets it (a very minor bug, if you want). You can set it yourself:

---------------------------
set name of current application to "Smile"
---------------------------

and then you can get it ...

Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Active Application (From: Paul Berkowitz <email@hidden>)
 >Re: Active Application (From: John Delacour <email@hidden>)

  • Prev by Date: Re: Determining item number matching "x" in a list
  • Next by Date: Re: Determining item number matching "x" in a list
  • Previous by thread: Re: Active Application
  • Next by thread: Re: Active Application
  • Index(es):
    • Date
    • Thread