Re: Active Application
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.