Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. @GuiB Thanks for the simple example! One thing is that I want to open the search in a new window, instead of a new tab. That's why I started to use applescript in the first place. Is there a way to improve your example so that it does that? @deanishe Thanks, I appreciate your help! The purpose is to make sure my workflow opens a new window, both when the app is running and not running. If I execute tell application "Google Chrome" activate open location "https://www.youtube.com" end tell when the app is not running, (running it for the first time after reboot), it then activates a new window on the homepage, and another window on Youtube. That's why I decided to put that do shell line. But after your help, I changed my script around, and here's my result : \ on alfred_script(q) if q is equal to "" then if application "Google Chrome" is running then tell application "Google Chrome" activate make new window open location "https://www.youtube.com" end tell else tell application "Google Chrome" to open location "https://youtube.com" end if else if application "Google Chrome" is running then tell application "Google Chrome" make new window open location "https://www.youtube.com/search?q=" & q end tell else tell application "Google Chrome" to open location "https://youtube.com" & q end if end if end alfred_script I think I'm almost done here, the only problem is 1. if used q quoted form of q, then youtube searches for the actual quoted form of what I've typed in. So if I search apple, it searches for 'apple' 2. if i don't use quoted form of q, then I can't search for multiple words! Oh, and I have no idea where to upload my workflow, I did save it as a file. I really feel like I'm bugging you guys out with something not important at all, I really appreciate your help thanks
  3. To give you another perspective... you may find it easier to use builtin Alfred object for your workflow. From my understanding, you can do what you want simply by using a Keyword object connected an Open URL object. Often, a website will give you their homepage if the search function has no argument (like if you open the url: https://www.youtube.com/search?q= ), so if it's what you want, then you don't need to check if the query is empty or not. However, if you want to direct to a different URL than you can use the 'Filter' object of Alfred to check if the query is empty or not. Here is a workflow I did to show you both method in case you want to go this way: https://d.pr/f/q0uX2H Also, I would recommand to use the Open URL with your default browser (since I think Chrome is your default web browser and this way it would follows your preference if you switch someday), but if you want to specify to open in Chrome then you can set it into the dropdown menu at the bottom of the Open URL object. Best!
  4. Hi @shainekim, welcome to the forum. By the looks of your script, you're using Run NSAppleScript. That doesn't use {query} because Alfred calls your script with the q variable instead, which serves the same purpose. That is to say, q is {query} when you're using Run NSAppleScript. So you need to remove {query} from your script and use quoted form of q, so: do shell script "open -a " & theApp & " 'https://youtube.com/search?q=" & quoted form of q & "'" Note, I've also removed the -n parameter to open in the second example. -n doesn't open a new window, it opens an additional copy of the application. This is almost certainly not what you want to do. Apps are generally not meant to be run that way. In fact, I think this whole script is a lot more complicated than it need be. What's the purpose of the if application "Google Chrome" is running clauses? If you have any further questions, please upload your workflow somewhere and post a link to it, so we can see it and run it for ourselves. Everything I've written above is based on memory. I haven't actually run your code because you didn't provide the workflow. As such, it's quite likely I got something wrong. EDIT: I'm also moving this thread to the Workflow Help & Questions forum, which is the appropriate forum for questions about workflows.
  5. Yesterday
  6. Hi guys, I recently bought Alfred and trying to make a workflow of my taste, but I'm having a real hard time. I'm new to programming in general, but I'm trying my best so any help would be appreciated! Here's my Goal: I want to create a workflow that is triggered by a key word, with optional arguments, so that when there are no argument, a specific (not the default) browser to open a specific (not the homepage) URL, in a new window regardless the web browser app is running or not. When provided with an argument, I want to search for the argument. So for example, if I type "yy" , then Chrome opens Youtube in a new window, and if I type "yy alfred" then Chrome does a search on alfred on Youtube. The first issue I ran into was that when apps are not running in the background and are activated, if I activate the app and give it an URL, I get 2 new windows. I looked it up and I did fix it (I think). The real problem is that I cannot find how to retrieve? import? the argument as {query} and search for the argument. I've tried what the default web search does on alfred, but no luck at all. Here's my script on alfred_script(q) if q is equal to "" then if application "Google Chrome" is running then run script "tell application \"Google Chrome\" activate open location \"https://www.youtube.com\" end tell" else set theApp to quoted form of "Google Chrome" do shell script "open -n -a " &theApp & " 'https://www.youtube.com'" end if else set query to q if application "Google Chrome" is running then run script "tell application \"Google Chrome\" activate open location \"https://www.youtube.com/search?q={query}\" end tell" else set theApp to quoted form of "Google Chrome" do shell script "open -n -a " &theApp & " 'https://youtube.com/search?q={query}'" end if end if end alfred_script I'd love some hints on how I can make my workflow work! Thanks
  7. FTR got the following answer from support for my ticket #2822847:
  8. This will almost certainly be down to macOS requesting permission for Alfred to control iTunes. This should appear in front of Alfred, but sometimes, macOS will put the request dialog behind Alfred. You can try dragging the Alfred window out the way to reveal the dialog and confirm access (which you should only need to do once). There are a few things I've done for the future which should mitigate this issue (of macOS putting the dialog behind Alfred's window). Andrew
  9. Welcome @Harish Myl, When making a request or a bug report pertaining to a specific workflow, please do not open a new thread to discuss your issue. Making a new thread, while it seems like it’ll give your problem visibility, will only fragment the discussion and make it less likely the author and users of the workflow (the people that can actually help) will see it. Please read the Reporting Problems with Workflows topic, as it gives a nice overview on how to make a report with a better chance of being addressed. Here’s the thread for the Netflix Workflow: And for the Mail Worlflow: I’ll lock this so as to not divide the discussion further. Please report your issue on the linked threads.
  10. Last week
  11. When attempting to search, it begins to work however when type anything in, it goes straight to google search. The same thing happens for both the netflix and the mail.app search
  12. I have many many custom Web Searches added. It would be very useful to be able to organise them in Alfred into folders in exactly the same way as we can do with Snippets.
  13. I'm trying to add text selection as input to the workflow, but my skills seem to be too basic. Is it possible to do it?
  14. I have the same problem as well. Logging out doesn't help. I'm using Macbook Pro 15" 2018, Dell U3417W screen (3440x1440 resolution). Latest Alfred version. Reverted to 3.7 and the problem is gonoe.
  15. I can confirm that all of my snippets are saved as .json files in the following directory: ~/Library/Application\ Support/Alfred\ 3/Alfred.alfredpreferences/snippets/Alfred\ 2\ Snippets I've been able to successfully move this directory between machines, restart Alfred and find all of my snippets are present on my freshly reinstalled system
  16. Have a look here: https://github.com/vdesabou/alfred-spotify-mini-player/issues/268
  17. Hi @jereze I couldn't find "type" column to add in account section in our system, perhaps we do not have that in my organization. I guess I will wait for the next version. Thank you very much for your help. I will be looking forward to the next version.
  18. There is an error in bash capturing. It should remove the spaces around the equal sign. output=$(osascript -e 'display dialog "this is the text" buttons {"Cancel","Confirm"} default button 2 with title "this is a title" with icon file "System:Library:CoreServices:CoreTypes.bundle:Contents:Resources:SideBarDownloadsFolder.icns"') answer=${output#button returned:} or just like this answer=$(osascript -e 'button returned of (display dialog "this is the text" buttons {"Cancel","Confirm"} default button 1 with title "this is a title" with icon file "System:Library:CoreServices:CoreTypes.bundle:Contents:Resources:AlertStopIcon.icns")')
  19. I did look to see if there's a forum member of the same name, so I could tell him not to do such a daft thing. But he's not a member… Just in case he googles himself, I'll use this opportunity to say DON'T KEEP YOUR PASSWORDS IN EVERNOTE, FRANKYSEA, YOU PLONKER!
  20. No need to tell me ;-) You should better tell frankysea haha
  21. Oof. Keeping your passwords in Evernote doesn't sound like the smartest idea…
  22. Me, too. @phantasm Perhaps you should submit a feature request?
  23. and https://discussion.evernote.com/topic/115877-fix-plaintext-line-breaks/
  24. FTR https://discussion.evernote.com/topic/119643-copy-and-paste-added-extra-line-break/
  25. Thank you but... she also said: "As Andrew said, there are plans for the future of Remote, however, because it's been such a stable, bug-free app, there's been no need for a release. Many companies put out updates almost weekly, purely because they're fixing bugs constantly." Andrew said: "Alfred Remote will be receiving a big "Version 2" update, I'm already planning the feature set and improvements." This question was really meant for staff who know what is going on with the development of Alfred Remote 2. The most recent comment on the topic is from July of 2018. I didn't want to buy version 1 and have version 2 released in 2 months and have to pay again. That would irritate me...
  26. It's an SQLite3 database, as are all .alfdb files. You can open the file with DB Browser for SQLite, amongst other apps.
  27. That's what iTerm does when the connection fails. Are you sure the machine is responsive and the connection details are correct?
  1. Load more activity
  • Create New...