Jump to content

RodgerWW

Member
  • Posts

    378
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by RodgerWW

  1. No issues here for me but I am wondering:

     

    Open Alfred Prefs, then on left column, select "Clipboard"

    Then on right side click on "Merging" TAB (if you use snippets you will be able to modify the options)

     

    IS "Separate appended item with space" selected in the dropdown? I think it is by default.

     

    Perhaps try selecting "Don't separate appended items" to see if that matters?

  2. Thanks for this! Noticed one weird bug where the AS doesn't work if you are in the "Keyboard Shortcuts" tab.

     

    For this to work a bit better edit Mike's script in the workflow thusly:

     

    on alfred_script(q)
    
    tell application "System Preferences"
        reveal anchor "keyboardTab" of pane id "com.apple.preference.keyboard"
        tell application "System Events"
            tell process "System Preferences"
                click checkbox "Use all F1, F2, etc. keys as standard function keys" of tab group 1 of window "Keyboard"
            end tell
        end tell
        quit
    end tell
    
    end alfred_script
    This will 'reveal' the anchor of the pane even when it's not previously selected.
     
    ALSO, thanks for the workflow Mike!
  3. If you add (from your home folder) ~/Library/Containers/com.apple.Notes to Alfred's default search scope (Features > Default Result preferences), then Alfred will find the notes when you do a file search in Alfred (e.g. open keyword, or prefixing a search with spacebar).

    Thank you so much for this Andrew!

  4. Notes from the Notes.app are stored in a file:

     

    ~/Library/Containers/com.apple.Notes/Data/Library/Notes/NotesV2.storedata

     

    This file is cannot be read easily with just TextEdit and requires Developer Tools to be installed if you are using a terminal command to load them into TextEdit with:

     

    cd ~/Library/Containers/com.apple.Notes/Data/Library/Notes; strings NotesV1.storedata | grep body | open -f

     

    Perhaps this could be moved to the feature request forum to add this natively to Alfred?

  5. Well, there is this: http://alfredtips.tumblr.com/post/4801608875/the-one-in-which-you-show-package-contents-need

     

    If you have the Powerpack:

     

    1 - Open Alfred preferences

    2 - Click the 'Features' button in the top row

    3 - In the left column click 'File Search'

    4 - On the right pane click on the 'Actions' tab

    5 - Under 'Default Actions' make sure "Show Package Contents" is checked so it will show up as a file action as in the above mentioned Alfred Hat Tips link.

  6. Alfred Preferences/Features/Web Search, bottom right corner 'Add Custom Search'

     

    Search URL field:

    http://www.google.com/?tbm=pts#bav=on.2,or.r_qf.&fp=5952019ca3463239&q={query}&tbm=pts

    Title Field:

     

    Whatever you want the results to display: ie "Search Patents"

     

    Keyword:

     

    Whatever you want the keyword to be.

     

    Validation:

     

    Type something like "bumper" then hit the Test button to the right and the results will display in your browser for "bumper" under Google Patents.

  7. I rather like this workflow.

    One suggestion is to add 'Mount' and 'Unmount' to the mix merhaps with a modifier of CMD or OPT

     

    Thing is, I have a 2.5" drive in a USB 2 Enclosure under my desk. I never disconnect it and it's always powered. So, using this or the built in Alfred 'eject' will not just unmount(eject) a single partition on my Drive (which has 3 partitions), it always ejects the entire drive.

     

    Also, with my other two partitions, I sometimes like to unmount one so it is not showing in Finder, but after a week or so, I may want to mount it for whatever purpose. SO, modifying your workflow to show mountable volumes would also be very handy. I currently have a workflow to simply mount a volume once I type in the name of it, but showing a list in Alfred, hitting CMD and selecting the unmounted volume would be ideal.

     

    Idea for this: Show mounted volumes (the icons) as you do now, but if a volume is not mounted, perhaps the icon could be at 50%, like it is in Disk Utility.

     

    I would personally like to modify this workflow to suit my personal needs, but I am clueless with python. I also do not want to step on your toes because you have started this awesome workflow and it would appear that you could add these features if you deem them necessary.

  8. Hi Rodger, and thanks for your answer.

    However no, this is not what I meant :)

     

    I'll try to be more precise.

     

    In Alfred v1 :

    1. Create a custom search

    2. Enter a search url with {query} specified (e.g. http://site.com/?q={query})

    3. Enter the following title : My search

    4. Test the search

        ↳ Alfred displays : My search '...', or My search 'hey' when you type.

     

    In Alfred v2 :

    1. Do the same things as above

        ↳ Alfred only displays : My search, even when you type.

     

    A solution that works for v2 :

    Modify the title this way : My search '{query}'

     

    Alfred v1 was automatically adding '{query}' at the end of titles.

     

    So, my question was : Is there a way to reactivate Alfred v1 behavior ?

    I'm asking because I have a lot of custom searches from v1.

     

    Thanks for any info about this.

    OK, I get it now. The only way I know of is already mentioned in your solution ... to add '{query}' to the Title.

  9. By the way, is there a way to create a list of all the various either hotkeys or keywords or script filters and their associated actions on Alfred? I'm finding it a little difficult to remember all of them?

     

    You may want to give Browse Alfred Extension by 'jmjeong' a try. By simply typing "alf" in Alfred, it will list all of your extensions, and in the subtitle line it shows you the keyword/keycombo to activate the extension. It does more, but I also had a little trouble trying to remember every keycombo/keyword and the extension HAS saved me time not being forced to open the preferences and clicking on the workflow to remember.

  10. if you put {query} in the 'Title' box, you will get the custom search results shown for those searches you set up like that.

    So, for instance, if I made a custom search for Ben Dodson's iTunes Artwork Finder [ http://bendodson.com/projects/itunes-artwork-finder/ ]

     

    1: Search URL = "http://bendodsonapps.com/projects/itunes-artwork-finder/?entity=movie&show={query}&country=ca"  <-- This is for 'Movie' and Canada

    2: UTF8 and encode spaces as + both checked

    3: Title = "{query}"

    4: Keyword = "whatever you want, does not matter because {query} is in Title

    5: Drop an identifiable icon into the icon box.

     

    Now, open Alfred and type "Blade Runner" and in the Alfred results you will see your identifiable icon with 'Blade Runner' beside it.

    Select the entry and enter ... boom, posters show up on the Ben Dodson page in your browser.

     

    Is that what you meant?

  11. For unmounting multiple disks at the same time I think one way would be to write a workflow that accepts multiple arguments. Now, I myself am unable to do this, but basically it would work like this:

     

    Type "eject" and also one/two however many {query} arguments. Each {query} would be the name of the Drive/Volume to eject/unmount.

     

    Then, the script filter would just pass the arguments to the main script to "diskutil eject {query}" in BASH

     

    I am rather busy right now and also trying to figure some other pressing things out, BUT, I have wanted to do a workflow like this ever since Alfred2 was released. So I MAY get around to it if someone else doesn't.

     

    PERHAPS, in the meantime, look at this workflow by smoovmaster and maybe it can be tweaked as I mentioned above.

  12. OK folks. I have updated the Workflow in post 1 to correct some issues. Version is at 1.1 even though the filename is exactly the same.

     

    Please remember to type "xabout" in Alfred to reset the workflow after installing so the Workflow can write the files necessary.

     

    Special thanks goes out to [Wildcard] because without his particular 'issues' with the workflow, I would never have found it!

  13. Um...

     

    Okay, this is weird.  That command didn't do ANYTHING.  Pasted it into terminal, tried the other one; nothing.  No file.  (Neither command made a file.)

     

    I've done enough perl and bash scripting that, while I don't follow all the commands you wrote there, I get the gist (I know, for instance, pipes, redirect outputs (>), and I could follow out the regexes if I wanted to.)  One thing I don't get is the #defaults bit, though...don't know where this is breaking down.

     

    Edit: when the "#defaults" part is taken out, it creates the file on the Desktop but the file is empty.

     

    Very weird indeed! "defaults" let's us Mac users read or write to plist files. For instance, HERE is a list of commands on github for changing a bunch of preferences in OSX or for certain apps in OSX. These are all terminal commands for changing the default preferences.

     

    OK, so it would APPEAR that for some reason that one file is just not allowed to be read, even though you have it, and there is data in it. I mentioned before how I thought you might not have that file because of Mavericks, as I am in Mavericks right now and do not have that file. So, for now I will suggest the manual method from before (because I am currently at a COMPLETE loss as to why this is happening on your machine), and in the meantime I will TRY to find a better way of getting the Human Readable machine. I initially strayed from the curl method because I wanted to use local methods as sometimes people use their computers without net access, like, on the road. There has GOT to be another though, because we can all get that info without net in the Apple Menu 'About This Mac' ... just need to find Apple's method in Mavericks, because maybe that's how they did it in all the other OS versions too.

     

    Spoke too soon. It seems I DO have the plist now in Mavericks. Perhaps it is generated when actually going into the system menu and hitting 'About This Mac'? But, I am having a similar issue in that my original workflow will not generate the two lines in "mymac.txt." I am thinking this is possibly a permissions issue on the plist because I can use plistbuddy to read the file, but not defaults! I am unable to even convert the plist to xml with plutil in terminal due to permissions. Just passing on what I've found out so far.

  14. Mine has that, actually.  The key seems to be in there correctly.  I can quick look it, but not open it/view it, so I can't copy paste the exact key.  But the file name is exact, and the CPU Names key includes the human readable line as expected....

     

    More strange: because if you have the file, it SHOULD work. I am wondering if it's the user switching or more precisely, how I do the directory for writing out the file ... try this for me please;

     

    Open Terminal and copy/paste the following line (as a single line) into it, and it enter.

    #defaults read ~/Library/Preferences/com.apple.SystemProfiler.plist | awk '/CPU Names/{getline;print}' | awk '{$1=$2=""; print $0}' | sed -e 's/"//g' -e 's/);//g' -e 's/(//g' | sed 's/^ *//' > ~/Desktop/mymac.txt

    The above command SHOULD make a txt file called "mymac.txt" on your Desktop with the contents of the aforementioned plist in it.

     

    IF it does not, try the following command in Terminal and please NOTE the USERNAME, and change it to YOUR profile name (You may want to edit this before pasting into terminal due to Terminal's lack of cursor control and 2 values needing to be edited):

    #defaults read /Users/USERNAME/Library/Preferences/com.apple.SystemProfiler.plist | awk '/CPU Names/{getline;print}' | awk '{$1=$2=""; print $0}' | sed -e 's/"//g' -e 's/);//g' -e 's/(//g' | sed 's/^ *//' > /Users/USERNAME/Desktop/mymac.txt

    Please let me know if either of these work, and what the contents are of the mymac.txt ... not the ACTUAL contents, but if it does in fact write data into the file or if it is still blank.

  15. Not the same prefs; no syncing; and the workflow folder is in the Library under the user Home folder, not in shared or system, so not the same folder there, either.  Proof: I did the fix on my login; I checked "about" again on wife's login; still not showing up there.  (I could do the fix, but she doesn't really use the tech-y stuff so much.)

     

    OK, so that is interesting too. The workflow initially uses "~/Library/Preferences/com.apple.SystemProfiler.plist" for the Human Readable Name and the serial of the system. So, since your login does not have that, it makes sense (I GUESS) that your wife's does not either.

  16. Worked like a charm, thank you.  I just copied the text as it showed in Terminal from using that "curl" command.

     

    But just to reiterate, I don't think Dvorak is the issue after all, as the identifier is absent on my wife's login also—and she only ever uses the standard US Qwerty layout.

     

    Ah right, SO: You are using one computer with 2 different logins ... like, fast user switching? IS Alfred installed to "All Users of this computer" or just to the admin? Basically I'm trying to find out if both logins use the same Alfred Prefs/Workflows ... or even the same Sync Fonder.

  17. Okay, just tested on the other login on this computer (QWERTY only).  Copy/paste works fine, websites don't, and the identifier is still missing.

     

    OK, temporarily, until I can pin this down (if it's even MY fault ... lol) open the "mymac.txt" file in the workflow folder.

     

    On line one (1) of the  txt file, put the model identifier the way you want it to appear in Alfred IE:

     

    MacBook Pro (17-inch, Mid 2012)

     

    On line two (2) put the last 4 digits of your serial number as they appear in the Apple Menu/About This Mac - Hardware Serial Display IE:

     

    DGFE

     

    ​So, the text file will look like this:

    MacBook Pro (17-inch, Mid 2012)
    DGFE

    Then save it ... and this should alleviate the current issue. Just keep in mind, IF you type "xabout", this will reset YOUR mymac.txt to blank under the DVORAK layout ... I THINK. So, you would just need to re-enter those two lines if it goes blank.

  18. Yes, I have mymac.txt, and yes it's blank.

     

    I used xabout to reset and verified that that file disappeared.  Same result afterwards with "about."

     

    The copy/pasted curl command worked correctly.

     

    ...I'm wondering if this is another quirk showing up from Alfred's interaction with my unusual keyboard layout.  Check out the topic I linked to earlier for more details.  Also note that the copy/paste function from the "about" workflow is now working correctly, but the two functions that link to the apple website are still not working right.

     

    Wow, this IS a weird one. I must confess I am completely unfamiliar with DVORAK. Heck, I am unfamiliar with coding as well. All of the work that I've done to get this workflow to where it is today was achieved with a heck of a lot of searching and trial and error!

     

    When I look at my script, and the commands IN it, I can not think of any reason WHY it wouldn't work, as OTHER parts of the workflow seem to work fine for you. Perhaps some characters register differently under DVORAK? But, I thought that was just in typing, not in actual scripting. If you reboot you computer into QWERTY (as mentioned in your other postings to get Alfred to behave) does this workflow work as expected (after resetting the workflow with "xabout" of course)?

     

    I do agree that there seems to be an 'issue' with DVORAK and Alfred, but I am not entirely willing (with my lack of knowledge) to pinpoint that as the culprit in THIS case. 

  19. Tried about; nothing changed.  Yes, the file is where and as you say, except that the key has those four digits, then a hyphen, then "en_US".  Don't know if that makes a difference.  Let me know if there's anything else I should be doing.

     

    Don't worry about the copy/paste...I just spotted why it's happening; has to do with a keyboard layout issue.  Something I've got a separate topic on here http://www.alfredforum.com/topic/2719-browse-in-alfred-shows-finder-info-window-instead/

    ...if you're interested.  (The copy/paste will work only if Dvorak or "Dvorak - Qwerty ⌘" is the layout when Alfred STARTS, since that's the layout I use regularly.  Unfortunately, if one of those IS the layout when Alfred starts, the "file actions" hotkey will not work from the Finder.  But either way the model identifier doesn't show up.)

     

    The "en_US" is completely normal, and I parse that out with the workflow ... for ME it's "en_CA" because I'm located in Canada.

    Now, in the workflow folder for this workflow, there SHOULD be a "mymac.txt" file which contains only one line. So, do you have this file, and if so, I am ASSUMING it's blank?

     

    And, for further testing: Open up terminal and copy/paste the following into it then hit enter

    NOTE: REPLACE the AAAA with the last 4 digits of YOUR machine!

    curl -s "http://support-sp.apple.com/sp/product?cc=AAAA〈=en_US" | sed -E 's/.*<configCode>(.+)<\/configCode>.*/\1/'

    This curl command SHOULD return the human readable system. So for me, and MY last 4 digits I get "iMac (27-inch, Mid 2011)" returned.

     

    And just for clarity: did you type "xabout" to reset, or just "about"? You may have forgotten to add the X, or, it could just be the autocorrect kicking in when writing the post.

  20. Sorry, I should have included more info.  I am NOT running Mavericks (and am not likely to).  I'm running OS Lion 10.7.4 on a MacBook Pro from, I think, early-mid 2011.  (It came with Snow Leopard but I got the Lion upgrade free because it came so soon after I got the computer...that should tell you something.)  It's not a restoration from backup; just an ordinary OS.  ...Yes, on the built-in "About this Mac" window (when I click the "more info") it tells me it's a 15-inch model from early 2011.

     

    Wow, ok. DO you have the following file? ~/Library/Preferences/com.apple.SystemProfiler.plist

    If so, does it contain a KEY with the last 4 digits of your serial, and also a STRING with your model identifier?

     

    ​Also, did you try typing "xabout" to reset the workflow ... this will erase the txt files that the first run of the workflow creates ... then, just type "about" again, to rewrite the files based on the system. 

    I have been fiddling around with the copy/paste ... but so far, I have NO idea why it's not working for you.

  21. Very very nice workflow!  The accurate graphics are a very nice touch.

     

    I don't mind the identifier number—mine says (MacBookPro8,2).  However, two things:

     

    1. The copy/paste shortcuts (Fn and ⇧ Return) don't work for me.  Edit: Actually, the other two actions aren't working either.  The subtext shows up correctly, but each of them just launches http://www.apple.com/support/

     

    2. I would really like the "human readable" model info back.  Like "MacBook Pro, Mid 2012" or whatever.  Was that intentionally removed?  Or is my system just being weird and it's still showing up for everybody else?

     

    I have a feeling you are running Mavericks ... I am looking into this. I do know that there is a missing plist file that I used to read from to get the Human Readable. I may have to go back to the 'curl' method. On my machine the copy and paste work fine. These are built-in Alfred functions, so, I have no idea why they wouldn't work for you. BUT, the link to the support site for the hardware (as it comes from the missing plist) just goto the support site you mentioned instead of for the exact model. Now, the OTHER issue may be that they (Apple) have once again changed the way in which that data is linked to ... but I doubt that, because when I use the Apple Menu 'About This Mac' the links there look the same and goto the correct places.

     

    So, if you are NOT running Mavericks, I need a bit more info like, OS, was it a clean install or a restore from TimeMachine ... or whatever. Because, no, the Human Readable was not removed and SHOULD work fine in everything up to Mountain Lion.

     

    I really hate to say this, but I need to wait for a bit to see exactly what Apple is doing ... Mavericks has a LOT of changes under the hood and I would like to wait for the final build before I attack the issues with full force.

×
×
  • Create New...