Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gzambran

macrumors member
Original poster
Nov 20, 2007
30
0
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.
 

NSNick

macrumors regular
Jun 27, 2008
162
0
Washington D.C.
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.

The application that opens NZB files would need to accept applescript commands.
 

gzambran

macrumors member
Original poster
Nov 20, 2007
30
0
The application that opens NZB files would need to accept applescript commands.

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)
 

Cromulent

macrumors 604
Oct 2, 2006
6,817
1,102
The Land of Hope and Glory
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)

So basically you just want to simulate someone double clicking the icon then?
 

gzambran

macrumors member
Original poster
Nov 20, 2007
30
0
So basically you just want to simulate someone double clicking the icon then?

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.
 

gzambran

macrumors member
Original poster
Nov 20, 2007
30
0
So basically you just want to simulate someone double clicking the icon then?

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.
 

engine9

macrumors newbie
Feb 3, 2009
1
0
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.