bilbotron Posted March 21, 2013 Share Posted March 21, 2013 Hello, I'm really new to Alfred and used to use Quicksilver. I had a script that would allow me to apply a colour label to files in finder, but cannot get it to work properly in Alfred. Does anyone have a solution they use? Many thanks, Will Here is the script I use at the moment: on alfred_script(q) tell application "Finder" set thisItem to selection as alias if label index of thisItem = 0 then set the label index of thisItem to 2 -- 2 = red else set label index of thisItem to 0 -- 0 = no label end if end tell end alfred_script Link to comment
Lauri Ranta Posted March 21, 2013 Share Posted March 21, 2013 on alfred_script(q) activate application "SystemUIServer" -- http://www.openradar.me/9406282 activate application "Finder" tell application "Finder" repeat with f in selection as alias list if label index of f is 0 then set label index of f to 2 else set label index of f to 0 end if end repeat end tell end alfred_script Finder has a bug in 10.7 and 10.8 where the selection property refers to the second frontmost window (or the desktop) after you open a new window. As a workaround, you can move focus to another application and back, but it results in a visual glitch. You can reduce the delay for hotkeys by secondary-clicking a shortcut recorder and setting the trigger behavior to pass through modifier keys. Link to comment
bilbotron Posted March 24, 2013 Author Share Posted March 24, 2013 Thanks very much for this! I'm not sure what you mean by "secondary-clicking a shortcut recorder and setting the trigger behavior to pass through modifier keys.", though. Could you give an example, please? Link to comment
Lauri Ranta Posted March 24, 2013 Share Posted March 24, 2013 Hotkeys have a ~200ms delay by default, but you can reduce it by selecting this option: Link to comment
bilbotron Posted March 27, 2013 Author Share Posted March 27, 2013 That's brilliant! I've always wondered why they were so slow to respond. Thanks for your help Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now