Jump to content

Jasondm007

Member
  • Content count

    38
  • Joined

  • Last visited

  1. Last question, @vitor , I promise! For those of us without coding backgrounds, do you have any favorite resources that you'd recommend to others interested in tweaking the RecentDownloads workflow? More specifically, I'd like to learn how to use some of the other spotlight metadata to restrict the output further, but - as a newbie - I'm not exactly sure where to start with some of these things. For example, if wanted to restrict the output to certain file types, it looks like using the kMDItemKind field might be a good way of doing that. However, I don't have enough understanding of how your script is using these elements to provide the output (i.e., and this is a "ME" problem and nothing with the script). I've tried adding these elements, but it's clearly not working ... and I don't know enough to efficiently problem shoot. In any event, I'd just like to learn how to some of these metadata elements without bothering you and other equally nice people in the Alfred community. Thanks for your help!
  2. @vitor Sure - my apologies. Here's a link to the present workflow: https://drive.google.com/file/d/1_9nCeNVudhnzEwS2u7ATyxnABtOyvz0e/view?usp=sharing Thanks for your help!
  3. @vitor A few weeks ago, in this thread, you were nice enough to update this great workflow, adding the options to sort by the date added. More specifically, you added two options: one placing the newest item first, and another placing the oldest item first. To jog your memory I've added the script from the filter below (for the second option - file with the oldest date added is listed first). IFS=$'\n' files=$(mdls -name kMDItemFSName -name kMDItemDateAdded -raw "${HOME}/Downloads/"* | xargs -0 -I {} echo {} | sed 'N;s/\n/ /' | sort | cut -d ' ' -f 4- | grep --ignore-case ".*{query}.*" | perl -MHTML::Entities -CS -pe'$_ = encode_entities($_, q{&<>"'\''})') echo "<?xml version='1.0'?><items>" for file in ${files}; do echo "<item uuid='file' arg='${file}' type='file'>" echo "<title>$(basename ${file})</title>" echo "<subtitle>${file}</subtitle>" echo "<icon type='fileicon'>${file}</icon>" echo "</item>" done echo "</items>" fi While the query works great - as it pulls the items up in their proper order - unfortunately, they're not clickable. When I press return on the file that I'd like to open, the files never actually open. In addition, all of the icons/thumbnails in the query just look like white (see image below). Any ideas for how I might amend your code above to operate like usual? As always, thanks a ton for all of your help!
  4. Mail Actions Workflow [Updated v0.7]

    Are others having problems moving messages in High Sierra? When using "mm" to move an email to a specific folder, the workflow appears to work perfectly: I get a notice that the email has moved, and it disappears from the folder. When I refresh the mailbox or Quit and Re-open Mail, however, these messages always come back. The message will be located in its original folder, but a copy of the message will be located in the mailbox where it was moved. To be clear, I'm not accidentally using the alternative copy option either. Has anybody else experienced this issue? If so, how'd you fix it? Thanks for your help!
  5. Notes

    @40-02 Yeah, I'm struggling without it, too!! I can't think of another Alfred workflow that I used more than @surrealroad's Notes workflow. Any chance of this coming back in a High Sierra-friendly version?
  6. SSRN & Web Search - Search URL?

    @deanishe @dfay Thanks a ton for the info. This was really helpful!!
  7. SSRN & Web Search - Search URL?

    @deanishe Thanks a ton! Can I ask a stupid question: How did you find the parameters for the URL ("txtKey_Words=")? Is there a way to view those elements from the form? Or, is this some form of witchcraft? Ha
  8. Does anybody know how to set up the Web Search feature in Alfred to work with SSRN (Social Science Research Network)? For those unfamiliar with SSRN, it's website for sharing research (usually early drafts and things in the public domain). Unfortunately, while it's now owned by Elsevier, it's still probably the most used repository for pre-publication research papers. When I run search either through its standard or advanced search pages, the search terms are not located in the URL. Unlike Google and other search-related websites, I also can't seem to find any documentation on its search API, etc. For example, when I search for the terms "test search" using the advanced search, the search results are communicated through the following URL: https://papers.ssrn.com/sol3/results.cfm?RequestTimeout=50000000 Given these constraints, does anybody have any ideas for how to set up Alfred's Web Search feature with SSRN? Thanks in advance!
  9. @deanishe Thanks! I was able to get it working with the original script by removing the /s and making sure I used smart quotes around the mailbox's name. In short, it works like a charm now!! I can't thank you enough. For other newbies, this is the final script that I use in an Alfred workflow to take a specific mailbox offline in Mail (making sure to substitute GMAIL with the name of your mailbox): on alfred_script(q) if application "Mail" is running then activate application "Mail" tell application "System Events" tell process "Mail" click menu item "Take “GMAIL” Offline" of menu 1 of menu item "Online Status" of menu 1 of menu bar item "Mailbox" of menu bar 1 end tell end tell else display notification "To take a mailbox offline, Mail must be open." with title "Mail - Not Open" end if end alfred_script Thanks a ton guys!
  10. @deanishe Thanks for the clarification. Assuming those are smart/curly double quotes around the mailbox's name - which looks correct to me - how do you create those in an applescript? Also, just to be clear, there are no ellipses or dots for that matter in the menu. The menu looks just like the hierarchy in my first post (though, obviously the names of mailboxes are not GMAIL, AOL, Hotmail, and Prodigy). Thanks again!
  11. Apologies if I'm being dense here, but are you guys saying that I should be using smart quotes in the script (i.e., double smart/curly quotes)? If so, where (and, with which iteration of the script above)? At the moment, I definitely don't use smart quotes in it. I've made the mistake of including smart quotes in a script before, and have turned this feature off in my keyboard settings (System Preferences / Keyboard / Text - unchecked "Use smart quotes and dashes"). Thanks for all of your help!
  12. Thanks for trying @vitor ! Unfortunately, no luck with it either (another syntax error).
  13. @deanishe Thanks for taking a stab at it! Unfortunately, I didn't have any luck with the following: if application "Mail" is running then activate application "Mail" tell application "System Events" tell process "Mail" click menu item "Take " & quote & "GMAIL" & quote & " Offline" of menu 1 of menu item "Online Status" of menu 1 of menu bar item "Mailbox" of menu bar 1 end tell end tell else display notification "To take a mailbox offline, Mail must be open." with title "Mail - Not Open" end if Any other ideas? I've been able to get the closet with the following: set inString to "GMAIL" set myString to "Take " & quoted form of inString & " Offline" if application "Mail" is running then activate application "Mail" tell application "System Events" tell process "Mail" click menu item myString of menu 1 of menu item "Online Status" of menu 1 of menu bar item "Mailbox" of menu bar 1 end tell end tell else display notification "To take a mailbox offline, Mail must be open." with title "Mail - Not Open" end if However, I still get an error indicating that the mailbox is not in double quotes (testing with Script Editor): This is driving me crazy! Thanks for any help you can lend.
×