Jump to content

Stephen_C

Community Hero
  • Posts

    1,347
  • Joined

  • Last visited

  • Days Won

    65

Posts posted by Stephen_C

  1. Welcome to the forum.

     

    So far as I'm aware you do need to check/uncheck boxes individually. However, see also the note at the bottom of the main list which makes it clear that only the Universal Actions relevant to the particular context will be listed in practice (e.g., file actions where a file is selected).

     

    Stephen

  2. 1 hour ago, bucweat said:

    and use CleanMyMacX

    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. 4 minutes ago, MacDaddy said:

    are you able to expand and show me what you have in terms of contents for the Save the Query portions

    It will be something like this:

    Var.thumb.png.292c02335b13bb1a80883da885e0789e.png

     

    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

  5. 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

  6. 5 hours ago, kltjlt6458 said:

    where do I choose my .csv file? 

    As I said in my previous post:

     

    8 hours ago, Stephen_C said:
    • select your CSV file using your Universal Actions hotkey; and
    • choose the Convert to Snippet Collection action.

     

    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

  7. Welcome to the forum.

     

    5 hours ago, Cyber said:

    I didnt have access to the older laptop anymore

    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

  8. 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!).

    ContactPhone.thumb.png.63e8a8781753464c4e59a1171f02245a.png

     

    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):

    Setup.png.58154da70330c8de40c326d7c954a094.png

     

    Stephen

  9. 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

  10. 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

  11. 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 :

     

    FillName.thumb.png.8eb4895fba2e32ebe6bee73f95cce7d6.png

     

    The workflow now provides a fast way of including images in a workflow configuration. (There are still no dependencies.)

     

    Stephen

  12. 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

  13. 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

  14. 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
    SkeletalWorkflow.thumb.png.ef336918abd2b5a93911a831b79edab0.png

    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).
    WCVar.thumb.png.9e555dacd1572de923787bb73edbe2c3.png

    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.
    Dialog.thumb.png.c7667b27e3bf5da4e0684a0a197bcdbf.png

    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:
    DialogDisplay.png.0896489843cfaf8ab8bbaf390f4509d1.png

    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

×
×
  • Create New...