Jump to content

bencfd

Member
  • Posts

    63
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by bencfd

  1. 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: tell application "Finder" to open file "/Applications/Alfred 2.app" as POSIX file and this works perfectly. Thanks!
  2. 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!
  3. 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".
  4. Thank you very much @deanishe for the explanations and the solution you provided, that makes sense and works perfectly!
  5. 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!
  6. 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!
  7. 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.
  8. 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?
  9. 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!
  10. So that was just because of this... Then, I'll consider the pull request and be patient
  11. Almost one year has passed but let's try again! Yes, iTunes is running and sharing is enabled. 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?
  12. 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.
  13. 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. Download
  14. 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!
  15. Not the case neither on Mavericks with Alfred 2.1, but it appeared with Alfred 2.1.1.
  16. 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.
  17. 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!
  18. 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.
  19. 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!
  20. 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!
  21. 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?
  22. 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.
  23. Yep, iTunes is open and sharing is enabled.
  24. I assume you referred to the main folder of the workflow. Unfortunately, I got no result to paste (only the basic command invite).
  25. No, Alfred turns to fallback search instead (as soon as I type the first digit).
×
×
  • Create New...