Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Would it be possible to copy the contents of the selected not to the clipboard?
  3. Today
  4. Added new NSFW option to include subreddits marked "over 18" in search results.
  5. Yesterday
  6. Then your workflow needs to manipulate its own info.plist or a snippet collection. Auto-generating a snippet collection is probably the simplest way.
  7. @deanishe I have uploaded the workflow here: https://github.com/bhishanpdl/Shared/blob/master/Alfred_questions/aa Clipboard to Snippet - COPY.alfredworkflow?raw=true I am looking a way to create dynamic trigger using argument from the alfred workflow.
  8. A dynamic trigger won't work for a Snippet Trigger because the variable arg will only exist when you run the workflow via the snn keyword. If you want any further help, please upload the workflow somewhere and post a link. Screenshots are not much use.
  9. @deanishe Where are the snippets stored? May be If I create a directory "TemporarySnippets" in that folder and create a text file/json file/ whatever and call the snippet trigger afterwards?
  10. I tried this: try to create dynamic trigger from the alfred workflow but, it did not work: - snn hello ==> creates hello.txt and var:arg is set to "hello" - tried to use that varible to make trigger object, but failed. It creates hello.txt but u;hello does not work.
  11. No, that is not what I mean. I'm talking about Snippet Triggers. You have a single snippet keyword that activates a Script Filter. The Script Filter shows you a list of the texts you've saved. You choose one and it's inserted into the current application. Obviously, you also need to add a way to save/add texts to the workflow.
  12. @deanishe I guess I got what you mean: workflow: Keyword sni ==> get argument name to "arg1" ==> Snippet and use "arg1" as trigger name. I will try this method. If I could not manage to get it done, will seek further suggestion.
  13. **Update** I could not create Snippet triggers, but found alternative route using Alfred Keyword. "sni hello" will create "hello.txt" from the clipboard. "sno hello" will read that "hello.txt" and paste to the frontmost application. This works great, but I am only missing "u;hello" and "u;hi" etc where I can simply type, instead of hitting keys.
  14. I said Snippet Trigger, not Clipboard History.
  15. Because, lets say i have a code snippet from pandas groupby in python: gp1 = => daily = flights.groupby(['year','month','day'],as_index=False) and another snippet as gp2 = => daily = flights.groupby(['year','month','day'],as_index=True) It would be easier to type u;gp1 and u;gp2 than go to clipobard manager and search for clipboard history.
  16. Why don't you use a Snippet Trigger to show a list of the clipboard contents you've saved?
  17. It would be extremely useful if we can create snippets on-the-fly from the clipboard contents. For example: "snip tmp" will create a snippet called "u;tmp" from the clipboard content. So that when typing "u;tmp" will expand that snippet automatically. For only one snippet I can do this: =========================== Alt shift t ==> copy the clipboard to tmp.txt u;tmpp ==> autoexpand the text after reading from tmp.txt from that workflow directory. But, this works only for one snippet. It would be nicer if it can be done more dynamically. The suggestion is much appreciated. I have provided MWE in the github shared file: https://github.com/bhishanpdl/Shared/blob/master/Alfred_questions/aa Clipboard Copy.alfredworkflow?raw=true
  18. Last week
  19. for me, in the Russian appstore is looking for properly. Thank you very much !!!
  20. How To Use Keywords: - 'Open Tensorboard': Opens a Tab with your Tensorboard Web Interface (Tensorboard has to be running) - 'Close Tensorboard Session': Closes your Tensorboard Session File Action: - 'Tensorboard Server' (on Folder): Opens a Tensorboard Server with the selected folder as the '--logdir' parameter Download Current Version: DOWNLOAD (1.0.0) Git: gitlab.com/sirbubbls/alfred-tensorboard
  21. @shainekim ah, sorry, I read too fast and didn't see you wanted in a new window. For that I think there's a option in Chrome to open link in new window, but if you don't want to change your Chrome preferences for your workflow, here is some more way to do it... If you have problem with the "quoted form of" then it's better to url encode your string. It's quite easy with Python, so I showed you how to pass and access the output of it in this updated workflow. Also, I've seen that Google Chrome can be asked by the "open" command to open in a new window using the argument "--new-window", so I added an example with it and an example using AppleScript to open in a new window and another example using only a single Run Script using Applescript. Here is the updated workflow: https://d.pr/f/JnjG9F Have a look at the keywords: "yy3", "yy4" and "yy5"
  22. You need quoted form of for do shell script to make your query shell compatible. You should not use it in plain AppleScript. This should work whether Chrome is running or not: tell application "Google Chrome" to set URL of active tab of (make new window) to "https://www.youtube.com/search?q=" & q You're not, but when you have a question about a workflow, it's hard for us to answer when we don't have the workflow you're talking about. So help us to help you by uploading the workflow somewhere (Dropbox?) and giving us a link, so we know what you're actually talking about.
  23. @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
  24. 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!
  25. 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.
  26. 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
  27. FTR got the following answer from support for my ticket #2822847:
  28. 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
  1. Load more activity
×
×
  • Create New...