Re: Active Application
Re: Active Application
- Subject: Re: Active Application
- From: julifos <email@hidden>
- Date: Sat, 15 Mar 2003 14:15:16 +0100
>
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"
>
>
JD
>
____
As long as I know, "current application" is an applescript constant (such as
pi or return), and should return a reference to the "guy who is running the
script". But this does not imply that such process has properties.
And seems that the "current application", if prepared for it, can redirect
some requests, such as "name" (which is a property of, eg, Script Editor).
But this is a property of the Script Editor, not an element of "current
application".
So, if the "current application" can handle such request ("name"), it will
return a result. If not, it will throw an error (eg., an applet or a script
run by the *old* OSA Menu).
And, theorically, "name of current application" should return the same
results than "my name".
(Smile defines "name" within its application classes, but it will return
allways an empty string, why? Bug?)
JJ
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
_______________________________________________
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.