Jump to content

derico

Member
  • Content Count

    25
  • Joined

  • Last visited

Posts posted by derico


  1. Hello Alfred,

     

    I gather you like your graves closed and I can understand that. But when trying to move files I would prefer it to work even for ones with grave accents in their name. Or at least let me know that you do not want to move such files. Thanks.

     

    Regards, Ricco

     

    Here is what Console has about that:

    13.07.14 13:51:02,379 [0x0-0x22022].com.runningwithcrayons.Alfred-2: sh: bad substitution: no closing "`" in `s Twist Again.mp3"}
    13.07.14 13:51:02,379 [0x0-0x22022].com.runningwithcrayons.Alfred-2:  move filenames to theDestinationFolder --with replacing
    13.07.14 13:51:02,379 [0x0-0x22022].com.runningwithcrayons.Alfred-2:  end tell

  2. Version 7.91 is out

    • Hold option key to set a reminder (keywords ensentenrenm or end)
    • keyword end (display to-do notes)
    • Keyword enm (display reminder notes)
    • keyword enu (open note URL instead of note itself)
    • Several improvements
    • Bugs fixed
    • Removed Alleyoop support
    [...]

     

     

    Hey Carlos,

     

    thanks for this great update to an incredible useful workflow!

    I have not tried the new to-do and reminder features, since I do not use them in Evernote either. But to be able to open a note's URL is very nice.

     

    I was taken aback finding the sync feature not working. Nothing was happening and I found following message in the Console:

    .com.runningwithcrayons.Alfred-2: execution error: The variable synchronize is not defined. (-2753)

    This could be caused by having renamed the Evernote application, I thought. And sure enough, triggering the sync works when using the bundle identifier.

    tell application id "com.evernote.Evernote" to synchronize

     

    So may I suggest using the bundle ID "com.evernote.Evernote", instead of the name?

    This way the Apple Scripts will work no matter the app's actual name.

     

    Ricco


  3. While getting back into learning Spanish I was looking for a way to make word research easier. For every new word I want to learn I am looking for

    Frankly, to open all these pages manually, click around to get to the language/section I want and finally enter my word is a pain in the butt. And it might have been one reason I stopped learning regularly...

     

    Alfred to the rescue!


    So I made my first workflow. It is quite simple:

    • Type keyword 'esw' followed by the word you are looking for and it queries the aforementioned pages on separate tabs in the default browser.
    • Translations are not opened by this workflow. Usually I use a link on the definition site or the Leo Translate workflow by psistorm for that.
    • There is a second keyword 'esc' for researching the conjugation of the specified verb.

    That way I get the information I want to put into Anki with a few keystrokes and can spend my time actually learning the language.

     

    If you are interested in the workflow

    download it here.

     

     

    The workflow was inspired by this post of Gabriel Wyner on Tower of Babelfish. If you are learning a foreign language I highly recommend checking out this website! There is a wealth of information about methodology, resources and lots more.

    He has a Pastepin with useful links for a lot of other languages, which gets mentioned in the post linked above. They are intended for iMacros but can be used with Alfred, too. So if you want to adjust my workflow for another language, chances are he has the links you need.

     

    Side note on Google Images: If you are wondering why I use the Basic Mode of Google Images within Google Translate I would like to refer you to this post on Tower of Babelfish. In short: More often than not you will get images and matching example sentences at the same time - even for abstract or functional words.

     

     

    Screenshot

     

    alfred_WordResearch.PNG

     


  4. OK, I've updated the download in the first post to 'correct' the RAM display. It will now show everything after "Type:" ... before, I only had it showing the last column. And the comma in CPU speed, YUP, sometimes I forget that different areas of the world show numbers and separators differently.

     

    Thanks, Rodger!

    Everything is displayed correctly now.


  5. OK, First, I THINK I have an idea of how to implement a check on OS Version. I opted for the new method thinking I could remove the check for 11 or 12 characters in the serial number for the system. But I may revert to the older method making the workflow more universal.

     

    In Alfred your CPU is displaying 2,2 instead of 2.2 as in your Apple Menu About This Mac. Tiny thing, but it bugs ME. Is that how it's displayed in the "hardware.txt" file beside 'Processor Speed:'?

     

    In Alfred it is not displaying your RAM Type at all ... whereas it shows DDR2 in About This Mac. In the "memory.txt" file created by the workflow, IS there an entry for "Type: DDR2"? Or is it called something other than 'Type' beside the DDR2?

     

    Temporarily, you can open the text file "mymac.txt" and on line one put 'MacBook (13-inch, Late 2007)' - no single quotes, and on line 2 put the last 3 characters of your serial number (if the serial is actually 11 characters long), or last 4 characters of the serial number if it's 12 characters long. Doing that for now, should fix the top line.

     

    After editing mymac.txt, the 'System' displays correctly, thanks.

    In Europe we use comma as decimal mark, that's why the processor speed is displayed like that - perfectly fine. I never noticed the 'About this Mac' window uses another decimal mark... Anyway, it is stored with comma in hardware.txt, too.

     

    No RAM type, good catch! My memory.txt looks like this:

     

    Memory:
    
        Memory Slots:
    
          ECC: Disabled
    
            BANK 0/DIMM0:
    
              Size: 2 GB
              Type: DDR2 SDRAM
              Speed: 667 MHz
              Status: OK
              Manufacturer: 0x0000000000000000
              Part Number: 0x323034383733363735305320202020202020
              Serial Number: 0x00000000
    
            BANK 1/DIMM1:
    
              Size: 2 GB
              Type: DDR2 SDRAM
              Speed: 667 MHz
              Status: OK
              Manufacturer: 0x0000000000000000
              Part Number: 0x323034383733363735305320202020202020
              Serial Number: 0x00000000
    

     

     


  6. No worries, there is no rush. Making something work universally is not easy without access to a lot of different system configurations. We will figure it out.

     

    [...] it's obvious the plist files are a bit different, but WHERE is the code?! I can't remember, but does About this mac in SL even show the serial number or the model identifier?

     

    If you are talking about the workflow - it works, even the uptime is displayed correctly. Just 'System' is missing and on trying to open support/spec site I end up at http://www.apple.com/support/. Same root cause for both, I guess.

    If you meant the actual 'About this Mac' window - you could cycle through OS X version, build and serial number.

     

    Maybe you could implement a fallback to the old method of determining the readable name for a system? Let me know if you need more information or how I can help.

    alfred_aboutMac.png   alfred_aboutMac2.png

     

    My com.apple.SystemProfiler.plist only sports the following keys (with corresponding data of course):

     

    <key>NSNavBrowserPreferedColumnContentWidth</key>
    <key>NSNavLastRootDirectory</key>
    <key>NSNavPanelExpandedSizeForSaveMode</key>
    <key>NSTableView Columns Contents</key>
    <key>NSTableView Hidden Columns Contents</key>
    <key>NSTableView Sort Ordering Contents</key>
    <key>NSWindow Frame SystemProfile</key>
    

  7. Hey, your official release, nice!
    I like the information about resolution you added to graphics.

     

     

    It works well on my machine except for not showing the 'System' properly - no text and no icon.
    mymac.txt is empty and there is no mymac.png

     

    I guess my Snow Leopard is getting really old. Don't worry about my issues, I ordered OS X Lion yesterday ;)

     

    17.04.13 22:18:55 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] Domain com.apple.SystemProfiler.plist does not exist
    17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] Error 9: cannot perform functions on files because no destination dir was specified
    17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] Try 'sips --help' for help using this tool
    17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] cat: SPDisplaysDataType: No such file or directory
    17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] cat: SPDisplaysDataType: No such file or directory
    17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] /bin/bash: line 118: [: ==: unary operator expected
    17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] /bin/bash: line 122: [: ==: unary operator expected
    17.04.13 22:18:56 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] /bin/bash: line 126: [: ==: unary operator expected
    17.04.13 22:19:33 [0x0-0x44044].com.runningwithcrayons.Alfred-2[305] /bin/bash: line 15: [: too many arguments
    

     

    I've got com.apple.SystemProfiler.plist in ~/Library/Preferences but the content did not look like you could use it for what you are doing...

     

    As for the issue of Scott and Jonathan: They might not use the latest version of Alfred.


  8. [...] What I'm thinking is, MAYBE Apple changed the system_profiler command a tad. Although it appears to be representing the data appropriately, perhaps there are underlying issues with that specific terminal command in Snow Leopard. Now, I could be talking out of my behind and perhaps worrying about TOO much ... could just be sloppy parsing ... we all know I have 'issues' with simple copy/paste. LMAO!

     

    Hehe.

    atm.txt looks fine to me, but who knows...

     

    I'm starting to think exactly the same thing. Yes, I am definitely going to make a thread, as soon as I get some things sorted out here ... not related to the workflow. Better to have a single thread specifically for this workflow, and all that jibber/jabber related to it on there. Thank you ... I think I needed that kick in the pants. Look for it ... soon

     

    Go for it!


  9. Well, I don't know any Perl, thus I fiddled with the script until it was working with a hotkey. 

     

    If you would include a hotkey in your workflow, any potential user could benefit from this option out of the box.

    And since the actual hotkey will not travel with the workflow, everybody can set up their own or just leave it deactivated.

     

    I bet your solution would be much cleaner than my attempt :)


  10. Hey Rodger, thanks for the quick update and pointing out the lines regarding a second graphics card!

     

    My processor is displayed correctly with the new version. Processor speed was missing due to missing 'print' keyword in line 5 of the script filter, just to let you know. Sneaky paste errors... ;)

     

    I'll send the atm.txt via PN.


  11. The choice of hardware icons in V03 is nice. Now my MacBook shows up correctly.
    I noticed some minor issues however:

    • Uptime shows the word 'minutes' twice, in version 2 it was displayed correctly as '35 minutes'
    • A line for the second graphics card is always displayed, even if I don't have one
    • Processor description is one word short: I have a 'Core 2 Duo' but it is displayed as 'Core 2' (in version 2 of workflow, too)

    Is there some way around these quirks?

     

    alfred_aboutMac.png


  12. This workflow sounds great. Unfortunately it does not work for me.

    Regardless of what I enter as query after the keyword - nothing happens. Any suggestions?

     

    I looked for error messages in console and found this, maybe it helps...

     

    06.04.13 19:38:29 [0x0-0x23023].com.runningwithcrayons.Alfred-2[189]
     Traceback (most recent call last):
      File "<string>", line 3, in <module>
      File "movies_helper.py", line 43, in helper
        return display_search_results(query)
      File "movies_helper.py", line 48, in display_search_results
        results = imdb.search(query)
      File "imdb.py", line 8, in search
        contents = json_at_url(url)
      File "imdb.py", line 27, in json_at_url
        contents = contents_of_url(url)
      File "imdb.py", line 36, in contents_of_url
        request = urllib2.urlopen(url)
      File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 124, in urlopen
        return _opener.open(url, data, timeout)
      File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 389, in open
        response = meth(req, response)
      File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 502, in http_response
        'http', request, response, code, msg, hdrs)
      File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 427, in error
        return self._call_chain(*args)
      File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 361, in _call_chain
        result = func(*args)
      File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 510, in http_error_default
        raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
     urllib2.HTTPError: HTTP Error 403: Forbidden

     


  13. Hmm, it was working fine at first but seems to do nothing since I moved the backup to NAS:

    It hangs on checking status and when I choose to start/stop a backup, the notification appears immediately but nothing actually happens. 

     

    Edit: Well, I thought it worked once, but the 'tmutil' command seems to be missing in Snow Leopard. Is there an alternative for 'tmutil'?

    07.04.13 16:56:35 [0x0-0x2a02a].com.runningwithcrayons.Alfred-2[216] -e:38: command not found: tmutil status
    07.04.13 16:56:35 [0x0-0x2a02a].com.runningwithcrayons.Alfred-2[216] -e:22: undefined method `start_with?' for nil:NilClass (NoMethodError)

  14. [...]

     

    These two new added functions simulate the support links in "About This Mac", selecting "More Info", selecting the "Support" tab, then selecting either "Specifications" or "Hardware Support."
     

    I personally thought this was a wicked idea to minimize the  amount of mouse movements and clicking necessary just to see if my hardware is still under warranty and what my support options are.  I've come a LONG way since using Alfred1 to simply launch apps ... this is all done with ZERO scripting knowledge folks! 

     

    [...]

     

    OK, so here's what I need from you fine folks reading this:

     

    1: Please, try out the hotkeys, specifically the "ctrl" and the "alt" modifiers. I need to know that the method used to grab the data is current, and accurate. Apple has changed this over the years, and I am hoping they are sticking with the method I'm using for ALL hardware.

     

    2: Alfred2 and/or scripting (/bin/bash/) GURUs ... please look over the scripting in the workflow and  help me clean it up if it needs to be. So far, everything 'works' for me, but as stated earlier, I've done all of this with zero knowledge and I would hate to have a sloppy workflow here.

     

    Hey Rodger,

     

    this is a great workflow! I had to modify it to use the last 3 digits of my serial number, but that's an easy fix with your instructions above.

    After doing this in the script filter as well as both bash scripts, even the links to specification site and hardware support work. I have to agree, this is a clever shortcut!

     

    As I don't know much about scripting or alike I can't help you with that. But I think it works nicely.

    Thanks for your effort,

    Ricco

×
×
  • Create New...