Jump to content

GuiB

Member
  • Content Count

    252
  • Joined

  • Last visited

  • Days Won

    13

GuiB last won the day on May 3

GuiB had the most liked content!

3 Followers

About GuiB

  • Rank
    Advanced Member

Profile Information

  • Location
    Canada

Recent Profile Visitors

1,612 profile views
  1. Make sure that your have checked/set those items: Do you have "[ ] Automatically expand snippets by keyword" checked? (This is your Master checkbox to activate the auto-expansion of your snippet in Alfred) Do you have the box under the column "A->" of your snippet checked? (This is the checkbox to activate a specific snippet for auto-expansion) Did you set a Keyword for you snippet? (This is what you need to type to activate the auto-expansion of your snippet)
  2. From my tests the bug is not because the keyword object is activated externally, but because it has an empty 'Title' or 'Subtext'. Your "{var:empty}" get changed to an empty string, so it does the same. For now, just replacing your '{var:empty}" to any string (but only spaces since Alfred strip them) will repair your workflow. So, the problem is "Getting" into a keyword object that has no Title or Subtext defined. I mean arriving to the keyword from another object won't work, but invoking it directly using it's keyword work.
  3. @Chris_YZX, I can still access it from the link above, but here is from another link/website in case this better work for you: https://d.pr/f/er1jIz
  4. @deanishe, yes, it wasn't clear if it was possible to retreive the contact information from the api, so I gave an alternative if @Dreamisdead could only get the name of the contact and have the contact information from is own Address Book database... But yes, if everything is inside your API, then yes it shouldn't be too difficult to write a script filter to extract the full contact information from the API. Also, a little tip, if you want to access the email or phone or something directly from your first Script Filter, you can make use of your modifier keys to access them directly. For example: CMD+Enter to get the email address and put it in your clipboard directly or opening a new email with this address directly... it's up to you! Happy coding!
  5. I don't know if I get it right, but if you want to search for a contact and get the output like the default contact search of Alfred, then you can search your address book database using a File Filter based on your contact name that you get from your first script filter and send the found contact to open in Alfred (if Alfred is set to "Open Contacts in Alfred"). What I mean is: [Your Script Filter] -> {query is now your contact name} -> [The File Filter that gives you a list of matches] -> [Open the match in Alfred] Here is an example: https://d.pr/f/yIPU1v Just change the "ys" keyword object to your Script Filter If you Employee name is always the first in the list then you can rapidly press a second Enter to go directly to the Alfred Contact Viewer (or automate this second Enter key press) It could be done by using a second Script Filter, but if you want to access your contacts database directly then I think using the File Filter could be an easy way To give credits, my File Filter that search the Address Book database is a modified version of @Vero workflow that you can find here:
  6. Just to add... this would also make it possible to copy a selection of the text that is further down in the view and paste only the relevant part that we want.
  7. It would be great if the right pane of the clipboard history (the preview side) could allow to scroll to read all the contained text when it is longer than the available space. Sometimes we could have multiple clipboard contents that have some changes further down where we can't see it so we can't really know which one to choose. There's the Large Type (CMD+L) that make it possible sometimes, but other times the text is too long to make it readable using Large Type. So, adding the possibility to scroll the preview would be great! Thanks
  8. I think this will give you what you want: You can download an exported snippet collection here: https://d.pr/f/wWdRPN Or, if you want to build them yoursel, create new snippets with: nmonth => {date +1M:MMMM} pmonth => {date -1M:MMMM} mmonth => {date:MMMM} You can find more about snippet date arithmetic and format here: https://www.alfredapp.com/help/features/snippets/ and here: http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns
  9. Ok, I understand, it's just a little confusing that it changes a feature from another place in the preference. Now, I'm seeing that checking from one place or the other uncheck the other. I was thinking that the "Use ← and → for folder navigation" would only work when inside Alfred's File Navigation (while browsing the file system) and not during a standard search so that in a standard search I could use the → key to open the file action menu and during a file navigation I could use the arrow to navigate in and out of folders. So, not so much of a problem, I was just confused a bit that after testing the file navigation feature with the arrow keys that when I unchecked the toggle to get back where it was, Alfred didn't revert to work the same way as before since it also unchecked the toggle from the Show Actions. I'll keep in mind that they are linked
  10. I'm not sure if it's intentional, but I like to use the → key to access the File Actions when finding a file in Alfred. However, I've been surprised that this key wasn't working anymore. Actually, I've been playing around with the File Navigation function to "Use ← and → for folder navigation" and now realized that when we uncheck this feature in the File Navigation preference, it also uncheck the "Show Actions : [ ] → " of the File Actions preference. I understand that both feature could be related, but it's a little surprising to find out that a checkbox manipulate another one on another preference pane and especially since the "→" key is checked by default to access the File Actions. I'm just wondering if this is wanted or not. If it is, maybe there could have a mention that unchecking the "Use ← and → for folder navigation" will also uncheck the one in the File Actions menu or maybe it would be preferable to pop a dialog to ask the user if it also wants to uncheck the arrow for the File Action as well.
  11. @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"
  12. 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!
  13. From your screenshot it seems to be ok, but if you copy+pasted the string from Alfred to your post above when you say: then we can see there's a space after the "x" at "x -cardhop..." that shouldn't be there... So please try by removing this space if it's there or by copy pasting this: x-cardhop://show?id={uid} I hope this helps!
  14. @luckman212, yes to use the output of the script I would use an Alfred External Trigger that is triggered by the JXA so we can do something from Alfred. So, yes you can write to a file or directly use the argument to the Alfred External Trigger. I've made an example here: https://d.pr/f/2rzrt1 Here is the inside JXA script for those wanting to see directly without downloading: ObjC.import('Foundation') const args = $.NSProcessInfo.processInfo.arguments const argv = [] const argc = args.count for (let i = 0; i < argc; i++) { argv.push(ObjC.unwrap(args.objectAtIndex(i))) } delete args // Use argv[1] and up for the input arguments Progress.description = "Progress indicator; Input Args = " + argv[1] Progress.totalUnitCount = 25; for (var i = 1; i < 26; i++) { Progress.additionalDescription = "Step at: " + i Progress.completedUnitCount = i delay(0.1) } Application('Alfred 3').runTrigger('progress_bar', {inWorkflow: 'gbProgressBarExample', withArgument: "Total Count = " + Progress.totalUnitCount})
  15. @bivalvegruff, the output you wrote means that the preference is not set on you computer, you should see an output that only mention: org.yanex.marta Did you sent the second command as well? ( defaults delete -g NSFileViewer ) This one is meant to be use if you want to revert back to Finder and should then give the output that you have now when writing defaults read -g NSFileViewer . You can try again with the first command only ( defaults write -g NSFileViewer -string org.yanex.marta; ) Here is what I get on my side in the Terminal: $ defaults write -g NSFileViewer -string org.yanex.marta; $ defaults read -g NSFileViewer org.yanex.marta
×
×
  • Create New...