Jump to content

thewondermint

Member
  • Posts

    4
  • Joined

  • Last visited

Posts posted by thewondermint

  1. I'd look at the first example here: http://www.alfredforum.com/topic/1283-how-to-script-filters-reusing-a-single-script-filter-or-chaining-multiple-together/

     

    It inputs last name, writes it to a temporary file, calls a second search action that inputs first name, reads last name from the temporary file, deletes the temporary file, and finally outputs first name last name.

     

    You'd just need to modify it to get the addresses from contacts instead of user input (which it sounds like you've figured out already), and change the echo  command in the 2nd bash script to include all the necessary bits for the google maps URL, then replace the Post Notification with a Open URL.

     

    You're giving me way too much credit :-P

     

    I completely understand the concepts and logic behind using the second bash script (I barely even know what a bash script is) to achieve what I want, but I have absolutely no idea how to modify it to force me to choose addresses instead of user input.

     

    Where do I look for next steps or what should I be changing?

  2. So I'm trying to come up with a way to track my daily mileage. Assuming I have addresses stored in Contacts.app, here's how I envision it working:

     

    - Using the home addresses as the reference, I want to select two contact cards and send them into Google Maps and have it return the mileage back into Alfred.

     

    The typical Google Maps search looks like this: https://maps.google.com/maps?q={query}

     

    My goal is to have something that looks more like this: https://maps.google.com/maps?saddr={query1}&daddr={query2} where {query1} is the starting address and {query2} is the destination address.

     

    So far I've tried:

    - Creating a contacts action that sends the address to Google Maps. This gets me 1/3rd of the way.

    - Copying the first address to my clipboard and then performing option one (Contacts action) on the second address and then pasting the first address into maps when it pops up. This doesn't save me nearly enough time.

     

    First: is this even remotely possible?

    Second: I'd love to know how to do something like this, I'm not really interested in having someone do this for me. I'm an absolute beginner when it comes to scripting of any kind, but I'd love to learn.

     

    What am I missing or not considering?

     

    Thanks!

     

    -Andrew

     

     

×
×
  • Create New...