Support for NameMangler Droplets?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Support for NameMangler Droplets? Sun Nov 04, 2012 2:51 am • by leoofborg
Like some other users, I use Name Mangler to do batch renaming as well as easily make file renaming rules. You can read about them here:

http://manytricks.com/namemangler/

Name Mangler's 'Droplet' system works on Finder selections much like Automator does.. but Automator in Mountain Lion is really crashy...

In the next version of Hazel can you please 'recognize' or 'support' Name Mangler droplets? Please?

-Leo
leoofborg
 
Posts: 6
Joined: Sun Nov 04, 2012 2:44 am

Re: Support for NameMangler Droplets? Sun Nov 04, 2012 7:01 pm • by AdamRoxby
I have a simular thing. I use Better File Rename which creates droplets.

Would be interested to see what the solution is.
AdamRoxby
 
Posts: 49
Joined: Tue Oct 30, 2012 8:56 am

Re: Support for NameMangler Droplets? Mon Nov 05, 2012 2:27 pm • by Mr_Noodle
My first question is: what kind of renaming do these do that Hazel can't do itself?

You may want to ask the authors of the respective programs if they can be triggered via AppleScript or if you can just open them as applications (and therefore use Hazel's "Open" action).
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Support for NameMangler Droplets? Mon Nov 05, 2012 6:04 pm • by leoofborg
Mr_Noodle wrote:My first question is: what kind of renaming do these do that Hazel can't do itself?

You may want to ask the authors of the respective programs if they can be triggered via AppleScript or if you can just open them as applications (and therefore use Hazel's "Open" action).


Hello Mr. Noodle 8)

I got an answer back from Peter Maurer, the Dev of NameMangler, from a NameMangler forum:

Go ahead and contact Noodlesoft -- (snip) Basically, they'd have to add a means to open files in any application. Oh, and if they have additional questions, I'd be happy to try and help (FIRSTNAME@manytricks.com).

In the meantime, however, you might already be able to do what you want. Hazel can do AppleScript, and you can open files in Name Mangler droplets via AppleScript.

Let's assume you have a droplet named "Droplet", then you can send the Finder selection to that Droplet with a script like this:

Code: Select all
-- script begins --

try
        set theAliases to {}
        tell application "Finder"
                set theSelectedFiles to selection
                repeat with aSelectedFile in theSelectedFiles
                        set theAliases to theAliases & (aSelectedFile as alias)
                end repeat
        end tell
        if (count of theAliases) > 0 then
                tell application "Droplet" to open theAliases
        end if
end try

-- script ends --


You'll obviously want to work Hazel into that script, but this should give you the general idea. There are basically two things to keep in mind:

1) For the "open" command to do its thing, you want the files you're going to rename represented by a list of aliases.
2) You need a surrounding try statement. If you left that out, AppleScript would throw an error on the auto-quitting Droplet and Name Mangler, which in turn would break your workflow.

I hope this helps! Cheers,

Peter.


I hope this helps other users.. it's useful glue.. but I'm getting tired of using AppleScript and Automator as glue (they crash. A lot!).

This is why I'd like support for NameMangler droplets.. and to get other Devs (like the BetterZip guy) to add a droplet system so that I can AUTOMATE via Hazel but then DELEGATE to more specialized apps like NameMangler & (if possible) Betterzip.

It's not that Hazel can't do pattern matching of tokens.. it's that NameMangler is more specialized in doing it if we already have droplets ummmmmm I'd like to be able to use the the Droplets (not the parent Application, which is *called* by the Droplet).

I hope this makes sense.

-Leo
leoofborg
 
Posts: 6
Joined: Sun Nov 04, 2012 2:44 am

Re: Support for NameMangler Droplets? Tue Nov 06, 2012 4:50 pm • by Mr_Noodle
Well, ultimately, the best solution would be to do the renaming in Hazel. This type of thing is a bit specialized to a specific product (and I'm not sure if the other product uses the same mechanism) but I'll think about it.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support