Jump to content

b-dubs

Member
  • Posts

    3
  • Joined

  • Last visited

Posts posted by b-dubs

  1. 48 minutes ago, deanishe said:

     

    Bug in Alfred. With External Script, Alfred always passes an argument, even if you have the Script Filter set to No Argument. So check that sys.argv[1] isn't an empty string before trying to parse it.

     

    I'm not sure exactly what your workflow is ultimately supposed to do, but for what it currently does, I think you're going the wrong way about it. You should probably use a simple Keyword (not a Script Filter) and connect it to two outputs: the notification and the script that queries the database and sends the email.

     

    Thank you!

     

    Using a keyword trigger to run an external script, which then triggers a post notification did exactly what I was looking for. Strange bug with the passing of arguments no matter what, but checking for an empty string also fixed that problem. All is working now.

     

    Thanks!

  2. Ok. I played with it a little and got it to send a notification, but I have to sit and wait for the python script to finish running before doing anything else, or Alfred won't send the notification. Is that normal? The workflow can be found here:

     

    https://www.dropbox.com/s/xsjkanvaod7uvo4/Attendance Pad.alfredworkflow?dl=0

     

    Also, how does one send queries from Alfred into python? I have an if/else statement in my python script that checks to see if arguments have been passed and, if not, just find the date of the last Sunday and use that to query the database. When I do that I get a python error that the date is formatted incorrectly, even if I don't send anything along.

     

    Thanks

  3. I have a python script that is being run as an external script, using Python 3, and I wanted to get a variable out of my script to post in a notification. The script queries a MYSQL database, creates a CSV file from the database and then emails it. All I want to do is get a single variable out of my script and use it in the notification, but I can't seem to get notifications running at all with the workflow. Even if I try to just post a "Success" notification, nothing appears. What am I missing?

×
×
  • Create New...