Jump to content

bencfd

Member
  • Posts

    63
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by bencfd

  1. Thank you David! The $previnput fix was obvious actually. However, how can I prevent it to add backslash in case my selection contains spaces? Then, about the array. I understand what you mean and I looked into some workflows to see how it works, specially your Chrome bookmarks workflow. I removed the echo, since I think it has to be part of the filter. Here's the new script: previnput=$(cat saved.txt) <?xml version="1.0"?> <items> <item uid="emphasize" arg="'\\emph{$previnput}'"> <title>'emphasize'</title> <icon>icon.png</icon> <subtitle>\emph{}</subtitle> </item> <item uid="reference" arg="'\\ref{$previnput}'"> <title>'reference'</title> <icon>icon.png</icon> <subtitle>\ref{}</subtitle> </item> </items> But then, I have no clue... Maybe something like that? $input = {query} $options = array ( 'emphasize' , 'reference' ) ; $results = array(); foreach( $options as $input ): $item = array( // no idea how to code ); array_push( $results, $item ); endforeach; // echo arrayToXML( $results );
  2. This is a great idea, I'm looking for that since months! However, duplicates are still here...
  3. Hi there! Following help from our Guru David, I'm trying to set a chained script filter workflow to paste a text string, chosen from a feedback list. My purpose is to get my personal shortcuts for TeXShop, a TeX editor, working from Alfred. However, there are few points I can't figure out (my competence stop with AppleScript ). You can download my draft workflow here: http://d.pr/f/3BPN The first step saves the OS X selection. The second step can be invoked by another hotkey, in case I don't select any text. The script filter in this step provides the text strings that I'm susceptible to need. E.g., \emph{}, \ref{} (minimal example, I'll set many more later). I would like that the selected text (saved in a .txt file at step 1) comes between the brackets of the commands, like \emph{Previously selected text}. Or nothing if I haven't selected any text. Also, I would like the second step not to show all the items from the script filter, but rather those who match what I will type in Alfred. Does one of you know how to fix that? Any help will be much appreciated!
  4. +1 for the request of vdesabou Additionally, could it be possible to set second action modifier, so as to delete all the downloads from the typed extension? And a third for just all downloads?
  5. Nice! Instead of a hotkey, I rather set the keyword "email", with optional argument. That way I can still look for a recipient in my address book, but in case he's not registered, your workflow open the blank email. Super efficient!
  6. By the way, just in case someone is interested by the suffix: http://cl.ly/2r3U0J2T2t3j I'm not sure it's worth making a topic in "Share your workflow" for that
  7. Great! I guess I got too impatient
  8. Hi, Here is a small bug report for which I'm surprised that there's nothing about yet. It might be only me... Simply the control keywords for iTunes don't appear in Alfred (v2, I mean). Here some snapshots: http://cl.ly/image/1s2U1V1R0Q0U http://cl.ly/image/3P1z0F0Y0r0I http://cl.ly/image/1X3l2z1z300j Is there any known reason for that? Thanks!
  9. Workflows are so great!

  10. Hi there, This workflow request follows some discussion with Vero here. My wish would be that the contact filter from Andrew passes through the workflow an argument which I can use in AppleScript. It currently passes the full path of the contact file, from which I can easily get the id of the person, but I can't get my script to get infos from this ID. Thanks to this ID (or anything else), I'd like to get for instance the birth date of the selected contact (as it is not displayed in the Contact Viewer ). This last part of the script is not a problem to me. The problem is the connection between the selected contact and the AppleScript. I hope I'm making it clear enough Thanks for your help!
  11. With this contacts metadata filter, is this possible to add an AppleScript action? I can't figure out how to get the my script working with the "file" of a contact.
  12. Yes, I do want the suffix, it's actually why I came to this script I tried your Copy to clipboard with auto paste alternative and it works fine. And it's definitely more Alfred v2-friendly! Thanks for your help!
  13. Hi, Since almost one year, I use a small AppleScript to keystroke the current date (from non-English system). With the option "Run AppleScripts instead of opening" ticked, I'm able to get the current date typed anywhere I want. However, since I migrated 2 Alfred v2, it doesn't work anymore. Note that it still works with Alfred v1. Here is the code: set FirstList to {1, 21, 31} set SecondList to {2, 22} set ThirdList to {3, 23} if day of (current date) is in FirstList then set DateEnding to "st" else if day of (current date) is in SecondList then set DateEnding to "nd" else if day of (current date) is in ThirdList then set DateEnding to "rd" else set DateEnding to "th" end if -- Keystroke date set CurrentDate to weekday of (current date) & ", " & month of (current date) & " " & day of (current date) & DateEnding & ", " & year of (current date) as string tell application "System Events" to keystroke CurrentDate Any idea why Alfred v2 doesn't want it to work? Thanks!
×
×
  • Create New...