Jump to content

Can the File Action menu show up when right-clicking a file in OSX?


Recommended Posts

Hi all,

 

New to Alfred, and totally blown away by how helpful it is.

 

One question: is there a way to have the File Action menu show up in the context menu when right-clicking a file in OSX? Works fine with the hotkey, but was wondering if I could get it to show up in the context menu too.

 

Thanks!  -Scott

Link to comment

Not really no.  But, one could convert the file actions from Alfred into system services with Automator.  Depending on how many file actions you have though, this could clutter up the Services menu quite a bit.  As it is, more than 5 are put into a sub menu.  So, it's probably best just to use the shortcut specific to Alfred, and bring in your files using Alfred specific file actions.

Link to comment

You could also create a service that executes Alfred's File Action menu.

 

Open Automator and create a new Service. It should accept "files or folders" in Finder.

 

Add a Run AppleScript action, and put this in the box (it simulates the keyboard shortcut to open Alfred's File Action menu):

on run {input, parameters}
	
	tell application "System Events" to key code 44 using {command down, option down}
	
	return input
end run

NOTE: This script runs ⌘⌥/ (command-option slash) which is what I have set for my shortcut. I believe the default is ⌘⌥\ (command-option backslash). In that case, you need to change key code 44 to key code 42.

 

Save the Service as, say, "Open Selection in Alfred…", and it will appear in your context menu in Finder.

Link to comment

Thanks, I'm clueless with Automator, hope you don't mind a question...

 

I got that working in Automator, but it changed my name from "Alfred Actions..." to "Alfred Actions.." (from 3 to 2 periods)

 

I'm guessing that 3 periods might be 'reserved' -- but now I seem unable to change the name.

 

I tried editing the name in Automator.

 

I tried deleting the file from User/Library/Serivces

 

I tried turning it off/on in System Preferences > Keyboard > Shortcuts > Services

 

I tried killing Finder

 

But it still shows up in the Context Menu as "Alfred Actions.."

 

What's the right way to "totally remove" this Service, such that I can name it?

 

Thanks!

Link to comment

Tried rebooting -- if something other than Finder is frontmost, if I right-click a file on the Desktop and choose the "Alfred" action, I see the Services cog briefly flash in the Mac menu bar, but nothing happens -- works fine with Finder frontmost.

 

I don't meant to waste your time, and it's not the biggest deal -- but if you have any idea on how to get it to work -- or if it "shouldn't" work, happy to hear what you think...

 

And thank you.

Link to comment

Thanks, good to know you see it too -- so that strikes you as a potential El Capitan 'bug' (or however you might characterize it)?

 

What what little I understand, it seems like since the Service appears to be running, it seems like the call to the keystroke should work.

 

Anyhow, at least it works (provided Finder is frontmost).

 

-Scott

Link to comment

FWIW, the original name I proposed didn't contain 3 periods, but 1 ellipsis (the dot, dot, dot character). I think this is OPT+; on an English keyboard (I have a German keyboard). Alternatively, you could copy the character I posted.

Actions with dot-dot-dot at the end of their name typically contain an ellipsis, not three periods, i.e. one character, not three, and you won't have issues with the OS stripping a character.

Edited by deanishe
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...