Jump to content

Search the Community

Showing results for tags 'output'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting


  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL




Found 9 results

  1. The Run Script action, particularly relevant to osascript, appears to return the result of the script as text that is terminated with a line break character. This causes problems when the script returns a file path, which gets fed into the subsequent node of the workflow that is expecting to receive a file path that points to an existing file, but instead receives a file path that points to a non-existent file because of the extra character in its name. https://transfer.sh/LEmG3/Bug Report.alfredworkflow The workflow demonstrates the phenomenon. It simply displays an osascript output surrounded by quotes to visualise the string in its entirety. The code used in the `osascript` is: on run return "~/Downloads" end run This might not technically be a bug, per se, as I'm guessing the Run Script actions all execute a script by way of a shell command, and therefore it may be that the osascript command itself is returning this output rather than something Alfred is doing. That said, when I run the following command in Terminal: osascript -e 'return "~/Downloads"' | wc -l it reports that the output does only contain a single line.
  2. Hey All! Long time listener, first time caller. QUESTIONS Is there a way to set an Alfred variable from within a Run Script (bin/bash) command? For reference I'm calling a python script (i.e., python my_script "{query}") If not, how can I store the output of the Python script when it is a complex data type like a dictionary? CONTEXT I'm trying to write a workflow that utilizes an API, grabs some values, and then opens a URL. The user will enter an ID, the python Run Script will retrieve information about this via the API call, and then using the returned data I would like to open a web URL. Currently the python script is creating a dictionary of useful data and storing like so: useful_dict_info = {"key1" : "value1", "key2": "value2"} I think return from the Run Script by using print: # some code to create useful_dict_info print useful_dict_info What I would like to do is either store key1 and key2 as Alfred workflow variables from within the script OR parse the output from Run Script and store them as Alfred workflow variables. Thoughts? P.S. I'm a huge fan of Alfred and thanks for all the work you've put into it so far. It saves me minutes, if not hours, each day and I keep adding more and more workflows!
  3. Hi, after browsing documentation and here in the forum I couldn't figure out how I can tell Alfred what is sent to an Output Action like "copy to clipboard" or "display large"? I have a script filter, which queries a JSON datasource and receives 6 fields. These fields are assembled to an item's title (F1+F2) and subtitle (F3/4/5/6). How can I achieve that e.g. the content of Field 5 is copied to clipboard when users hits enter on an item? Thank you Thomas PS: In my test environment "{query}" is pre-populated in the dialogue when creating the output-action, but Field 3 is received by the output action. I expected {query} to contain the letters I have entered in the Alfred input field so far.
  4. Hello, while I love the ease of use of alfred and the great workflows created by the community, there is one thing missing for me to make Alfred perfect. It would be cool it were possible to output html or an image when a user presses enter on an item. This would be great for showing information on the web like wikipedia, imdb or wolfram alpha. It would also enable output that is more visually pleasing than plain old text output. I know that the not longer maintained Flashlight (https://github.com/nate-parrott/Flashlight) had this feature. Cheers Leon
  5. Hello everyone, here is my first post on this forum. I know there is some other similar posts on the forum... I've read them... but they don't do exactly what I'm looking for. Let me explain myself clearly and you will understand : I have an "old" applescript which toggle the sound output on a press of a hotkey (F7) between 2 different outputs : my display's speakers or my headset. As a result it also send a notification to Growl saying something like "Sound output changed to...". Here is the actual AppleScript : tell application "System Preferences" activate set current pane to pane "com.apple.preference.sound" end tell tell application "System Events" tell application process "System Preferences" tell tab group 1 of window "Son" click radio button "Sortie" if (selected of row 2 of table 1 of scroll area 1) then set selected of row 3 of table 1 of scroll area 1 to true set deviceselected to "HEADSET" else set selected of row 2 of table 1 of scroll area 1 to true set deviceselected to "MAC" end if end tell end tell end tell tell application "System Preferences" to quit tell application "Growl" set the allNotificationsList to {"Sound Notification"} set the enabledNotificationsList to {"Sound Notification"} register as application "Toggle Sound Output" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "System Events" notify with name "Sound Notification" title "Audio Output" description deviceselected application name "Toggle Sound Output" end tell This script worked well in Alfred 1 as a "trigger" but today I'm a proud new owner of the great Alfred V2 and I'd like to directly integrate this script into a Workflow. And here starts my problems : - I can integrate the script to activate after the press of an hotkey... but I'm unable to output a notification center visual result or - I can output a notification center result but without any {query} (of course) so without any usefull information. I tried some of the workflows I've found on your nice forum (Next Audio Output Device...) but what they do is that they ask me to type "o u t p u t"... then to use my keyboard or mouse to choose which sound output I want. It's "long" ! I'd like to press my hotkey and "boum" automatically switch from headsets to display's speakers and vice-versa ! As you understood at this point, I define myself as "noob" concerning scripting/programming. I usually succeed to get my solution by copying/pasting parts of codes from different scripts... Alfred is so cool I'd like to have more learning about that, that's also the reason I post here :-) Sorry for the long message. Hope someone would give me some solution. Thanks
  6. How would I return the output from javascript in a "Run Script" Action? The following code returns nothing. I tried in OS X Script Editor and it let me know that the "return" command can only be used inside a function. Is there something I'm missing? My code is below var query = "{query}"; var time = query.split(":"); var hours = time[0]; var minutes = time[1]; var seconds = time[2]; var secondsDecimal = (seconds / 60) return secondsDecimal
  7. It would be great to see "javascript" in the list of languages for "Run script" under action and output in the workflows, so that we can have these executed with nodejs.
  8. CarlosNZ

    Notification center word wrapping

    This might be a problem with Notification Center itself rather than Alfred, but I thought I'd point it out anyway and see. Basically, there is a certain length of text output which is unnecessarily truncated in Notifications. For example the output, "Here is a line of text that doesn't quite fit" renders like this: However, if you add a bit more to the string, you get this: This one breaks in the right place and you can see the whole text output. I'm running OS X 10.9.2 with the latest public Alfred release on a 2009 Macbook Pro. Cheers.
  9. Hi, sorry if this topic has come up before but i haven't found any proper answers for this yet: Is there a way to properly set the output of shell scripts in the workflows? for example some kind of variables to set to put into the fields "title" and "text" ? in alfred1 i just "echo"'d stuff inside of the script which was taken as input to the notification centre but now i have some trouble to do this correctly.... maybe i'm doing it wrong, but then again, sometimes i would like to have 2 variables displayed as title and text ... is there any way? kind regards fabian