Help with Resources

Can someone please help me with this it’s is driving me CRAZY

display dialog "" with icon alias ((path to me) & "Contents:Resources:JavaApp.icns" as string) buttons {"Cancel", "OK"} default button 2

and all i get is the error message

File Macintosh HD:Applications:AppleScript:Script Editor.app:Contents:Resources:JavaApp.icns wasn’t found.

cheers

Browser: Firefox 3.0.9
Operating System: Mac OS X (10.4)

Until Mac OS X 10.5, the Script Editor will return its own application path when you test run a script from within it. No need to get crazy about this :smiley: Your script will work just fine when used as a standalone app from the Finder.

Best regards from sunny Berlin!

Hi Martin

Thanks for the help

Good evening from chesterfield, derbyshire

just another option - shorter

display dialog "" buttons {"Cancel", "OK"} default button 2 with icon path to resource "JavaApp.icns" in bundle (path to me)

Tom

Nice one tim thanks for the help