Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Today
  3. Not wanting extra apps for these kinds of tasks is exactly why I made DeleteConfig. Curiously enough, I’ve worked on that a few days ago. In JXA: #!/usr/bin/osascript -l JavaScript function run(argv) { Application('Finder').delete(argv.map(p => Path(p))) } This is the right approach for such a small command. For completeness, sudo can indeed show you a graphical prompt but you have to specify it yourself. Search man sudo for SUDO_ASKPASS. Example on macOS: readonly ask_pass_script="$( script="$(mktemp).scpt" echo '#!/usr/bin/osascript return text returned of (display dialog "Insert your password" with title "Administrator password needed" default answer "" buttons {"Cancel", "OK"} default button "OK" with hidden answer) ' > "${script}" chmod +x "${script}" echo "${script}" )" export readonly SUDO_ASKPASS="${ask_pass_script}" Then you sudo --askpass {command}.
  4. Doesn’t look like it. It includes an sid (session ID) with each request, which is something I’ve found in phpBB forums. Nulled uses Invision Power Board, same as the Alfred forums. I’ve tried to programatically get the search query URLs for a phpBB board in the past and it was such a pain I abandoned the effort. This seems to use the same methods. It depends on the website but is usually a variation of this: You’ll notice the final URL I gave you is slightly different. That’s because not all parameters of the query string are strictly necessary.
  5. dave_the_rave

    Create a custom http search query with Alfred app

    Thanks a lot man! Could you please tell me how you made this possible? I tried many times but couldn't figure it out. Also, could you do it for this forum website too: https://cracked.to/ also uses the same forums
  6. Kirill Maltsev

    Cheatsheet - shortcuts for your tools

    Recently I've added some new features to the workflow: App icons for all apps and their shortcuts. Search among all shortcuts without selecting an app first (use cheatsheetg keyword for that). Hide or show only specific apps in the search results. To customize that type cheatsheet keyword, select Customize your cheatsheet, then list needed apps in settings.json (sorry for not implementing a GUI for that). Check also README.md for the settings format.
  7. deanishe

    Clipboard Hotkey Sometimes Doesn't Work

    It sounds like a hotkey conflict. What's your hotkey? What happens when you quit Alfred and hit the clipboard-history hotkey?
  8. When it's been a while since I've opened the clipboard history, when I hit the hotkey nothing happens. When I press it a second time, then it will show up fine and will continue to work fine for a while, but then again if I don't use it for awhile I will have to do it twice again. Is anyone else seeing this problem? I'm on mac sierra 10.13.5 (17F77)
  9. Unfortunately still a problem for me. On High Sierra I was fine and then it quit working after working with the beta (and I understand this is beta). My symptoms are the same. - I've unchecked, removed the items from security menu and had them added back on recheck. - I've tried a different (new) login account. None of these worked for me. Oddly I have Magnet as well and that one seems to be functioning fine. Alfred Build 922 - I can type "snip <snippet>" into alfred and it recognizes it and will paste it into underlying app.
  10. Yesterday
  11. Only in an interactive shell. You can use AppleScript: do shell script "command here" with administrator privileges
  12. Yeah I stupidly thought it would prompt me. AppCleaner is good choice. I wanted to move away from this workflow but will probably end up using it again. I just wanted to get rid of CMM as I dont use it much and want to keep a clean OS.
  13. Obviously. sudo requires you to enter your password. Either ask Finder to trash the file for you, or better yet, create a File Action that opens it in AppCleaner, which will also trash the app's other files and stop you trashing a system application like Safari.
  14. h2ner

    Open Contacts App from Alfred

    Agree with deanishe and was thinking the same: cmd-return to open in Contacts. I didn't know of cmd-O until I found this thread. As the modifiers control and option offer other options, I think cmd is a good choice for perhaps the most often wanted other action.
  15. I want to make a simple workflow that searches /Applications dir for apps and then on activating will move the item to trash. I can't do this from Alfred due to Permission denied error. I tried prepending the mv command with sudo but that doesnt work either. Is there any other way to get around this issue? I want to quickly search through apps I own and move them to trash where Hazel than picks it up and offers to remove supplement files for the app. Thank you for any help.
  16. Not with the openLocation method I’m using (which is enabled by includeStandardAdditions, not a Chrome feature). Unsure if it does with other methods (I typically want a new tab). Would have to try it out. Nope. Just checked and AlfredBookmarklet’s sanitising feature even reverses the encoding it there’s any (so the same code works with both Chrome and Safari). It also seems to work when encoded, so it appears Chrome is smart enough to figure it out when it sees javascript: at the start.
  17. Right. See what you mean. Does Chrome simply reload an existing tab if the URL is already open? (That's what Safari does.) That sucks. Presumably, you also have to URL-encode the JS in that case, too?
  18. My version opens the page and then waits for it to finish loading before running the JS. I could have an extra check in place to guarantee the active tab is really that one, but in practice I doubt it’ll make a difference. I looked at the script tag and thought “nah, I don’t want to wade through javascript files to get the exact function”. It’s literally the first line! I’ve updated the previous link to use that solution. Thank you. Small technical note you may be interested in. To use that solution we have to change the way the JS is sent to Chrome. If we use execute({javascript: js_code}) it will execute our code but ignore the page’s, meaning it will fail to run getRooms(). The workaround is to instead url = 'javascript:' + js_code.
  19. Well, there's the code to run JS in Chrome. I'd use that to alter the workflow I posted, as it makes sure the page is open in the browser before trying to run JS in it. var js = 'document.getElementById("search_input").value="' + query + '";getRooms();'
  20. Hi @bonk, welcome to the forum. I'm sorry, but if you're altering keyboard input with one application, it will commonly interfere with other applications that monitor keyboard input (such as Alfred or other snippet expansion apps). There are many apps like keyhac, and almost all of them cause problems with other applications.
  21. Welcome @FreeeG, The answer is “it depends on the website”. In this case what you type in the box is being sent to a PHP script that parses your request and sends the information back, at which point the webpage fits it in. When you’re sending your request directly to the PHP script, as in your example, you’re getting the raw information. There seems to be no simple way to do this by giving the browser a URL. A way to go about it is to tell the browser to open the page and then execute what needs to be done. Using JavaScript to write what you need on the search box isn’t enough because the page takes a while to detect it. What we can do is ignore the site’s search and do it ourselves, essentially loading the page, figuring out every element that doesn’t match what we want and hiding it. Like so (edited). I’ve made it work just in Chrome, as it seems to be the browser in your screenshots.
  22. You can't use a regular Alfred web search for this because the page is a JavaScript "app". The URL you've found is called via JavaScript and injects the result into the current page. Consequently, to achieve the result you want, you need to inject JavaScript into the page and execute it. Here's a demo workflow. It's smart enough to inject the JS into the correct tab, but it's hard-coded to Safari because I know how to do all this in Safari. You appear to be using some kind of Chrome browser, so I'll leave adapting it to Chrome as an exercise for the reader Mostly, you'll just need to change the code than injects/executes the JavaScript and point the workflow at the correct app.
  23. I am using alfred conveniently. Please tell me. I use an application that hooks keyboard input with python called keyhac. Using the sniffing function of alfred, when auto expansion is performed, the character"v"will be inserted. Looking at the event log in keyhac, V is recorded first, then Left Command is entered. TRU : D-Back IN : U-Back TRU : U-Back IN : O-Back IN : U-T TRU : U-T IN : D-V TRU : D-V IN : U-V TRU : U-V IN : O-V IN : U-LCmd TRU : U-LCmd Since there may be such things as keyhac, I thought that it would be nice to have a workaround on Alfred side. I think that it might be solved by using workflow. Please tell me how to respond by using workflow. In addition to that, if possible, I'd be more pleased if there is a way to successfully run snippets of"feature". Thank you. I am sorry if English is wrong because I am using google translation.
  24. Updated to V1.2.8 which adds phrase search delimited by single quotation marks (without quoting words are searched in any location/order): https://github.com/iandol/bookends-tools/releases/tag/V1.2.8 Also just to remind you, if you want Quicklook to work, you should change the attachmentsFolder variable to point to your Bookends attachments path. All PDFs should be in the same folder, as it would be too slow to try to find the path automatically…
  25. I'm starting out trying to make workflows and have to this point just managed to do web searches on a specific website by using Alfred's buildt inn function with the {query} option. This has worked out perfectly with sites that displays a HTTP address for a search, but how can i tackle pages that does not do this? ATM i'm trying to make a search for this page http://www.magnusli.no/ifirooms/. I tried to inspect the getRoom() function and stole a link from there include/get_room.php?id= and tried to use the {query} on that (with eg. 'Caml' as a search) and that worked to a point where the function returned the data for that search, but that was not what i intended to do. The request returned this: Wanted outcome: Any tips or input as to where to start or how to tackle an issue like this would be much appreciated. Thank you!
  26. deanishe

    How to install Worflows from GitHub

    I am a programmer, and I don't understand that. Could you explain what you mean?
  27. No. from https://www.alfredapp.com/blog/tips-and-tricks/tutorial-importing-and-setting-up-alfred-workflows/ There's obviously a tradeoff here but I think it's better to have the user do a little bit more customisation rather than potentially overwrite their existing setup.
  28. Hi. I have a hotkeys based workflow. I would like to export the workflow and preserve predefined hotkeys. Is there any way to do it? Thanks in advance
  1. Load more activity