Jump to content

Search the Community

Showing results for tags 'script'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Categories

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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Website URL


Jabber


Location


Interests

  1. So I recently installed a community workspace for Alfred and I see it's passing a query to a Python script - which brings me to my question. Where can I see the source of this script?
  2. Hi all, I'm trying to run a node.js script with Alfred, using this workaround: http://remy.bach.me.uk/blog/2014/03/writing-alfred-workflows-in-node/ It seems to work to get scripts to run without modules, but when I try to use the npm 'fast-csv' module, running the Alfred workflow with my script gives me the error "Cannot find the module 'fast-csv'". I've installed 'fast-csv' globally, so I'm not sure what else to try. (The script runs correctly when using the terminal.) Any ideas? Thanks
  3. Hi, have a file action to convert gifs to mp4 using ffmpeg: ffmpeg -f gif -i {query} -pix_fmt yuv420p -c:v libx264 -movflags +faststart -filter:v crop='floor(in_w/2)*2:floor(in_h/2)*2' ~/Desktop/converted_file.mp4 This works perfectly with the terminal command but I want it to run it as a script so it doesn't opens a terminal window. Do I have to change anything? The way it it's not working. Thanks in advance for your help!
  4. Is there any way to open the clipboard.alfdb in any terminal program so that I can remove sensitive data and replace it with something like "PASSWORDREMOVED" without corrupting the data file? Is it in any certain data format? Like if it was SQLite I could make the changes through there I know you can do function-backspace to remove entries from the clipboard, however, i just want to remove the sensitive data not the whole line from the clipboard. Thank you, Jared https://jared.nyc https://devopschat.co
  5. Hi guys, wondering if anyone has a clue about what changed with applescripts and accessibility in macOS Sierra. Since upgrading to Sierra, it seems all of my workflows that use applescript no longer work. This is not exclusive to Alfred; I have tried running multiple scripts in Script Editor, and Script Editor ends up hanging on run. In Alfred 3, no information shows in debug. Calling a workflow will just cause Alfred to stop responding. Console does not show any Event errors in Alfred or Script Editor. I haven't been able to find similar issues with other p
  6. This tutorial is aimed at Alfred 2. Alfred 3 allows you to connect one Script Filter to another, so these workarounds are not necessary. (They might still be interesting, however.) [added 2017-03-20 by deanishe] Provided below is a workflow that provides a demonstration of how to reuse a single script filter or, how to chain multiple script filters together so that you can create the illusion of having multiple steps or allow you to further refine results from the first script filter, using the second. Demo 1 This demo shows how you can use AppleScript to call the next s
  7. I am in need of a script or scripting to parse an onslaught of email data in Gmail and organized in a google sheets file which the column headers are titled in conjunction with the need data from the emails. This is how the data is relayed to me which I need a script to extract the indicated fields below into a new cell within their respected columns in Google sheets. If anyone can help I would greatly appreciate it, sure make my day a lot easier. Thank you. It was much easier to just screenshot the key I created to map out what I really need and what everything looks like on my end. (See
  8. Hey guys, quick question. Is there any easy way to use an image from a URL as the icon for a script filter? I've been downloading about 50 compressed thumbnails everytime I use a script I've been writing. (extremely slow) Do you guys know of any easier way to get images from a URL as a script filter icon? Thanks
  9. Hi, I'm trying to pass some variables in a workflow. The set-up of the workflow is as follows: Where the script is from datetime import date from datetime import timedelta import json today = date.today() offset = (today.weekday() - 2) % 7 last_wednesday = today - timedelta(days=offset) d = {'alfredworkflow': {'variables': {'last_wednesday': last_wednesday.strftime('%Y-%m-%d') } } } print json.dumps(d) And the copy to clipboard part is: SET @startdate = {var:last_wednesday}; SELECT ... The issue is the {var:la
  10. Hi, I made a simple an apple script to open a specific folder triggered by a hotkey, but it's not working and I can't find why. It works if I use the Script Editor from Mac OS but when I paste it inside the "Run NSAppleScript" window on Alfred it doesn't. Script: on alfred_script(q) property the_path : "/Users/UserXXX/Downloads" set the_folder to (POSIX file the_path) as alias tell application "Finder" activate if front Finder window exists then set target of front Finder window to the_folder else
  11. Currently, if I output the following: {"items": [ { "title": "Foo", "arg": "unicorn" } ]} I have to handle the `unicorn` arg in a connected output action in the workflow. It would be useful to be able to dynamically handle it without needing to create an output action. This can be useful for very dynamic results and creating reusable modules that create output with different actions. I propose adding a `script` property to the JSON format that when specified makes it not pass the output to any connected output action (like `valid: false`) and instead executes the `script` and
  12. Good morning, I'm currently trying to create a simple Script Filter Alfred 3 Workflow using Python. I found an earlier example which demonstrated how to pass XML results to a Python workflow: xmloutput = """ <?xml version="1.0" encoding="utf-8" ?> <items> <item arg="testitem"> <title>FooBar</title> <subtitle>foo bar is a test item</subtitle> <icon>icon.png</icon> </item> </items> """ print(xmloutput) My question is, what is the syntax for doing the same with the new JSON data structure? regards, A
  13. I have a workflow that is listening for spotify ads (so i can mute them). I have a while loop listening. When it finds an ad (a track with < 35 second duration), it sends a notification - but not an alfred style post notification; just the default applescript-like notification. Here's the code: Note: osascript -e "display notification \"Muting ad for $sleepDuration seconds\" with title \"Mute Spotify Ads\"" This is what I'd like to replace with an alfred Post Notification. vol=`osascript -e 'tell application "Spotify" to sound volume as integer'`; while : do state=
  14. Hi there! I've created a workflow that I want to share with my team, the workflow includes a Python script, which in turn has a dependency on a 3rd party library (the wonderful Requests[1]). Are there any best practices around sharing this workflow with my team, whilst easing friction around the third party dependency? For example, currently I'm advocating dropping down to the command line and installing the Python dependency globally, ideally I'd like to avoid this, if at all possible. Appreciate any pointers. Kind regards! Steve [1] http://docs.python-requests.org/
  15. Hello! First post to this forum! I just created my first workflow, which I'd like to share with my team. Problem is, my workflow includes a script which references a private API key, which I would rather not share with the team. Is there any way I can share the workflow, without exposing the script's API key? For instance, by replacing the API key in the script with a reference to an environment variable instead? Appreciate the assistance. Many thanks! Steve
  16. Newbie question, and maybe I'm missing something, but does Alfred not filter the results of a script filter based on arguments? I have a fully functioning filter, but it seems odd that Alfred doesn't filter the results based on the value of the argument. For example, if I have a script filter with the keyword "Press", requiring an argument, and the items "one","two","three", I'd expect that typing "Press o" would limit the results to "Press one", where typing: "Press t" would limit the results to "Press two" and "Press three" I've tried both populating and omitting the uid field, to n
  17. 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 prev
  18. Quite a lot of the scripts I run in Alfred involve handling multiple files (i.e. {query} is a list of tab-separated files). Without some relatively complex code (bash doesn't make it easy) that obfuscates the purpose of the script, they all break with files containing apostrophes. It would be very useful if there were an option to escape single quotes, like you can with double quotes.
  19. This workflow accesses a Bible program (Accordance) and searches it for the 'selected verse reference' then pastes the result. It works fine. Instead of a hotkey, I want to be able to type a keyword such as 'find' then a verse reference and have the reference run through the script. Tried some of the more obvious approaches, but it just won't work for me. Current configuration is ----- >>>Selection in OSX- Hotkey >>>Run Script- global theResult global moduleName global input global citationFormat set moduleName to "MLV 2016" --NOTE: Change this to c
  20. I have this simple shell script which adds today’s date when I run it: set the_date to do shell script "date \"+%y-%m-%d\"" My probem is being new and ignorant regarding workflows I do not know how to compose a workflow that will trigger this script. Can anyone help please? Cheers.
  21. I have spent almost 8 hours on this and I know it's an easy fix. I want to use this fork of the Sonos Ruby gem. The problem: I don't know how to require/include the gem, neither locally as a cloned copy or as a regular "require gem_name". The script runs fine in IRB, but when I try to run it in a workflow the sound doesn't pause. I thought it might be because my system Ruby is old, but I use Mavericks so that shouldn't be a problem. You can download the Workflow here from my Dropbox. And here's a SO question with more info, too. Any help is really appreciated. I am read
  22. Hey all Alfred lovers out there, After David Ferguson created the PHP Workflows class to help PHP gurus create complex workflows with ease, I decided to create an equivalent solution for AppleScript gurus, because let's face it: you can't really do with PHP (or other languages) what you can do with AppleScript in terms of controlling your Mac system and its apps. This library provides an object-oriented library of functions for working with plist settings files, reading and writing data to files, generating Alfred feedback results, requesting remote data, and more. But before you begin
  23. Hi all, I'm sure there's an easy answer to this, but could someone explain to me why a simple Keyword to Script workflow, consisting of a keyword foo and the following one-line bash script (where mate is the TextMate shell utility and bar is the absolute path to a text file) sudo mate bar does absolutely nothing, even though it works fine when I run it in Terminal,. This workflow used to work, but it hasn't for the past couple of months (I think, because I don't use it very often). It's not a huge deal, but I'd like to understand what's broken it. It's not because it's run with sudo,
  24. Hi, I need a workflow that searches folders located on NAS starting from a list of predefined folders. I need also to limit searches to 1 folder depth on NAS for speed and accurate search result. Example: I want to tell Alfred to look only inside this set of folders: /volumes/data/folder1 /volumes/data/folder2 /volumes/data/folder3 and limit the folder depth to 1 so only folders inside the folder list are searched. Using the 'find' command it would be: find /volumes/data/folder1 -maxdepth 1 find /volumes/data/folder2 -maxdepth 1 find /volumes/data/folder3 -
  25. Here is my problem. I modify a lot of strings cases these last days (ie Lower case to uppercase "my_file" to "MY_FILE"). After some research, I found I could use these TextExpander perl scripts (here) to solve the problem. But I believed Alfred could make it faster, better, smoother. What I want to do is select the name of my file, hit a hotkey, see the name of my file converted to uppercase/lowercase/sentence case... I tried to create a workflow with a "Selection in OSX" and a "Run Script" command. But it doesn't work. I should say, I couldn't make it work... I thought copying th
×
×
  • Create New...