Re: «constant afdregfp»
Re: «constant afdregfp»
- Subject: Re: «constant afdregfp»
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 09 Apr 2001 23:00:45 -0700
On 4/9/01 8:10 PM, "Romulus Barabas" <email@hidden> wrote:
>
I found this script:
>
>
set appath to (path to +constant afdregfp;)
>
tell application "Finder"
>
activate
>
set the clipboard to appath as text
>
display dialog ,
>
("The path to the file of the front application: " & return & "\"" &
>
appath as text) & "\"
>
has been placed on the clipboard." buttons ,
>
"OK" default button "OK" giving up after 10 with icon 1
>
end tell
>
>
>
What strikes me here is the +constant afdregfp;. I'd like to know what it is
>
and where can I get a list of similar constants (which are really "cool" but
>
rather hidden - not present in dictionaries).
>
Well, first of all, that looks like the
path to frontmost application
which you can do in English. I've used it many times myself but the odd
thing is. _it's_ not listed anywhere either! i don't understand why it's not
in the 'path to' entry in Standard Additions. Anyone know?
To get raw codes, you first have to know what the "normal" compiled code is.
If it's an application's term (a class or an event), you can find the raw
code using Smile. Type "portable" in the Smile Help and follow the links.
To get the raw code of an osax term, compile and save a script using it with
the osax installed. Then uninstall the osax (remove from Scripting Additions
folder and restart computer, or copy it to the desktop, trash the original
and empty the trash.) Then open the script, and you'll see the raw code.
That will work for 'path to frontmost application' - try it.
To get the raw codes of AppleScript language keywords themselves: I don't
know, but 'deep level' developers will know. And there are a few that have
no "English" version , like <<class psn >> . there's got to be some way of
getting at them.
--
Paul Berkowitz