Syntax headache!

Hi there

I am trying to test for the default application of a file.

I can get the file name and the values using the following line of script:

set aa to {tempitem, name extension of this_item, default application of file (this_item as text)}

…which produces this result…

But how do I test what the default application is?

I have tried this (amongst other things):

if item 3 of aa is equal to (path to application "TextEdit") then beep

…but no beep of success!

I am missing something in the syntax here, I fear.

Thanks for any help

Hi,

the alias specifier of System Events is not the same as the alias class of AppleScript
try this


set aa to {tempitem, name extension of this_item, default application of file (this_item as text) as alias}

Magic. Thanks, Stefan