title: Getting selected/clicked item on desktop using Applescript
body: <p>I need to fetch the currently selected item on the desktop or the desktop item that was right clicked . Depending on the path for this item(s) I will have to perform some action. Can this be done using applescript ???</p>
  
  <p>I am currently using the logic given <a href="https://github.com/davedelong/BetterInfo" rel="nofollow">here</a>(using scripting bridge)</p>
  
  <p>But this seems to fetch the selection from any of the finder windows and not just the desktop view. Can anyone please provide any alternative ??</p>