2 Replies Latest reply on Mar 24, 2008 1:55 PM by john isaacks

    drag and drop shortcut files.

    john isaacks Level 1
      If I drag a shortcut file (.lnk) into my air application how can I get a reference to the file the shortcut is related to instead of the shortcut file?

      Thanks!
        • 1. Re: drag and drop shortcut files.
          ctzn99 Level 1
          This will work for internet shortcuts (i.e. mylink.url):

          Once you have a reference to the file that is actually the shortcut open it up (the shortcut) and get the url path information to the actual url from within. Usually the second line is something like "URL=http://www.someURL.com"

          This won't work with file shortcuts though...
          • 2. Re: drag and drop shortcut files.
            john isaacks Level 1
            thanks for your reply ctzn99,

            I have figured that part out myself though, because if you open a notepade.exe and drop in a mylink.url it is very simple to see the path and grab it with a string manipulation with air. but if you drag a shortcut.lnk into notepad it is very different and looks alot more cryptic.

            I was hoping there was a method for getting the target file from a shortcut. even if I try to use:
            NativeApplication.nativeApplication.getDefaultApplication("lnk")
            there is no default application either