Jump to content


Community Hero
  • Content Count

  • Joined

  • Last visited

  • Days Won


vitor last won the day on September 5

vitor had the most liked content!

About vitor

  • Rank
    Workflow Expert / Moderator

Contact Methods

  • Twitter
  • Website URL

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

10,702 profile views
  1. You’re giving site as a special URL parameter and it isn’t — it’s part of the search. What you want is https://www.google.com/search?q=site:agilepainrelief.com+{query}.
  2. You keep asking about the technology instead of the solution. That makes you susceptible to the XY problem. Unless you really need the specific technology (which hasn’t been the case), concentrate on explaining the issue and desired outcome clearly, and let the helper suggest the language. For example, in this case AppleScript isn’t necessary at all to open the webpage. A regular system call to open with a URL would suffice. Or in your example, even Alfred’s native Open URL Action. Don’t use Run NSAppleScript unless you know you need it. You’re not doing anything with q, so you don’t. Use a Run Script with osascript as the language instead. Also, please don’t forget to upload your Workflow when asking for help, so we have something to work from. I know you usually do it, so this is simply a reminder that it’s always useful. Finally, here’s a solution with JXA. It works with multiple browsers, as it’s based on my gist.
  3. That may not be something fixable, due to the nature of the hackiness required. I’m on Sierra, but I will update to Mojave. If I look at this, it will be then. Unlikely. Apple is making automation harder, not easier. The defaults method. It’s easier if you open the Workflow and see for yourself; it’s straightforwards Bash, and just a few lines.
  4. Welcome @akishaha, Please don’t post “it’s not working” messages, as that doesn’t help us help you. How is it not working? What were the exact steps you took? What happened (or didn’t)?. What was the out put of the debugger with the log output set to “All Information”? Here’s how to post an effective bug report:
  5. Welcome @b-dubs, When asking for help with a Workflow, please upload it somewhere as we can’t properly help you without access to it. Debugging can already be hard with access to the code, and you’re asking us to guess yours from a description. There are multiple places where your code or Workflow setup may be going wrong. Without looking at it we’re shooting in the dark. Read the Reporting Problems with Workflows topic, as it gives a nice overview on how to build an effective report.
  6. This is pretty easy to do with AlfredBookmarklet. The only code you need is document.getElementById('submit-file').click();. Here’s a ready-made version.
  7. vitor

    Currency converter

    Welcome @boazal, There’s no reason for a built-in currency converter. There are already a bunch Workflows that do just that. On of them is bound to fit your needs.
  8. You’re going about this the wrong way. Don’t automate the page, use their API. If you understand bash, here’s a simple script that uses their API to merge PRs. This can’t be done with AppleScript. Automating the page requires you to inject JavaScript on the page to perform the actions. What exactly are you trying to do? Show us an example page and the exact action.
  9. Welcome @Philip_D, You can’t without an external tool. By design, Alfred’s Workflows must be explicitly called. See this recent thread for a similar request. The ControlPlane app suggested there would also work for your case. Instead of fragmenting the discussion, let’s move it there.
  10. What you want is not an Alfred Workflow. By design, those have to be explicitly called.
  11. vitor

    How can I change order of files?

    Not natively, no. It can be done with a Workflow, if you’re comfortable with coding. RecentDownloads, for example, does it (it’s the whole point of the Workflow) but only for the Downloads directory. It might be enough for you, since it’s the directory you use in your examples. Making it work agnostically for any directory while keeping the navigation features would take quite a bit more work, and wouldn’t look the same as Alfred’s native browser.
  12. A list of movies to watch or books to read becomes less useful as it grows. Eventually you forget why you added an item, meaning you no longer know if it’s no longer relevant or the one you should prioritise. RecommendationNation aims to mitigate that problem by saving the “why” together with the “what”. All commands are accessed via the keyword rec. Add recommendation will walk you through the process of adding a new item. “Reason” is optional. View recommendations shows you everything you’ve saved. ↵ on an item searches for it on a relevant website. For example, by default film recommendations will open on IMDB, while book recommendations will open on Goodreads. Several other options are available. ⌘↵ opens on a relevant site and deletes the recommendation from the list; ⌥↵ opens on a generic search site; ⌃↵ deletes the recommendation; ⇧↵ sends it to the top of the list. Edit recommendations opens the list on your default text editor. Change default sites allows you to pick different websites as your source for viewing the recommendations on the web. As an example, the choices for the “Film” category: Your picks will modify the Workflow itself and be accessible via Workflow Environment Variables, meaning you’re not limited to the included choices. If there’s a website you believe I should add, do let me know. If you want to keep your list synced between machines, use the recs_file Workflow Environment Variable to pick a custom save location relative to your home directory. Download | Source
  13. @Bhishan Unless you specifically need it, avoid Run NSAppleScript in favour of Run Script with /usr/local/osascript (AS). Also, if you’re only giving one command to tell, use to in one line instead of end tell in a block. So tell application "Lepton" activate end tell becomes tell application "Lepton" to activate The whole script can be done in two lines tell application "Lepton" to activate tell application "System Events" to tell process "Lepton" to click menu item "Search" of menu "Gist" of menu bar 1
  14. You’re firing the Key Combo too soon, before the app has gotten the time to open. Insert a delay before opening the app. Or use AppleScript to launch the app (tell application "Lepton" to activate) as that’ll only return after the app is finished launching. You may also use AppleScript to activate the specific menu item, instead of relying on keyboard shortcuts. I’ll leave that as an exercise to you, if you wish to go that route.
  15. Yes. Run Script Action with /usr/bin/osascript (AS) as the Language: tell application "Twitch" activate -- Open the app or bring to front if already open delay 5 -- In seconds quit end tell