Jump to content

graphorce

Member
  • Posts

    15
  • Joined

  • Last visited

graphorce's Achievements

Helping Hand

Helping Hand (3/5)

1

Reputation

  1. Thanks for this, to which script do you add this? File name? Is it possible to have this natively inside the extension in the next update? Thanks
  2. And if it helps this is the code from the previous plugin that I was using: on tellthings(w) tell application "Things" parse quicksilver input (w) end tell error number -128 end tellthings on testclass(f) set teststring to "r" try set teststring to (f as integer) end try if (class of teststring) is integer then return true else return false end if end testclass on alfred_script(q) if application "Things" is running then else tell application "Things" to activate tell application "Finder" set visible of process "Things" to false end tell delay 1 end if set x to "" set y to "" set days1 to 0 set endspace to false set today to current date set x to text 1 thru ((offset of "::" in q) - 1) of q if (offset of "::" in q) = 0 then set y to "" else set y to text (offset of "::" in q) thru -1 of q end if repeat while endspace is false if (text -1 of x) = " " then set x to text 1 thru -2 of x else set endspace to true end if end repeat if ((count of words of x) < 3) then tellthings(x & y) end if set foundmnothdate to current date if (word -2 in x = "next") then if (word -1 in x) = "day" then set x to text 1 thru ((offset of (word -2 in x) in x) - 2) of x tellthings(x & y & ">+1") else if ((word -1 in x) is in ((current date)'s weekday as string)) then set x to text 1 thru ((offset of (word -2 in x) in x) - 2) of x tellthings(x & y & ">+7") else set foundweekdate to current date set leftweekdays to 0 repeat while (word -1 in x) is not in ((foundweekdate's weekday) as string) set foundweekdate to (foundweekdate + 1 * days) set leftweekdays to leftweekdays + 1 if leftweekdays > 8 then tellthings(x & y) end if end repeat set x to text 1 thru ((offset of (word -2 in x) in x) - 2) of x tellthings(x & y & ">+" & leftweekdays) end if else if (word -3 in x = "in") and testclass(word -2 in x) then set days1 to (word -2 in x) if (word -1 in x) is in "days" then else if (word -1 in x) is in "weeks" then set days1 to days1 * 7 else if (word -1 in x) is in "months" then set today's month to (today's month) + (word -2 in x) set days1 to (((today - (current date)) / 86400) as integer) else if (word -1 in x) is in "years" then set today's year to (today's year) + (word -2 in x) set days1 to (((today - (current date)) / 86400) as integer) end if set x to text 1 thru ((offset of (word -3 in x) in x) - 2) of x tellthings(x & y & ">+" & days1) else if ((word -3 in x = "on")) and ((word -2 in x) is in "january february march april may june july august september october november decemer") and testclass(word -1 in x) then set foundmonthdate to current date if ((word -2 in x) is in ((today's month) as string)) and ((word -1 in x as integer) ≤ (today's day as integer)) then set foundmonthdate's month to (foundmonthdate's month) + 1 end if repeat while (word -2 in x) is not in ((foundmonthdate's month) as string) set foundmonthdate's month to ((foundmonthdate's month) + 1) end repeat set foundmonthdate's day to (word -1 in x as integer) set x to text 1 thru ((offset of (word -3 in x) in x) - 2) of x set days1 to (((foundmonthdate - (current date)) / 86400) as integer) tellthings(x & y & ">+" & days1) else tellthings(x & y) end if end alfred_script It used to calculate dates perfectly, I guess the only workaround for this is to parse this script, take the date, convert it to the standard things format (or the date settings as per user's local settings on mac which is what Things accepts now) and then send it across to things. Damn, really hate them for breaking things when updating Things.
  3. Oh thanks, then I guess we would have to parse the input with the script and return the date in the standard things format. Or wait for them to fix it.
  4. Would be great if this supports natural language for due dates. In one week, in 3 days, today, tomorrow, on march 3, in 4 months etc., There was another things workflow that did this, but it isn't as feature rich as this one. Thanks a lot!
  5. Is there any easy way to expand the same behavior to other folders? For example, list recent files form ~/Desktop? Thanks a lot!
  6. Thanks, working fine now. It's quite slow though, but obviously that's kippt's fault.
  7. Nice workflow, thanks! Not able to get my API key from that link though?
  8. Never mind, got it to work. Thanks a lot for the workflow! For those who are wondering how to do it, edit the shorten script in the workflow, find & replace: 'bit.ly' : {'api_url':'https://api-ssl.bitly.com/v3/shorten?format=json&login=yourusername&apiKey=yourlegacyapikey&longUrl=','title':'bit.ly','des':'http://targetdomain.com'}, Target domain must be added to your 'custom short domain name' in bit.ly settings.
  9. Works perfectly! Thank you!
  10. Is it just me or do direct links obtained with this workflow expire after sometime? I'm getting a 401 error for a link that worked fine yesterday. Thanks!
  11. Just tried this and it works great, thanks a lot!
  12. This has been working flawlessly for me, just one thing, is there a way to get a shortened link for those 'direct links' too? Something like http://db.tt/A42fai2 instead of https://dl.dropbox.com/1/view/9p8436cit2jlmvg/Public/Comps/24125.png ? Thanks a lot!
  13. Thanks a lot for this. It would be fantastic to have natural language ability here. Enter things like '2 days', 'mar 13', 'next monday'. Not sure how difficult that is though. Thanks again!
×
×
  • Create New...