NZB AppleScript

Discussion in 'Mac Programming' started by gzambran, Aug 4, 2008.

  1. gzambran macrumors member

    Nov 20, 2007
    Does anyone know where I could find an AppleScript that would merely open a .nzb file (or any file for that matter) in finder? I've attempted to write one myself but have been unsuccesful.
  2. NSNick macrumors regular

    Jun 27, 2008
    Washington D.C.
    The application that opens NZB files would need to accept applescript commands.
  3. gzambran thread starter macrumors member

    Nov 20, 2007
    Not exactly. If the applescript can merely open the file in Finder the NZB Drop application would then process the NZB.

    For example, if I click on an NZB file in my Downloads folder NZB Drop then opens and begins to process the file. (Same concept)
  4. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    So basically you just want to simulate someone double clicking the icon then?
  5. gzambran thread starter macrumors member

    Nov 20, 2007
    Exactly. I wrote a script a few months ago that I used on an ActionFolder but it no longer works. Just wanted to compare what I wrote to an existing script. It sounds extremely simple but I can't seem to find one online.
  6. gzambran thread starter macrumors member

    Nov 20, 2007
    My ultimate goal is when an NZB files is placed in a specific folder I want the script to be triggered and simulate the double clicking of the file. An additional step would be to then move the NZB file to another location.
  7. engine9 macrumors newbie

    Feb 3, 2009
    it's a bit late but it can be useful to someone else:

    just copy this code in an applescript and create a FolderAction with it.

    -- This script will open all nzb files added to a folder.
    on adding folder items to this_folder after receiving these_items
    --if there are many files added we need to loop
    repeat with anItem in these_items
    -- we don't want to open all the files, only the nzb
    if name extension of anItem = "nzb" then
    -- we open the file with the default associate programs.
    tell application "Finder" to open these_items
    end if
    end repeat
    end adding folder items to

    Hope it will be useful.

Share This Page