Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


GuiB last won the day on October 29 2017

GuiB had the most liked content!


About GuiB

  • Rank

Profile Information

  • Location

Recent Profile Visitors

1,149 profile views
  1. Double Tab Modifier Key - How To Setup

    With what @deanishe said, make sure you don't have another workflow that already uses the Hotkey that you want as Alfred doesn't allow two times the same Hotkey even they are into different workflows. If you try to set a Hotkey that is already registered somewhere else, then it would look like nothing is happening.
  2. Text Formatting Snippets?

    @lentaro as @BrianBarr mentioned, there's more way now using the Snippet Trigger. I just sent some workflow in another thread about that, so have a look at this thread and posts to have a way to output Rich Text using a Snippet Trigger. In short, just create a RTF or RTFD file and use it as your snippet.
  3. Rich Text in Snippets

    @rebdeg, ok, I went back home and had a look at this... it's more complex and I'll give another example if I find a simpler way to do it, but I got it working with some AppleScriptObjC. But in short, on your side you just have to change the file path on the first line and it should work. Look here for a Workflow as example: https://nofile.io/f/RXhJKD2bpYC/Example+-+Rich+Text+Snippet.alfredworkflow The main part is this (the AppleScript inside the Run Script is now this): set theFilePath to "path/to/your/RTFD/file.rtfd" ------------------------------------ use framework "Foundation" use scripting additions set pboard to its NSPasteboard's generalPasteboard() pboard's clearContents() set theURL to its (|NSURL|'s fileURLWithPath:theFilePath) set fileWrapper to its (NSFileWrapper's alloc()'s initWithURL:theURL options:0 |error|:(missing value)) set attrString to its (NSMutableAttributedString's alloc()'s initWithRTFDFileWrapper:fileWrapper documentAttributes:(missing value)) set theData to attrString's RTFDFromRange:{location:0, |length|:attrString's |length|()} documentAttributes:{DocumentType:"NSRTFD"} pboard's setData:theData forType:(its NSPasteboardTypeRTFD)
  4. Rich Text in Snippets

    @rebdeg, You're trying to expand a RTFD file (Rich Text Format Directory) instead of a simpler RTF file. RTFD are document, so contains the RTF file inside + associated images... I need to go at the moment, but will have a look later when I come back.
  5. Rich Text in Snippets

    @rebdeg, try adding a delay before pasting. It was working great without on my side, but yes, if your snippets takes a little more time to copy, then a delay will help. Try this new workflow (change de delay time to a value that work better on your side): https://nofile.io/f/NvOjpgwVFOC/Example+-+Rich+Text+Snippet.alfredworkflow
  6. Rich Text in Snippets

    @msw70, about HTML , just change the class to HTML ( read theFilePath as «class HTML» ): set theFilePath to "path/to/HTML/file.html" set the clipboard to (read theFilePath as «class HTML»)
  7. Rich Text in Snippets

    With the Snippet Trigger it is possible to do almost anything... It's not as easy as having a native way of inputting rich text into an Alfred native Snippets, but if you don't mind creating a workflow and a RTF file as your snippet content, then you can simply use a Run Script set to AppleScript that read the content of the file and put it into the clipboard and then paste it to the front application Here is a workflow as example to show you how to do it (basically, just change the path to the file and set your own rtf file path to use your content): https://nofile.io/f/gK6eCRmeHCU/Example+-+Rich+Text+Snippet.alfredworkflow Or, here is the main part of the Workflow to put the content of the RTF file into the clipboard, after that, just connect to a Dispatch Key Combo set to CMD+V to output to the front application set theFilePath to "path/to/RTF/file.rtf" set the clipboard to (read theFilePath as «class RTF »)
  8. @avclark, from the look at your image, you're mixing AppleScripting with Bash scripting. In your image, everything is AppleScript, but you line just before the last one `osascript ~/scripts/ht.applescript` and the Language that your Run Script is set (`/bin/bash`) To run an external AppleScript using a Run Script set into Bash language and passing an argument, just put: `osascript ~/scripts/ht.applescript "$1"` Arguments are passed differently between scripting languages since they have their own syntax. In bash, the first argument can be accessed with $1 (which is used here since alfred pass it's query as one string argument). To start learning, I think you're better building small scripts directly inside Alfred to play around with different scripting languages and start with a default Run Script and switch between languages to see what are the default scripts for each language. You'll see how to catch the arguments into a variable (the default script set a "query" variable to the argument passed). Also, if you want to run a script externally, you would need to make you external script executable by running a terminal command to change its permissions: `chmod +x`
  9. Email Search

    Look in this discussion (first attachment) for some tips and info on this and @Vero gave a workflow for that that may be useful to you (see second attachment) )
  10. Or set 2 environments variables using 2 chained Keyword objects connected to an Arg and Vars object and accessing them using `(system attribute "myEnvVar")` in AppleScript. @avclark, I made a small workflow to show you 3 options: 1 by using 2 Keyword object that each set an environment variable 1 by using 2 Keyword object where one set an environment variable and the output of the other is directly used as the passed argument to the AppleScript 1 by using 1 Keyword object to write your 2 words separated by a space and which the full string is sent to the AppleScript and where both words are extracted Link: https://nofile.io/f/owD6a5d5U2g/Example+-+Pass+two+variables+to+AppleScript.alfredworkflow
  11. Snippet Triggers with parameter

    To expand @deanishe suggestion, there's a "Snippet Triggers - Getting Started" example in Alfred that would show you some ways to do what you want (especially the "hellomsg" snippet). Look into "Alfred Preferences -> Workflows -> [+] -> Getting Started -> Snippet Triggers".
  12. @Jasondm007, sorry, I don't know what happened, but here is another try at uploading: https://nofile.io/f/Q1dXj3T91VF/Fallback+Search+-+Removed+Keyword.alfredworkflow -------- Edit: Make sure to add the Fallback Search to you Default Results Fallback Searches at : Alfred Preferences -> Default Results -> Setup fallback results -> + -> Workflow trigger -> Search Google for '{query}' (Removing keyword) or Search Google for '{query}' (Removing first word)
  13. I don't think there is a way to deactivate Alfred and reactivate it beside quitting it and opening it again. So, you'll be better to have another application that could do that. I mean, it closes Alfred when your specific game is front most and open Alfred when it is not... But I guess it would make Alfred less responsive and risk of missing keys. Therefore, I think your best solution would be to put your game application into the blacklist all of your interfering hotkeys. To do so, go into your workflows that have an interfering hotkey, open the Hotkey object, go into Related Apps, make sure the "Hotkey is only active when the following apps " is set to "don't have focus" and then drag and drop your application into the list field. Save the popup and then you should be good. Note that, however, you can't have a whitelist and a blacklist (you can't have two list: one set to "have focus" and the other to "don't have focus"), so this will only work if your hotkey doesn't already work only for specific app(s).
  14. Since a fallback search can't determine what you have in mind when you give it a string to process, there's no way it could intelligently remove the first word of a string (well, from my understanding). Therefore, I think you best bet would be to redefine the fallback searches that you wish them to process how you define it. I did a workflow as an example to show you as a way to make a more "intelligent" fallback search based on your criteria. I did two version, but I think the first one would be the best one to use as a replacement to the default fallback search, but need a little more work from your side. In short, you make a list of keywords separated by semicolon and if you send a string to this fallback search and the workflow find that the first word is into this keywords list, then it will remove it or if not found it would keep the string as is. The second example always remove the first word, so maybe best to use next to the default fallback search. To change the keywords list or add to it for the first method, just look into the environment variable in the Workflow preferences. I put ";" as the delimiter, but let you change it if you prefer another one Link: https://nofile.io/f/Q1dXj3T91VF/Fallback+Search+-+Removed+Keyword.alfredworkflow Best