Jump to content


  • Content Count

  • Joined

  • Last visited

About miguelccarvalho

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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
  2. I wasn't able to replicate this and I think it is because Sequel Pro requires me to hit "Connect" before it starts. Re-formulating the problem, I need something that: 1) Activates Sequel Pro; 2) Hits "Enter" in the "Connect" button which shows upon opening the app; 3) Pastes the query; 4) Runs the query; 5) Exports to CSV I added something to the script and it works My keyword is now connected to a Run Script object which contains: tell application "Sequel Pro" activate tell application "System Events" keystr
  3. Hi, I want my workflow to open Sequel Pro and paste a SQL query directly in the query field (and, ideally, run it and export to CSV). As of now, it opens Sequel Pro and gets the query in the clipboard so that I only have to do CMD-V into Sequel Pro. However, I was wondering if there is a way to automate that last part - paste, run query, and export to CSV (all of which would run from inside Sequel Pro). Is this possible? EDIT: I've created the query in it's own SQL file so workflow now opens that file with Sequel Pro --> CMD-V part is solved.
  4. Hi, I'm working on my first workflow. The goal is to connect the Keyword "shifts" to: 1) Navigating to a specific folder; 2) Run a python script which is in there (script prompts user for 2 dates in format YYYY-MM-DD) 3) Enter today's date in the format YYY-MM-DD; 4) Enter tomorrow's date in the format YYY-MM-DD; I've managed to do it up to, and including, step 2. However, I don't know how to enter today's date (whichever date today is) programatically in the workflow. I've tested with dummy data (entering two dates in the format) and it works fine s
  • Create New...