Jump to content

Smpl

Member
  • Posts

    39
  • Joined

  • Last visited

Everything posted by Smpl

  1. @vitor I'm just trying to create a workflow that will let me append/prefix certain things to selected text using keyword function in alfred. I don't like hotkeys, my main reason for getting Alfred was to avoid Hotkeys as much as possible because I don't like having to remember them.. for work, we use a lot of markdown formatting, so I want to be able to Highlight some text (wherever) and then prefix/append that text with the correct markdown formatting. And eventually do the same with selected text on multiple lines, as I often have to copy a list from an excel sheet, which then I have to manually go line by line adding the * in front of each line to get the bullet markdown format for a list. Unfortunately, even with Alfred 5, we are limited to only getting selected text using a hotkey. So I've set the 1 hotkey in the workflow to be the same as hotkey that calls Alfred (Opt + Space) ..
  2. I'm not sure if "arguments" is the correct term to use here.. so I'm just going to explain. I want to use the "conditional" block in the work flow, but I want the condition to look at the first "part" of the input in the Alfred text box. For example: if I have "!b What time is it" in the Alfred input box, I want the conditional to look at the "!b" part to know where to go next, but pass through the "What time is it" part. This become tricker when I have multiple lines Example: "!b What time does the movie start where is the move theater how much is the popcorn?"
  3. Edit: Totally didn't realize this post was over a year old.. say the 06/10 but brain ignored the "2021" part 🤷🏻‍♂️ .. Oh well.. at least what's below could be useful to someone out there.. You don't need to "Get Clipboard" Additionally, if you update to Alfred 5. You can actually send an Input As String to the Shortcut - So you don't even need to use the clipboard
  4. Would be better if you got rid of the "Chat with" and just showed the Contact Name / Number instead..
  5. Doesn't seem to work properly... Now this one is showing up after doing the reload..
  6. So I'm trying to remove some useless results from Alfred when searching.. wish there was a blacklist to prevent certain things from showing up, but for whatever reason that doesn't seem to be possible.. So in the "Search Scope" there was an entry for /System/Library/CoreServices/Applications that I removed.. but results from that location are still showing up when searching in Alfred. How do I make these results go away? is there some sort of cache going on? If so, how do I clear it? If I need to launch an app, I would just use spotlight.. I use Alfred for the things Spotlight can't do, not as a replacement.
  7. I have a workflow I'm working on that has a List Filter that is then passed to a conditional, but when I select an item from the List filter the argument from that List remains in the Alfred box. How can I have it so that after a selection is made from a List Filter, the argument doesn't stay in the Alfred box? Reason being, is that after the conditional, some of the flows have another list box, which I then have to manual delete (backspace) the argument from the previous list before the options in the new List Filter will appear. Demo Workflow https://send.tresorit.com/a#zAXymmxDDj_Yr9roUyqq5g just type cleartest, ENTER, select "Item 1" from list, and notice item1 appears in the Alfred box. How do you auto delete/remove "item1" Edit: So the only way I've figured out how to do it, is to dump the output of the List Filter into a dummy Arg to Var or use the Replace and just leave the output blank. Is there no better way to do this without the need of another item in the workflow?
  8. I'm curious why pointing folks to use Homebrew to reinstall Python2 instead of just installing it via the download from python themselves?
  9. To note: the "Manage Settings" part of the workflow does appear to function. I enter the path to the .json and it does nothing when pressing enter. Will also note; that I copied the "RectangleConfig.json" file to the /Users/{user}/Library/Application Support/Alfred/Workflow Data folder first, to see if the workflow would use it, but it did not. I manually added the path using the variable button (top right) of the Alfred Preferences window. And now it seems to be working. I removed/delete the work flow, just to test, and upon adding it back again its not seeing that .json in the Workflow Data folder. Only works again after I manually add the value to the variable Heads up; your workflow uses python, which has been removed from macOS 12.3 by Apple.
  10. Thanks, this works pretty well! However it only lets me select one of the 'results' from the script filter list either by pressing enter on it or the ⌘{number} keyboard shortcuts or by arrowing down then pressing enter. I'm not able to like start typing the name of the playlist Edit: Actually I think I got it; I checked "Alfred filters results" which seems to have fixed the not being able to type the playlist name. Not sure if that is the correct or only way to make that work.
  11. It was obviously a typo; as I typed it correctly in the next post. thanks, I'll try to figure out how to make that work.
  12. var music = Application('Music'); music.activate(); music.playlists.name(); well derp; looks like I figured it out. I swear I tried this hours ago and it didn't work 🤦🏼‍♂️ Now I have absolutely no clue about JSON ["Library", "Music", "Music Videos", "My Top Rated", "Recently Played", "Alfred Playlist", "Breakup Songs", "Cruise Control", "Electronica", "Folk Music", "Gaming", "Hip Hop", "Kuntry", "My Shared List", "Megans List", "Private Songs", "Work Out", "YouTube Sync"] This is what is outputted in the Results of Script Editor using the JXA (JavaScript) code above. Could really use the help here on how to convert this list to a JSON, or at least point me to some documentation on it and I'll try to figure out. But I've never used JSON before.
  13. var music = Application('Music'); music.activate(); music.currentPlaylist.name(); I've been trying to learn a bit here; Stating from scratch basically. I'm able to get the name of the playlist that is currently playing in Apple Music, but have yet to figure out how to get a list of all playlists like you can with the AppleScript in the first post. There are 3 options userPlaylist, LibraryPlaylist, SubscriptionPlaylist oh and FolderPlaylist but I haven't figure out how to use those yet. Pressing onward..
  14. I did end up create a new topic Help with getting output from AppleScript to JSON Problem is, I'm not a "programmer." So I'm not familiar with how to change the AppleScript to this JXA you mentioned before to interact with the Apple Music apple. I spent several hours googling how JXA/JavaScript could be able to control/obtain data from Music but there was nothing on this subject. Some smart individual needs to come up with a program that lets you input AppleScript, and it outputs JXA, lol.. I'd pay for that Basically what I'm trying to do is dynamically get a list of my Playlists in Apple Music, then output that to the AppleScript I have to play that playlist. Its not super important or vital that its possible, I just wanted to be able to share my workflow and the friends that use it wouldn't have to Manually edit the List Filter with their Playlist titles like I have. I personally don't mind having to do that, just thought it would be easier for others if the workflow did it for them. Edit: I got the JXA (JavaScript) part of it figure out through trial and error, and looking through the Dictionary in Script Editor, but I'm stuck on the JSON part. I've posted the code I'm using in the other topic, where I've been having a conversation with myself
  15. What was suggested to me in another topic is that I need to use "JXE" and Script Filter JSON Format But I'm not familiar with JXE I have an AppleScript to pull a list of playlists from the active Apple Music app tell application "Music" get name of playlists end tell How would I put this into "JXE" so it can return JSON? to using in a Script Filter?
  16. @vitor I just thought it would be better to use the same topic, since its related to the same workflow. Instead of starting a whole new one. I'm good with the original question, I'm fine with how it is now. I didn't realize that the workflow window expands to allow for more space, so I was originally trying to see if there was a simpler way to get to the same end result to save on space in the work flow since I knew I had more to add. If its better than I create a new Topic for the Script Filter question (or whatever is needed to be used instead) to obtain the playlists automatically from the Music app, then I will. Thank you for the help thus far though
  17. That is true; but I don't mind typing full words. I type pretty fast, and most words are only a few letters any ways. But I put the keyword in, because it hides the annoy google search from the list filter. However I did add a shortened keyword on the List Filter (am) to jump right into that if needed (but again with the annoying google search at the bottom of the list) But I added a Playlist option to the flow, but have to manually add the playlist names to the List Filter. Is it possible to get the playlist using the Script Filter? I tried using tell application "Music" get name of playlists end tell But don't know how it outputs the results, or what I need to output them to?
  18. This doesn't seem to be working, at least not for me. For example if I do rct>maximize when I'm in Apple Notes, it just creates a new line in the note I'm working on Or if do the same when Finder is the top app, it just makes a bonk noise. All my Rectangle shortcuts are whatever the defaults are, as I've never cared to change them since I just use Rectangle for the snapping (drag to snap) function as I don't like having to remember a million keyboard shortcuts. maximize in Rectangles appears to be the combination of "⌥ ⌘ F" I looked in the /Users/{user}/Library/Application Support/Alfred/Workflow Data folder, but I don't see the mentioned "RectangleConfig.json" file that is supposedly created.
  19. If its a workflow; edit it to remove the subtext where not wanted 🤔
  20. Is there an easier way to make it so that I can type the key word + the argument for the List Filter when opening Alfred? In the above, I can type "music play" and it performs the intended action/output. Or I can just type music, hit enter and get the options from the List Filter (in case I have a brain fart and forget what options are available or how I abbreviated them) Just wondering if there is another way to do this, without having to use the Conditional Filter after the initial keyword? Reason, because I'm working on another workflow that has many more end commands and need to conserve space in the workflow build window. Also just trying to learn and not over complicate things as much as possible.
  21. Network Volume is always available. If these are "two" apps, then why did I only have to install one app? Sync setting is under Alfred>Advanced
  22. It only seems to be working if I close Alfred, then relaunch it. The new workflow, or changes to something are then applied after Alfred has been restarted. I made the change on the desktop Mac, waited about 15min for that change to show up on the MBP, but it never did... until the restart. The "syncing service" I'm using is just an in-home server rack. The Alfred docs said iCloud was not recommended, and I will not install GDrive or Dropbox on my machines. So I'm just using a folder on my server, which is mounted/mapped in Finder.
  23. So I have 2 List Filters setup which output to the "arg and var" I need (or at least I think I do) to output those to a "Run Script" action but its not working as I hoped. curl -d '' "http://{var:server}:8001/command/{var:action}" This is the script I'm trying to run, replacing the var with the output of each of the List Filters When I dump it to the "Copy to Clipboard" output everything looks fine. The expected data for each List Filter is replacing the var where it should. I have the Run Script action set to /bin/bash, with input as argv, but that doesn't work I tried setting Run Script action to "with input as query" with escaping set to "brackets" but then that is not working with the variables set from the List Filters.
  24. In Alfred settings, I have set the Syncing "Preferences Folder" however the .alfredprefences file shows that it has not been modified since Dec 2021. The same folder is set in Alfred on my MacBook Pro, which is not updating with any of the changes or new workflows created on my desktop Mac. How do I force an update/sync? Is there a better way to sync settings/workflows/snippets/etc between two instances of Alfred?
×
×
  • Create New...