Jump to content

forgetfulfellow

Member
  • Posts

    98
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by forgetfulfellow

  1. Thanks for the super-fast-reply : )

     

    Still doesn't work though. I wonder if it doesn't get contacts with more than one im address assigned, like one mob number and one email address assigned to the same contact...

     

    I just updated my script to include ANY person that has ANY number. The only "flaw" that my script has is that it only shows one option for every person. I rely on iMessage to choose the best number for me, as I only feed iMessage a name.  Just call keyword "imu" again.

     

    Please tell me if it works for you. If it doesn't... we'll have an interesting bug on our hands

  2. Hey,

     

    It doesn't shows up all my contacts, actually it miss most of the iMessage users... any help?

     

    I did imu and findcontactswithcommas.

     

    Hey! Thanks for getting back to me.

     

    As for your problem, it reflects the "bet" I made on how I picked contacts. Originally, I thought that iMessage contacts would only have "mobile" phone numbers, and so I filtered out all contacts that don't have mobile numbers. However, I realized that this might not be the case for everyone. I updated Alfred to reflect this; you can download it at the same link :)

     

    Please get back to me if it still doesn't work

  3. iMessage Workflow V3

     

    My workflow has been easily surpassed by others, please use theirs :) ---------> http://www.alfredfor...red/?hl=unicall

     

    However, I'm updating this workflow to Alfred 3 for posterity's sake. Sorry for taking so long guys...

     

    Archive

     

    Change log:

     

    2/12/2017 - Because of a specific error, I've updated this app. Alongside the minor bug, thanks to Amos Manneschmidt's workflow "Call or SMS contact", I learned how to use OSX's built in Contact app to feed out contacts. Furthermore, I updated this app to be compatible with Alfred 3.  

     

    4/30/13 - Non-Latin languages are now supported! I have verified Korean, Chinese, and Japanese. If it works for your language, please tell me!

     

    11/27/13 - My extension prioritizes numbers that have been used before. This should allow Alfred to choose the correct number associated with a contact MUCH more accurately. Works only with phone numbers, not email addresses;

    A notification is now displayed when contacts are not updated successfully (mostly a response to Exceptions thrown when trying to update) 

     

    11/21/13 - Emoticons should now work; Alfred now opens up iMessage if its closed

     

    ------------------------------------------------------------------------------------------------------------------------------------------------

     

     

     

    If using the OLD way:

    Setup:  Run command 'IMU' before you start using the workflow

     

     

    Find Contacts and Send Messages:

    Keyword: "im"

     

    i_Message_Alfred.png

     

    1b. Send a message to the aforementioned contact

     

    Screen_Shot_2013_11_21_at_5_40_33_PM.png

     

      2. Reply to most recent iMessage or Group Message (Thanks to David Ferguson's Workflow)

          Keyword: ".."

     

    Screen_Shot_2013_11_22_at_11_39_34_AM.pn

     

    Download Link: https://github.com/NolanChan/iMessageWorkflow/raw/master/iMessage.alfredworkflow

     

    Please post up bugs in the comments below! 

  4. https://github.com/Tyler-Anderson/Applescripts-

    I'm sure its been done a bunch of times, but I created a super simple alfred workflow that calls a script to toggle hidden files. I haven't used applescript otherwise, but i still think it's a super simple example for anyone who needs an example. 

     

    Hi,

     

    I just downloaded your workflow; may I ask how it works? It seems to want an argument, and also when I call it nothing happens. 

     

    Thanks!

  5. I also wrote a filter to do this, the problem is, its fairly useless, as there is no tab to complete and you can only press enter onc

    This actually bugs be a lot, and I plan on making a large blog post detailing how to fix it sometime around thanksgiving when I get a break from college. 

     

    Hi Frostbite,

     

    I also just created a Growl Voice extension, and I was wondering if I could post an extension that combined both my Google voice workflow, your iMessage workflow, a script filter for all of them, and David Ferguson's extension. If not, I can just post my Google voice workflow. 

     

    Thanks!

  6. Hey forgetfulfellow,

     

    Thanks for your reply! The example number, "50" was hardcoded in there as follows:

    divided = 50 / goldenRatio
    multiplied = 50 * goldenRatio
    

    So I just swapped it to "input" so that it would work dynamically:

    divided = input / goldenRatio
    multiplied = input * goldenRatio
    

    This works great!

     

    However, what would be optimal is if the two answer numbers were visible upon typing "golden 50"(much like when you enter a basic math equation, such as "2+2", you see "4" immediately, with action to copy). This would be a lot more helpful as I could get a quick reference at a glance without having to copy to the clipboard if I don't need to.

     

    My photoshop is better than my coding, so maybe this will help give an idea of what I'm thinking:

     

    zplBaPT.jpg

     

    If it would be difficult to get both to show up like that, then having just the larger number only would still be nice.

     

    Actually, now that I think about it, entering "50" would produce 80.9... which, ideally would round up to "81" rather than truncate to "80". While I suppose it would be handy for some to have the number out to a couple decimal places, I'm really only needing the whole number for my purposes, as I'm dealing with pixels in my designs.

     

    Thanks for your efforts thus far!

     

    Seems like I shipped out my code too quickly! Sorry about that :)

     

    Also, Tyler's version is much more comprehensive than mine, so please use his

  7.  

    I use golden ratios with considerable frequency when designing, and typically end up going to a website like this to calculate the two adjacent numbers (above and below). What would be fantastic is being able to type something like "golden 50" into Alfred and have results 1 and 2 be "81" and "31" respectively with "copy to clipboard" being the action.

     

    I'm not super knowledgeable with scripts, so any help is much appreciated!

     

    Here you go :)

     

    http://bit.ly/1aG2hbb

     

    Just tell me if you have any problems/modifications. My output may not be to your liking.

     

    I included the "golden" keyword, as well as a "goldenD" keyword just incase you want the adjacent numbers with their decimal parts.

  8. Hi all, sorry it took me so long to get back to this, school takes priority.

     

    Awesome! I'll integrate and post an update tonight, thanks.

    I also wrote a filter to do this, the problem is, its fairly useless, as there is no tab to complete and you can only press enter once. 

    This actually bugs be a lot, and I plan on making a large blog post detailing how to fix it sometime around thanksgiving when I get a break from college. 

     

    David Ferguson actually wrote a post chaining together workflows here: http://www.alfredforum.com/topic/1283-how-to-script-filters-reusing-a-single-script-filter-or-chaining-multiple-together/

     

    I wouldn't mind writing it myself, but I'd find it a little awkward if we put out two extensions on the same topic. Hope this helps you out  :)

  9. Hi everyone,

     

    I've created a GrowlVoice Alfred Workflow. It honestly doesn't save you that much time, since opening GrowlVoice takes about half a second with a shortcut, but things are always more fun to do in Alfred!

     

    So down to business:

     

    YOU MUST CALL UpdateContacts BEFORE YOU CAN RUN THIS WORKFLOW

     

    There are two keyword calls in the workflow at the moment:

     

    1) UpdateContacts [no arguements]

     

    So before you use this keyword, there are a few steps you have to follow.

    The main idea of this script is to pull the first 1000 phone numbers you have on your google account, and store them on your hard drive as a text file. This technique is more for me as a proof of concept. Honestly, a better way to do this is to write an applescript to check phone numbers from contacts. However, I don't know Applescript, and any help would be immensely appreciated :)

     

    ***

    Disclaimer:

    You will also need to input your username and password into the python file for this to work. I know this sounds a little shady, and I promise that my code doesn't do anything weird (since I'm basically using Google's Data skeleton with a slight change to pull phone numbers) but I'm including this here as a warning. After you finish using the UpdateContacts function, feel free to remove your username and password

    ***

     

    So the steps to preform before calling this workflow is:

     

      1) Get into the GrowlVoice Alfred Workflow folder by: Right Clicking on the GrowlVoice section in Alfred Preferences and choose "show in finder"

      2) Open up UpdateContacts.py in your favorite code editor; The TextEdit application should be fine

      3) Put your email and password in-between the quotes:

      

      email = ""

      password = ""

      

      4) Save the file

      5) Run in the alfred box: UpdateContacts

      6) If you are connected to the internet and you put in your email and password correctly, you should receive a notification that everything has worked

      7) You're good to go!

      

    2) gv [name of person]

     

    This keyword, followed by the name of the person you want to text, should bring down options of people you can choose to text.

    When you choose a person to text, the growlvoice window should open up, and the person's number should be in the addresse' box.

     

    YOU MUST PRESS TAB BEFORE YOU START TYPING A MESSAGE IN GROWLVOICE, OR ELSE IT'LL JUST CLEAR THE NUMBER.

    You'll know what I mean when you start typing. :)

     

    Download Link:


  10. ***This Workflow Requires the Internet***

    ---------------------------------------------

    V 0.1 - Search the ESV by Verse

    V 0.2 - Search the ESV by keyword

    V 0.3 - Search the NASB by Verse

    ---------------------------------------------

     

    Hey everyone,

     

    I just created a workflow for quick and easy lookup of verses from the Alfred bar. 

     

    1) Type in ESV, followed by the book, chapter, and verse:

     

    The verse from the ESV bible will be automatically copied to your clipboard, and a notification will be in your notification center with the entire verse.

     

    Screen_Shot_2013_10_05_at_4_58_09_PM.png

     

    2) Type in ESVS along with your search phrase:

     

    Alfred will look up the phrase in the ESV Bible and return all options that contain that set of words. Choose between a submenu of verses, and it will be copied to your clipboard.

     

    Screen_Shot_2013_10_17_at_3_48_05_PM.png

     

    3) Type in NASB along with the chapter and verse

     

    "Same as ESV Verse Look Up"

     

     

    At this moment, the ESV and NASB are supported. Feel free to request a different version of the bible that you use, and I'll be more than happy to add it  :)

     

    Here's the download link: http://bit.ly/18TUkbX

     

    There may be a few bugs that affect an extreme minority of verses due to formatting; I believe I've taken care of it, but please feel free to report bugs as well.

  11. Alfred doesn't do any parsing on the query; that's where your code comes in ;)

     

    Since you're working in AppleScript, this should work:

    set AppleScript's text item delimiters to {"."} -- Use "." as separator
    set argv to text items of argv -- This splits the string into a list, using the new separator
    set cpu_ready_ms to item 1 of argv 
    set num_cpu to item 2 of argv
    
    return "CPU Ready Milliseconds: " & cpu_ready_ms & "Num CPU: " & num_cpu -- This returned string becomes {query}
    

    Now, as far as sending two separate variables to Alfred's Notification Output: this is not currently possible. Only one variable, {query}, is available. You can use {query} multiple times, though.

     

    Cheers :)

     

    Hey Tyler, 

     

    Thanks for answering my question. However, my new question then becomes:

     

    How can you parse the {query} after you send it as output? Since I want to be using different chunks for different parts of my notification title/text. 

     

    Thanks!

  12. Alfred passes all input into the scripts as a single string. If you needed to pass multiple parameters, you could parse the string (using a delimiter) and then pass them individually to the script of your choice.

     

    What language does Alfred parse in?

     

    For example, if I passed as output "1.2" to the "post notification" block,  how can I just retrieve the "1"? Or the "2"? 

    This would be useful to me if I wanted to make the "post notification" title = "1" and the text = "2"

     

    Thanks!

  13. Nolan, using the workflow I created as a sample.. 

     

    1. In the keyword, I changed the "Argument Required" option to "No Argument"

    2. In the Run Script, removed the code I used and pasted in your code exactly with no modifications.

    3. Replaced the notification with an Output->Large Type and connected it up 

     

    It showed the output perfectly in the Large Type window. It worked with the notification also, it just truncates the text shown because notifications don't stretch to fit whatever content you give it. If you were using Growl instead (and only with certain themes) you could make it show up in a notification and show the full content.

     

    WOW! For some reason, it works in your workflow and not mine... But thank you so much!

     

    I got it to access the API with arguments, so I'm bug-free in the coding realm.

     

    Now I want to add submenu options (Allow header, allow verse number, allow chapter name, etc.) and I searched this "help forum" for 'submenu' but all I got was one post for the alfred file directory. 

     

    Is there any official documentation on how to add options/submenus using python?

    I tried looking on the Alfred website, but I couldn't find much.

  14. Hi David,

     

    Thanks for the sample workflow; it seems that all my problems about input are pretty much solved.

     

    However, I have stumbled upon my main problem that I am extremely baffled at.

     

    So I know that this piece of code works 100% in the terminal. Basically, I'm creating an app that queries an API online (in this case a website containing the bible) and getting back plain-text.

    When I plug this code into a python file and run it from the terminal:

    import urllib2
    import sys
    
    url = "http://www.esvapi.org/v2/rest/passageQuery?key=IP&passage=proverbs+8:11&output-format=plain-text"
    
    page = urllib2.urlopen(url)
    
    print page.read()
    
    

    I get:

     

    =======================================================
    Proverbs 8:11
     
      [11]for wisdom is better than jewels,
        and all that you may desire cannot compare with her.
     
     
    However, when I plug this into Alfred, it seems that the output does not get properly passed along and returns nothing.
     
    Could you give me a clue as to what is malfunctioning?
     
    Thanks!
    Nolan
  15. What kind of Action item are you using? Run Script? Or are you attempting to use a Script Filter to send data to another step? Sorry if this question sounds ridiculous, I'm not trying to insult your intelligence or anything, it's just to eliminate the possibility that something simple was overlooked but.. You did remember to set the script Language in the settings for the item right? I hate to admit it but I sometimes fall victim to this. I click through too fast sometimes and forget to actually tell it what language I'm attempting to use. *hangs head in shame* :)

     

     

    Hi David,

     

    Don't worry, I seriously need all the error-checking I can get! This is my first workflow, so I'm open to all the questioning  :)

     

    At the moment, I'm using a "keyboard -> script -> notification" template, with my script language set as /usr/bin/python.

     

    Also, I just figured out that I'm supposed to pass in the incoming query variable like this: "{query}"

    But may I ask why this is the case?

     

    Also, after figuring this argument problem out, I made appropriate changes to my code to accept this variable, but my code doesn't work. Currently, I would doubt the code itself (since I'm not proficient at coding) but I know 100% that it works with the terminal. I have a few leads on what might be wrong, but let me ask you some preliminary questions:

     

    Is the type of  the "{query}" variable a string?

    Is there a difference as to whether I need to use urllib instead of urllib2 if I'm retrieving something from the web?

     

    Thanks!

  16. Hi,

     

    It seems that I have had trouble following the (simple) instructions I've seen on various messages in the forum. To explain my problem: Even though I printed the value that I wanted to return from my script, it was neither outputed in the "post notification" section or copied to my clipboard.

     

    My entire python script is:

    print {query}

     

    and the only code I have in "copy to clipboard" is:

    {query}

     

    as well as the text section  in "post notification":

    {query}

     

    Yet nothing shows up!

     

    Could someone kindly point me to Alfred Documentation? It seems that my googling powers are not as great as I thought...

     

    Thanks!

×
×
  • Create New...