Jump to content

Jasondm007

Member
  • Posts

    342
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by Jasondm007

  1. @40-02 Thanks for the tip! I didn't realize that Spotlight could search the Notes app. 

     

    By chance, do you know how to limit Spotlight's results to the Notes app (without impacting Alfred's search capabilities)? If I have to use Spotlight to search for notes, then I'd love to only see notes in its results (or at least have them placed at the top of results to avoid having to scroll down). Thanks!

  2. Thanks @deanishe

     

    Admittedly, this was a little beyond my limited skill set, but luckily your suggestion jogged some new search terms in my head, and I came across the following post:

     

    https://www.alfredforum.com/topic/1032-alfred-file-navigation-start-after-quick-file-search/?do=findComment&comment=5073

     

    For others that might be stuck on the same issue, I just updated @jdfwarrior's code. In other words, I (1) created a file action, and (2) attached it to a Run Script action (bash w. input as {query}) containing the following script:

    temp="{query}";
    
    if [ -d $temp ]; then
    	osascript -e "tell application \"Alfred 3\" to search \"$temp\""
    else
    	folder=$(dirname "$temp")
    	osascript -e "tell application \"Alfred 3\" to search \"$folder\""
    fi

    This will open the parent directory of any file or folder. To be clear, it won't carry out the more complex functionality mentioned above (i.e., the one that operates like reveal in Finder). However, it works the simple one quite well. 

     

    Thanks for your help @deanishe & @jdfwarrior !

  3. I love using Alfred to browse folders, and would like to extend the same functionality to other types of files.

     

    Is there a way to create a File Action that triggers Alfred's Browse feature for the folder housing whatever file has been selected from the search results?

     

    For example, let's say that I have a folder on my desktop called "Folder 1" that houses several PDFs. When using Alfred, if one of the PDFs came up in my search results, I'd love to use a file action on that PDF to effectively trigger Alfred's browse function on Folder 1.

     

    In an ideal world, it might operate something like the "reveal in finder" file action, except that it would do the same thing within Alfred's file browser (placing you within the parent folder and highlighting the file/folder/etc that you selected, so that you know where the file is located in the folder).  However, I'd settle for the file action that just opens the parent folder.

     

    I created a simple File Action trigger, and attached the Browse in Alfred action. However, it passes the full file path to the browser - showing the parent folder, but narrowed only to the selected file. Is there a way to create a file action that works like the ones described above? In the simplest iteration, I'd need to pass the folder structure to a Browse in Alfred action (i.e., without the file name). Using the example above, if I selected "filename1.pdf" from my search results (/Users/username/Desktop/Folder 1/filename1.pdf), I'd need a way to pass only the following path to Alfred's Browser: /Users/username/Desktop/Folder 1/.

     

    In other words, how do I get from /Users/username/Desktop/Folder 1/filename1.pdf to only /Users/username/Desktop/Folder 1/ ??

     

    Does anybody know how to do this (or the more complicated - reveal in Finder, like version described above)? As always, thanks for your help!

  4. Thanks a ton @deanishe

     

    I'm sure this is a stupid question, but how do I get the two arguments after the keyword to be assigned as variables? So, using the original example (Alfred Search: fr "jj" "p"), how do I get jj assigned as variable 1 and p assigned as variable 2 (before passing them to the JSON Config element)?

     

    I noticed another thread that uses a Run Script element to do something somewhat similar. Is this the route you'd suggest? Thanks again!!

  5. Is there an easy way to use Alfred's Replace utility dynamically, so that it identifies the text that it's finding and replacing from arguments after a keyword?

     

    Let me explain using an example. For research purposes, I often copy and paste large amounts of text into Google Translate from very old public domain books. Because of their scan quality and OCR-related problems, it's not uncommon for the text to exhibit patterns that need to be corrected. These are patterns that are specific to the text (i.e., not ones that justify creating a permanent workflow for them). For example, in one text I copied this morning, the OCR'd text believes that the letter "p" is actually the letters "jj."

     

    To correct this problem using text on the clipboard, it'd be great if I could use a workflow (1) that was triggered by a keyword, (2) that searched for whatever string I specified inside a set of quotation marks as the first argument, and (3) that replaced all instances of the string with another string specified inside a second set of quotation marks as the second argument. As a result, the next time I paste the text from the clipboard, it should paste the new cleaned up version. 

     

    Using the text example from above - which errantly includes the letters jj where the letter p should be - the workflow might operate like this in Alfred's search bar:

     

    Search.jpg.f7166ad2d9633f1fa987bccf53b8dd38.jpg

     

    In layman's terms (and, as you can tell from this post - I'm a layman), the workflow would effectively place the strings in Alfred's Replace utility as follows (making sure to ignore the quotation marks and to only include text/punctuation/spaces/etc. that are included within the quotation marks):

     

    Replace.jpg.be34765614f38b1b7e08ba191f0fcbf4.jpg

     

    To be clear, I do not intend to place the text in the Replace utility permanently. This is just how I envision the workflow operating, using the example text from above. The important point is that the workflow responds - dynamically - to whatever's in the two arguments that follow the keyword (and, in this case, it's important that it actually ignore the quotation marks).

     

    I'm not married to this method either. So, if you know a better way to accomplish this task or if you know of a workflow that can already accomplish it, I'd love to hear them! Thanks for any assistance you can lend! I really appreciate it.

  6. I've created a few URL actions for Web Searches that I sometimes run on my non-default browser, however, this is a little annoying. They’re annoying to create, and they clutter up Alfred’s results (i.e., because you now have keyword duplicates).

     

    In any event, I wish Alfred's Web Searches could accommodate the use of a modifier key that would either (1) open the saved Web Search in a different browser of your choosing, or (2) open a prompt asking the user which browser to run the search in.

     

    In other words, Alfred’s Web Searches would operate just like they usually do. However, instead of hitting Return/Enter to open the search in the default browser, for example, the user could hit Return/Enter while holding the Alt/Option key (or any other key of their choosing).

     

    This doesn’t exist already, does it? This feature doesn’t seem nearly as complex as half the things that Alfred already does.

  7. Is it possible to remove a keyword that winds up being used in a fallback search?

     

    Since I’m probably not asking this question in the appropriate Alfred lingo, let me provide an example.

    1. Let’s say you have a file filter that uses the keyword “oo” when searching for OmniOutliner files.
    2. After searching for “oo searchterm in Alfred, it doesn’t find anything relevant, and so you decide to use one of your fallback searches. 
    3. For simplicity, let’s say you select the default Google search fallback. 
    4. When run, Google searches for the following: “oo searchterm”. My question is whether it could be run without the “oo “ (i.e., without the keyword and space). In other words, could Alfred snip out everything before the first blank space in the search (and preferably the first blank space, too)?

     

    To be clear, my question is not specific to Alfred’s default Google search fallback. I have other fallbacks that use Finder, Spotlight, etc that I’d like to solve the problem with. 

     

    I just find it annoying to always have to go back and clip off that first bit, especially when the searches all follow the same pattern (unnecessarykeyword+blankspace).

     

    Thanks for your help!

  8. @dfay @deanishe Sorry to bother you guys about this again, but it appears as though SSRN has updated its search form - breaking the Search URL used by Alfred (below):

     

    https://papers.ssrn.com/sol3/results.cfm?txtKey_Words={query}

     

    Now, when searching, I get the usual page not found notice.

     

    I tried looking at the code from the form, but it looks identical to what @dfay posted above (action, name, etc.).

     

    Do guys have any idea what they might have changed and where I might look next? Thanks for your help!!

  9. @deanishe Thanks for your help! The RTF method sounds like the best option, however, I'm afraid it also sounds like it's far beyond my limited skill set.

     

    I'll try to poke around and see if others have workflows or applescripts that edit text as an RTF; that way, I can just try and modify it for Evernote. If you know of any, please let me know. 

     

    Thanks again!

  10. Has anybody created a workflow that can change the color of text to a specific color within the Evernote app?

     

    At the moment, Evernote only allows you to show and hide the Color Picker with a shortcut (C-Command-Shift for both hiding and showing). However, it doesn't even make the Color Picker window/pane active, so it's not entirely clear to me how to script something that would could pick a color and close the Color Picker. I'm a scripting newbie, but I find it really annoying to constantly have to fidget with the mouse to get this repetitive task done. In fact, several other people have complained about the issue on Evernote's message boards. Like most people that use Evernote, I commonly highlight text in articles and change its color when I want to draw my attention to something or take a note, etc. However, the app only has a menu item shortcut for highlighting text, and it does not include anything to help people change the text's color without clicking around with their mouse.

     

    For example, I'd love to just assign a shortcut in Alfred that changes the text's color to red. Within Evernote's Color Picker-restricted system, it would need to do something like the following: After text has been manually highlighted by the user (i.e., not highlighting, as in its format, but just selected with the cursor), use an Alfred workflow to assign a keyword or a shortcut to:

     

    1. Open the Color Picker (C-Command-Shift)
    2. Make the Color Picker window active
    3. Select the Color Palette option - which is the 3rd one from the top on Macs without anything else installed
    4. Click the "Apple" palette - which is the default option that should already be selected
    5. Click the boring old Red color towards the bottom, and
    6. Close the Color Picker (C-Command-Shift)

     

    Of course, I'm completely open to suggestions for a solution outside of Evernote, too - i.e., one that happens out of plain sight and does not depend on clunkily opening and closing the Color Picker. 

     

    Thanks for any help you can lend!!

     

    5a4fc4aa566e9_ScreenShot2018-01-05at10_31_36AM.jpg.16499a88fad59a05c39c20621e68184e.jpg

     

     

     

     

  11. @palobo By chance, did you get a chance to look at the MM (move mail) function in your Mail Actions workflow (see quote below)?

     

    I was never able to get it working again. The workflow always looks like its working perfectly, but when I navigate out of the folder where the message was moved from and reopen it, the message is always still there. It looks like it may just be copying the message over to the new location. 

     

    Thanks in advance for any help you can lend!

     

    On 11/8/2017 at 5:16 PM, Jasondm007 said:

    Are others having problems moving messages in High Sierra?

     

    When using "mm" to move an email to a specificfolder, 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!

    1

     

×
×
  • Create New...