-
Posts
63 -
Joined
-
Last visited
-
Days Won
1
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by bencfd
-
-
Hi,
I'm posting this in Discussion as it is not technically a bug report (or is it?). I used to start Alfred using AppleScript with
tell application "Alfred 2" to launch
but this doesn't work anymore. I suspect it's because there is no Standard Suite (with commands such as open, launch, close) in the AppleScript Dictionary for Alfred. Is it possible to bring this suite back in the dictionary? Thanks a lot!
-
Whenever I launch the iTunes mini player I am unable to access Podcasts. I have lots of subscriptions and I can see them listed in the iTunes Music Library.xml file. I have 'Include Podcasts' enabled in Alfred but cannot view them.
When I launch the mini player I see: Genres; Artists; Albums; Playlists; Random Album. If I search through these there is nothing that I can find related to Podcasts.
Am I missing something?
I don't see anything related to Podcasts neither in the initial iTunes MiniPlayer window, but at least I'm able to search for podcast episodes and podcast "albums".
-
/usr/local/bin is not a language (neither is /bin or /usr/bin). They're directories.
Your environment has a variable called PATH, which is a list of directories. When a program (or a shell) wants to run another program, it can simply call it by name (e.g. VBoxManage) provided it is in one of the directories in PATH.
Alfred's PATH is the default one of /bin and /usr/bin, so any program in either of those directories can be called by name.
If you want to run a program in /usr/local/bin, you have to call it by its full path, e.g. /usr/local/bin/VBoxManage.
So, instead of running VBoxManage startvm "vm_name" you just need to run:
/usr/local/bin/VBoxManage startvm "vm_name"
Thank you very much @deanishe for the explanations and the solution you provided, that makes sense and works perfectly!
-
Hi everyone!
For long, I've been launching VirtualBox's virtual machines with the following script, bin/bash being the language selected:
VBoxManage startvm "vm_name"
In a recent update, it seems that VirtualBox moved the necessary "files" (I don't really know/understand what happens in the background) from /usr/bin to /usr/local/bin. See this topic: https://forums.virtualbox.org/viewtopic.php?f=8&t=68825. People there pointed that it might be related to recent security restrictions in OS X (Yosemite, El Capitan).
From the Terminal, when I first point to /usr/local/bin, the previous piece of code works perfectly. So my question is, how can I point to that special directory from a Run script window of a workflow?
Ultimately, should Alfred be updated to offer /usr/local/bin in the Language list?
Thanks for your help!
-
Hi there!
qWorkflow looks like what I was looking for since long, thank you for this! Based on your iTunes Ratings workflow, I'm trying to have Alfred show a list of my calendars, as in the Calendar app.
tell application "Calendar" set calendarsList to name of calendars end tell
Typing a few letters, I would like Alfred to display the matching calendar names, so as to perform some magical calculations with the one of my choice at next step, using AppleScript again.
I assumed the Script Filter should be something like this:
# get the workflow's source folder set workflowFolder to do shell script "pwd" # load the Workflow library set wlib to load script POSIX file (workflowFolder & "/q_workflow.scpt") # create a new Workflow Class set wf to wlib's new_workflow() try tell application "Calendar" set calendarList to name of calendars end tell repeat with i from 1 to (count of calendarList) add_result of wf with isValid given theUid:"", theArg:i, theTitle:(item i of calendarList), theAutocomplete:"", theSubtitle:(item i of calendarList) end repeat # show all the results in Alfred wf's to_xml("") on error # if an error, it's probably because there's no # song currently playing in iTunes, so show # the appropriate feedback error result add_result of wf without isValid given theUid:"", theArg:missing value, theTitle:"There is no song playing :(", theAutocomplete:"", theSubtitle:"Couldn't get the currently playing song", theIcon:"icon.png", theType:"" wf's to_xml("") end try
I kept the same error message from the iTunes Ratings workflow, at least it confirms me that it's not working I guess I simply don't understand how qWorkflow works So, I'm sorry for this very low level question, but... How could I generate such a feedback in Alfred?
Thank you very much in advance for your help!
-
Thank you fniephaus for this nice workflow, it's very practical to turn off the screen for a movie time! Would you have an idea how to apply to the keyboard's backlight as well? I've been searching a bit, but I don't really understand what I found.
-
Thanks Vitor, I didn't think about a workflow for this! However, it works only with the latest clipboard element. I was mainly thinking about previous elements, when browsing them from the Clipboard Viewer. Is there a way to access the clipboard history in a workflow?
-
Hi!
I often try to display a piece of text from the Clipboard Viewer in Large Type, using its assigned hotkey (Cmd+L). It seems so natural to me, but it doesn't work. Instead, one have to copy and paste again the desired element in Alfred main window to display it in Large Type.
I think it would be a nice little addition Thanks for considering!
- anbao1777 and Tyler Eich
- 2
-
This workflow was written for Ruby 1.9.3 which was the default in Mountain Lion. In Mavericks, Ruby 2.0 is now the default. The workflow needs to be updated to support Ruby 2.0. I don't really have the time to do this myself, but I'd be happy to accept a pull request on Github.
So that was just because of this... Then, I'll consider the pull request and be patient
-
For the people that are having trouble pairing, I have two questions:
- Is iTunes running when you try to pair? (it should be)
- Do you have sharing enabled in iTunes?
Almost one year has passed but let's try again!Yes, iTunes is running and sharing is enabled.Try this,
- Open Alfred's preferences and go to the Workflows pane
- Right click on the Up Next workflow and then click "Show in Finder"
- Open Terminal in /Applications/Utilities
- In Terminal, type "cd " (note the space at the end) and then drag the little blue folder icon from the top on the finder window into the terminal window and hit enter
- Now in Terminal, type "ruby pair.rb " followed by a 4-digit number pin and hit enter
- Paste the results here
I'll look into this right away!
So, results are a bit different today. Here's what the Terminal says:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- alfred (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from pair.rb:6:in `<main>'
Is something missing from my side?
-
Hi,
I am a total newbie. Does anybody know how to create a workflow to open Safari in Full Screen mode when Google searching?
I'd appreciate your solution. Thanks!
Hi,
I've added to the Google Searches workflow from Vero a "Run Scrip" item, including this:
set SafariFullscreenStatus to "" tell application "System Events" try set SafariFullscreenStatus to (value of attribute "AXFullScreen" of first window of application process "Safari") end try end tell if SafariFullscreenStatus is false then tell application "Safari" to activate tell application "System Events" to keystroke "f" using {command down, control down} end if
It's UI scripting though, but it works like a charm.
-
This will probably be useful for very few people (e.g., archaeologists, palaeologists), but as I made this workflow, I share it!
It converts BP times (Before Present) to BC/AD years, and reversely. The BC times have to be given as negative years.
The result is copied to the clipboard, and alternatively as "cal. BP" or "cal. BC" when holding the action modifier Alt.
-
Hi everyone,
I thought few days ago about a workflow I'd like to use. I tried to develop it, but it is far above my skills, that's why I'm asking you. Simply put, I love Mission Control, but I love Alfred more!
The idea (pretty simple): the keyword switch for example would list all running app. On return, Alfred would then list the different desktops (including the identifier of the screen in the subtitle field). After selecting one desktop, Alfred moves the window of the app previously selected to the destination desktop.
Additionally, the keyword desktop would directly list the desktops, to switch from one to another.
Listing the running apps is something I could do, there are many workflows I can take as example to achieve this, but I can't script the desktop thing. Does someone has an idea how to do this? thank you very much!
-
Not the case neither on Mavericks with Alfred 2.1, but it appeared with Alfred 2.1.1.
-
In the Search Scope, is "/Applications" or "~/Applications" set?
My settings was to search in my user folder only (~). I don't know if Mavericks is guilty, but my apps suddenly moved to the HDD folder.
-
Hi,
Having the downloads from Safari in the Downloads folder is perfectly fine for me for most cases, but sometimes (for automation reasons) I would like to be able to choose where to save a PDF (which is displayed by Safari). And I think a workflow would be great for that!
I can probably figure out the last steps of such a workflow to choose the relevant folder with a Script Filter and save the PDF using AppleScript, but does anyone know how I can "extract/access" the PDF in the first place?
Thanks a lot!
-
How do you add a Spotlight tag? Is that a Spotlight comment or an OpenMeta tag?
Yes, I meant Spotlight comment. Select the file in the Finder and hold Command + I. This will show the info panel of the file. On the top of this window, you should find a "Spotlight comments" field where you can add your Spotlight tags/comments.
-
From a file filter, it would pass the file path and name to the next step (your script) in the {query} variable. So, try setting FileToEdit to "{query}". I think that should get you going
Ah, I got confused between q and {query}! So, the first line is
set FileToEdit to POSIX file "{query}"
... and it works perfectly. Thank you!
-
Hi,
I'm having trouble creating a workflow. Based on help found on macscripter.net, I wrote an AppleScript to change decimal and thousands separator within csv files.
tell application "Finder" to set FileToEdit to selection as string set AccessToFile to open for access file FileToEdit with write permission set CSVContent to read file FileToEdit to switchText from t to r instead of s set d to text item delimiters set text item delimiters to s set t to t's text items set text item delimiters to r tell t to set t to item 1 & ({""} & rest) set text item delimiters to d t end switchText switchText from CSVContent to "." instead of "," set FirstStepText to result switchText from FirstStepText to "," instead of ";" set TextToWrite to result set eof of file FileToEdit to 0 write TextToWrite to AccessToFile close access AccessToFile
The script works fine from the Finder selection. However, I would like to turn into an Alfred workflow, using a file filter.
To do so, the file filter searches for csv files, and I changed the first line of the script to:
set FileToEdit to POSIX file q
... or other variants, but nothing worked.
Do you have any idea to fix it? Thanks!
-
Hi,
Sorry for answering so late. Thank you all very much for your help.
So I modified the Running workflow, adding an AppleScript to minimize window(s) of an app.
The script itself (for instance with Safari) works perfectly:
tell application "Safari" set miniaturized of every window to true end tell
... but does not work once in the workflow:
on alfred_script(q) tell application q activate set miniaturized of every window to true end tell end alfred_script
Any idea why? Is it because of the process/application difference?
-
OS X can assign apps to desktops without any help.
The counterpart is that when you delete this Desktop, all the apps assigned to it will show in the first one next you launch them. I would also like something more permanent.
-
For the people that are having trouble pairing, I have two questions:
- Is iTunes running when you try to pair? (it should be)
- Do you have sharing enabled in iTunes?
Yep, iTunes is open and sharing is enabled.
-
4. In Terminal, type "cd " (note the space at the end) and then drag the little blue folder icon from the top on the finder window into the terminal window and hit enter
I assume you referred to the main folder of the workflow. Unfortunately, I got no result to paste (only the basic command invite).
-
TingTingBen, Do you see the following screenshot during the pairing process?
No, Alfred turns to fallback search instead (as soon as I type the first digit).
Missing Standard Suite in AppleScript Dictionary
in Discussion & Help
Posted
Thanks for your suggestion, unfortunately this doesn't start Alfred when it's not already running. But it gave me the idea of this workaround:
and this works perfectly. Thanks!