for some reasons I need the class of a file and I like to use this information for a decision.
For understanding my problem, the script can be quite simple:
set ar0 to choose file tell application "Finder" set ar1 to class of (ar0 as reference) as string end tell display dialog ar1
Using this script i.e. with a document file, it does what has to be expected.
ar1 contains the string “document file” and this is displayed in the dialog box.
But there is a different behaviour if I save it as an application and start it again.
The dialog box show only
Where is my string “document file” now ?
I tried some comparisations, but nothing worked.
Note: It is not important for me to get this class as a string.
I am looking for a solution to get the class information of a file to seperate it from eachother.
Every kind of comparisation method is welcome as well.
P.S. Please excuse eventually bad english though I am not a native english speaker.