Jump to content

Stephen_C

Community Hero
  • Posts

    1,345
  • Joined

  • Last visited

  • Days Won

    65

Everything posted by Stephen_C

  1. You could try using my workflow (if Vitor does not mind me mentioning it!): Search for PNGs. All you have to do using it is to type a keyword, followed by <space> and the name of the folder and it will display all *.png files in the folder. Stephen
  2. You really need to be extremely careful when using apps like that: they are well capable of removing things that you really need to keep. It may be worth checking ruthlessly your settings in that app. (I've never used it—and would never do so—so I'm not sure whether or not the settings are helpful but it's certainly where I'd start looking for clues.) Stephen
  3. You can start from Home by typing ~. However, in Alfred's default results I've checked Folders which means I can simply type the name of a Folder and press ⏎ to open it in Finder. Of course, you can always → from the folder name then to action the folder in Alfred (depending on your settings under Universal Actions Show Actions: in Alfred's preferences). Stephen
  4. Ah, sorry, I've just checked and in order to make it work for me I had to check the Compatibility: option and so use ⇧ with the modifier key. Edit: Note, too, the buffer works with a selected file in Alfred's results. Stephen
  5. Go to Alfred Preferences → File Search, click on the Buffer tab and check Enable temporary file buffer. Stephen
  6. Maybe the best place to start is with Alfred's File Buffer and the File Buffer Action. Stephen
  7. It will be something like this: Except that instead of theURL Sepulchra will have used link. For the second Sepulchra will have used title. That creates respectively the variables that are recalled in the final copy to clipboard action. In both cases {query} means the information provided by the immediately preceding action in the workflow. Stephen
  8. While I appreciate it may initially appear to be rather more complex than you need, my Save 'ur URL workflow on the Alfred Gallery does exactly what you want (and, in addition, saves the link to a file). There's an option in the workflow configuration to save the links using markdown. Stephen
  9. You have to install the workflow first of all. It appears you have done so but there is an update required (click on Update ⌘⏎) at the bottom right of the workflow window. The workflow should then appear in your list of workflows. Leave it there for forget it! (You don't add CSV files to it in the way you seem to be doing.) Once you've done that you can close Alfred's Preferences so they don't get in the way of what you do next. Open Finder and navigate to one of your CSV files. Highlight that file in Finder (just with a single click on the filename). Now do what I said in my previous post. Does that help? Stephen
  10. As I said in my previous post: You need to locate your CSV file in Finder and use your Universal Actions hotkey (it's ⌘/ by default—and you'll find the setting in Alfred Preferences → Features → Universal Actions under Selection Hotkey:). When you do that you can search the list that opens in Alfred and type "Convert” and you should see the relevant workflow highlighted. Simply then press ⏎. It really is as simple as that. Stephen
  11. Welcome to the forum. I think the first question to ask is this: do you still have backups of that old laptop? There are two points that are relevant to your question: Alfred never natively stores anything in the Cloud—so everything is stored on your local machine. Thus, in that context, there's no such thing as a "Licence profile”. Even if you were synchronising Alfred's preferences between the old and new machines (which doesn't appear relevant anyway in this case as the new machine merely replaced the old one) your web bookmarks are not saved within Alfred but, rather, within the browsers you use. In essence, you're going to need a backup of your old laptop in order to retrieve anything you created in Alfred on the old machine (which would be stored in your old Alfred preferences). Stephen
  12. Does this workflow on the Alfred Gallery help: Snippet Transformer? It appears that all you have to do to use that is to: install it; then select your CSV file using your Universal Actions hotkey; and choose the Convert to Snippet Collection action. Stephen
  13. I don't know what versions of macOS and Aflred you're using but take a look at Alfred Preferences → Features → Contacts and you can set up something like this. (Apologies: II've had that for so long I can't recall if it's set by default or whether I set it up!). If you do need to set it up it's very easy. Click on the + sign at the bottom right of that window and add this (with any appropriate modifier key you wish, of course): Stephen
  14. Unless you're synchronising your settings between the two Macs it's probably worth checking on both that the settings under Alfred Preferences → Features → Clipboard History are identical—including those under the Advanced tab. For example, I'm wondering whether on one Mac you may have Ignore clipboard data marked as Auto Generated checked but not checked on the other. Stephen
  15. I wonder whether this post may be relevant in the context you mention—even though it relates to a different app. Maybe aText works the same way as that app? Edit: I note you say this didn't happen before Alfred 5.5 but I don't think Alfred 5.5 made any change to the way the clipboard works so I'd be inclined to look at aText rather than at Alfred to resolve the issue. Stephen
  16. Please work carefully through all of the suggestions on this Alfred help page: Troubleshooting File Indexing Issues. If you still have problems after doing that please follow the suggestion under "Still having issues?” and post the results here. (If your Alfred oreferences are stored in Dropbox do ensure they are made available off-line: Syncing Your Alfred Settings Between Macs.) Stephen
  17. Please provide the information requested in this post higher up the thread and also confirm your version numbers of Alfred and macOS. Stephen
  18. You may find this post (and the remainder of that thread) helpful. Stephen
  19. It has long vexed me that my workflow does not retrieve for me the name of the destination workflow. Version 2.0 remedies that lacuna so that now all you have to do is to check that the name of the destination workflow is correct and then press ⏎: The workflow now provides a fast way of including images in a workflow configuration. (There are still no dependencies.) Stephen
  20. Background After a full tasting menu of "Simple Ideas” for this final post in the series we return to a starter. It's an entirely random collection of points that I wished I knew when I first started dabbling with workflows in Alfred. Bear in mind these really are "simple ideas”. How can I have multiple user inputs? The answer, in the context of what I needed, was to use two Keyword Inputs. How do I include screenshots in the workflow configuration? Put the screenshots in the workflow folder (right click on the workflow name in the second column in Alfred's Preferences then choose Open in Finder)—or in a sub-folder of that folder if you wish. I now always place mine in a folder called Images within the workflow folder. As the workflow configuration uses markdown you can then refer to any screenshot like this (for example): ![Exact name of your workflow](Images/theUA.png) Note: you must include the initial ! and, within the square parentheses, the exact name of your workflow. Although it's not proved to be one of my more popular workflows on GitHub I always use my Create UC image markdown link workflow to create the relevant link for me. ('UC' simply refers to 'User Configuration'.) How to check in a workflow if a 'Find' action has failed In my Find and replace text workflow on the Alfred Gallery I needed to trap the error that resulted from a user searching for text that did not exist within the selected text. Vitor's simple solution worked perfectly. How to use a tmp folder in a workflow Prompted by Vitor I've made use, where appropriate (for example in my Shrink JPEG/PNG files workflow on the Alfred Gallery), of a temporary folder which will get deleted on the user's next reboot. How to use more than one argument in a list filter We have already examined this of course—but it was something that I needed to learn when dabbling with workflows. How to annihilate rougue new lines Applescript is not a "simple idea” but, merely in passing (because perhaps you'll come across the problem in other contexts), it has a habit of adding new lines at the end of arguments it spits out. That can be very trying when you're trying to assemble variables but can instantly be solved by using Alfred's Transform Utility—the default action of which is Trim Whitespace. Of course, we've also looked at another way of doing that. How to open Alfred's preferences quickly If you use ⌘+ <space> as Alfred's hotkey hold down ⌘ and press first <space> (to bring up Alfred's window) and then (while still holding down ⌘) press , (comma). It takes very much longer to explain than it does to do. In conclusion That's it (you will doubtless be relieved to know) for the current series of 'Simple Ideas' posts. To those who still remain seated, if not transfixed, thank you for your patience. It would be good if you managed to learn something but, if not, just be happy if you were not provoked to throw anything at your computer screen while reading the posts. Stephen The Simple Ideas posts
  21. Background This Simple Ideas post (the penultimate one of the series for the time being) is different. There's no skeletal workflow, no painful dissection of any living thing—merely a few little tips for anyone who ever writes a basic workflow that simply sulks and does nothing (assuming that is not what it was designed to do). I am quite sure these are not mistakes that you commonly make but I am at least, let's say, familiar with them. A check-list for sulky workflows 1. Check for typos. 2. Check for typos. 3. Check for typos. It is horribly easy to refer a variable with the tinest of typos in it (or even to create one like that and miss the typo when using the variable) and then spend hours wondering at the sullen silence of the workflow when it is run. 4. Package your variables. Remember Alfred has no idea whether theChosenOne is a variable you previously created or an obscure piece of text unless you tell Alfred: so, {var:theChosenOne} please when you use the variable! 5. Have you duplicated a Hotkey Trigger or a Keyword Input? If either is already used by another existing workflow you're not going to get the results you expect from your new workflow. 6. Have you carefully created a variable but then omitted to pass that variable to something in the workflow that expects to receive it? Remember, you can't create and pass on a new variable in the same Arg and Vars utility. You will need another Arg and Vars utility to pass on the newly created variable to whatever it is that expects to receive it. 7. Have you, alternatively, passed to something in the workflow a variable that object should not receive? (The classic example of that is using a second Keyword Input to gather user input but passing to it the input from the first Keyword Input. In that case the second Keyword Input arrives carefully pre-filled with the input from the first Keyword Input…which is probably not what you want.) It is by no means uncommon to have to use an Arg and Vars utility with everything in it completely blank—to ensure that nothing is passed to the next object in the workflow. 8. Have you provided an alternative path in your workflow but forgotten to specify the Action Modifier? 9. Have you simply overlooked completing a variable in an action that expects it? (A number of Automation Tasks allow you to specify, within the task, the variable the task is to process. In a similar way you can specify a variable within the Large Type Output and Copy to Clipboard action.) 10. Are you seeing odd results when pressing esc (perhaps expecting to end the workflow)? Check whether you've told Alfred not to close his window in a place where you should not have done. Call the emergency services Stop: don't do it! The emergency services in this case consist of bug-catchers provided by Alfred: the debugger and the Debugger Utility. Both are invaluable when attempting to beat a sulky workflow into submission. If you open the debugger (⌘D is the easy way) for the relevant worklow then run the workflow Alfred will show you, in the debug window, exactly what the workflow is doing when it runs. Examination of the results can often assist in identifying where things may have gone astray. Further, you can attach the Debugger Utility to any object in your workflow to check what is being passed out of that object and the value of all variables that exist at that stage of the workflow. In conclusion No workflows were harmed in the creation of this post. Stephen The Simple Ideas posts
  22. This is not really a question for Alfred but, rather, for CleanMyMac support. You really should contact them. I do hope that you can find a way of accessing your backups though. Stephen
  23. Background I thought it was time to bring together some of things we've covered in the the Simple Ideas posts and to deconstruct a simple workflow. The one I have chosen is my Word and character count workflow from the Alfred Gallery. Be warned: this dissection is painfully slow and detailed which some readers may find distressing. The skeletal workflow Explanation 1. We start with a simple Universal Action limited to Text and Single Input Arguments. It's called, unsurprisingly, Word and character count—because we want users to recognise it in the list of Universal Actions that appear when text is selected and the Universal Actions hotkey is pressed. 2. The first thing the workflow needs to do is to save the selected text as a variable because, as you'll see, we need to do something with the text later in the workflow. Thus a variable theText is created with the value {query} (because {query} is what Alfred passes out of the Universal Action and into the first Arg and Vars Utility.) We have the text stored for subsequent retrieval. In the Arg and Vars Utility we check Pass through input argument because we want the selected text to pass to the next item in the workflow. (Remember, we can't create a variable and, in the same Arg and Vars Utility, spit out that variable to be passed to the next item in the workflow. So the easiest way here, to avoid using an additional Arg and Vars Utility to pass on the text variable, is simply to pass through the input argument.) 3. The Text Metrics Automation Task, which we set to count Words (double click on the Automation Task to select that), eats the selected text and outputs the number of words in it. 4. We don't want to lose the word count so we immediately create a wordCount variable with the value {query} (the value that passed into this Arg and Vars Utility). We have the word count stored for subsequent retrieval. This time we don't want to pass through the input argument (i.e., the number of words) but we do want to feed the text to the next item in the workflow. We set the argument to be passed on as {var:theText}: the text variable we created in 2 above. (Remember, variables need to be packaged so that Alfred recognises them as variables; so we don't simply use theText but, rather, {var:theText}.) 5. The text ends up in a second Text Metrics Automation Task—this time set to count Characters. This Automation Task devours the text, digests it and regurgitates the number of characters in it… 6. …which we promptly save for later retrieval. We create a new variable charCount and assign to it {query} (which, for those of you still awake, is of course the character count passed in to the Arg and Vars Utility). We have the character count stored for subsequent retrieval. We choose not to pass anything out of this Arg and Vars utility because we now have all we need to assemble some helpful text for the user. 7. We're going to present the user with the analysis and also a couple of choices so we use a Dialog Conditional. We provide the dialog with a title identical to that of the workflow. In the Description we set out what we wish to user to see in the dialog. In this case it's obviously a sensible summary of the result of running the workflow—interspersing with appropriate text the relevant two variables that we created so that the user will see something like this: It is worth noting two other things. First, we politely enquire what the user would like to do next—which directs the user's attention to the two options provided. Second, we ensure that the most likely option is that displayed for Button 1. The reason is that option will by default be highlighted by Alfred so that all the user has to do to select it is to press ⏎. 8. If the user does select to copy something to the clipboard we've chosen here, in the Copy to Clipboard object, to copy: Words: {var:wordCount} Characters: {var:charCount}. Remember, the copy to the clipboard is going to happen silently so it's only polite to let the user know it's actually taken place. 9. Accordingly, here's a little Notification Output that contains simply the title of the workflow and the following for the Text: field: The numbers of words ({var:wordCount}) and characters ({var:charCount}) have been copied to the clipboard. Note we again use the variables we've saved in order to make the notification rather more informative that it might otherwise be. In conclusion I hope that leaving the tattered remains of this workflow for all to see might, for some at least, have proved useful. To those deeply distressed by the painstaking, and no doubt painful, dissection I apologise. Stephen The Simple Ideas posts
  24. Background Alfred has several ways of displaying text: it can be copied to the clipboard or displayed in a Dialog Conditional or in a Large Type Output. Alfred 5.5 has introduced a Text View object. We passed over it when discussing variables and cheese sandwiches but shall now take another look at the Text View revolution—enabling us to have text served to us on a plate. The skeletal workflow Explanation The workflow is simple. It allows us to select some text then places quotation marks around the text before displaying the result to us—allowing us to edit it. (It's very basic but is part of a rather useful workflow I use to send messages to people quoting parts of articles that I have read.) 1. We have a Universal Action limited to text. So we select some text and run the 'Quote selected text' Universal Action. 2. We don't close Alfred's window (explained in this Simple Ideas post). 3. We'll use an Arg and Vars Utility to save the text as a variable and set opening and closing quotation marks. (See this Simple Ideas post for more on variables.) The selected text is passed in by Alfred as {query} so that's what we use when setting the selectedText variable. We're also setting opening and closing quotation mark variables—because we want to ensure we use smart quotation marks (we paste those in when creating the two variables). Note we're not passing out anything from this Arg and Vars Utility. 4. We use another Arg and Vars Utility to create a variable called quotedText—the contents of which are simply {var:openQuote}{var:selectedText}{var:closeQuote} (without any spaces between the variables of course). Again we pass nothing out of this Arg and Vars Utility. 5. Here we simply pass on (in the Arguments: box) {var:quotedText} (which we created in the previous step)—because we want to feed the text to Alfred's Text View… 6. Thus, here, in Alfred's Text View, is our quoted text. Note the prompts at the bottom of the window: ↩ to continue, ⌥↩ to edit the text and Esc to end the workflow. Rather more interestingly this is what we see when we double click on the Text View object: We've chosen Object Input as the source (the alternatives are Script and File) because we're using 5 above to input the text to Text View. For Behaviour: we select Selectable (rather than Editable or Markdown). That means we can select and copy text in the window but we can't edit it. Text Size: and Font: are left at their default settings. Footer Text: is important—because it's what the user sees at the bottom of the Text View window when viewing the text (and we've already seen the importance of feeding the user). Note that we have added the footer text that we want the user to see. We can press ⏎ simply to proceed and show the quoted text in large type. However, if we press ⌥⏎… 7. We keep Alfred's window open and move to… 8. A Text View window where we can edit the text: Note that in this Text View object for Behaviour: we have selected Editable rather than merely Selectable—and the only other things we have altered are the prompts at the bottom of the screen so that ⏎ allows us to edit the text and … 9. ⌥⏎ continues. (We use a modifier key for the alternative action.) 10. We save the output of the Text View object to a variable called theMessage so that… 11. In the Large Type Output we simply put {var:theMessage} in order to have the quoted (and possibly edited) text displayed. In conclusion If you want Alfred to serve your text on a plate (and optionally make it editable) the Text View object is the way to go. Of course, it's hugely more versatile than that (see what Vitor did with it in the ChatGPT/DALL-E workflow on the Alfred Gallery, for example). On a much more modest level it can be used for multi-line inputs to Alfred (you can see my Save 'ur note workflow if you want an example of that). But these posts are for "Simple Ideas” so we try to not to go too much over the top. 😀 Stephen The Simple Ideas posts
  25. Version 2.0 Simplified workflow by use of Alfred 5.5's Number Slider in the workflow configuration. (If you are using an older version of Alfred please use version 1.1 of the workflow.) Stephen
×
×
  • Create New...