Jump to content

mavrothal

Members
  • Content Count

    1
  • Joined

  • Last visited

About mavrothal

  • Rank
    InsanelyMac Protégé
  1. mavrothal

    file path

    I'm new to applescript and as a start I tried a simple app that will execute a terminal command (extract a tarball) on a selected file The script: tell application "Finder" set theSel to selection as text set thePet to POSIX path of theSel set theFol to POSIX path of (do shell script "dirname " & thePet) do shell script "tar -xf " & thePet & " -C " & theFol end tell works file if I run while the file is selected in the Finder. However, when the script is turned to an app (say, my_extractor.app) and then from the right-click menu of a tarball file I select "open with" >>> "my_extractor", it fails :-? I assume this is because the command "set theSel to selection as text" fails, but I can not figure why. I have search this forum and googled extensively but could not find any solution. Any hints, pointers, links? Thanks
×