Jump to content

gandalfsaxe

Member
  • Posts

    103
  • Joined

  • Last visited

Everything posted by gandalfsaxe

  1. I have a slight problem with the hotkey version. After using e.g. "Title case" hotkey, it doesn't just alter the letter cases, but also adds a line break. Any way to avoid / fix this?
  2. I ended up using the hotkey version. Despite the slightly annoying delay, it was more what I was looking for
  3. I deleted instances / mention of uid in those two files, but now the workflow doesn't really work. Nothing pops up when i choose "case" or "casep". Oh well...
  4. Hi tried to look around in the workflow and couldn't see any obvious place to change this. Any tips?
  5. Nice script. My problem with it is, it requires too much focus to use. I can't invoke a particular keyword or hotkey because the order of the items (Upper Case, Lower Case, Title Case etc.) depends on what was the last used. Is there any way to order them statically? Or even better, to invoke a different keyword for each, which reduces 3 steps (keyword + Cmd+number + paste) to 2 (keyword + paste).
  6. Agreed. The workflow is an acceptable workaround, a simple option would just be easier
  7. Thanks! I'll play with it tomorrow. BTW Is there any way to get around the "paste + newline" that happens when you direct Pythons print() output to a "Copy to clipboard" module (filling it with "{query}")? I'd like to just paste the result of the Python script without also getting the newline.
  8. I get that I can do this with the pbpaste command in a bash script that also calls python script. I just don't see how it's not a completely arbitrary limitation that "Hotkey" modules have a "OS X Clipboard Contents" as an option in the dropdown menu for "Argument", while keywords modules have no such option. Anyway, how exactly do I use pbpaste to achieve this?
  9. I'm not talking about wanting to have Alfred copying the text in focus, I just want Alfred to be able to use the existing clipboard item as an input. I can't see why this limitation isn't arbitrary? Surely Alfred have permission to the clipboard?
  10. Thanks for the suggestion, can you give me a hint of how to write the one-liner in bash to achieve this? It seems like an arbitrary limitation that Alfred can insert the clipboard content as input on a hotkey, but not on a keyword? Is there any technical reason for this or is it arbitrary? I'm thinking about sending a feature request to Crayons Ltd about it. Yes I'm using the Copy to Clipboard at the end - the only practical way I knew of getting python output out in an Alfred workflow. I think I'm fine with it, however it also inserts a newline at the end. Do you know any way to prevent this newline from happening, so it just paste the python script result from the clipboard and *don't* also insert a newline afterwars?
  11. Hi, I'm trying to make a workflow where I do some regex on the text in the clipboard. To make things easy, I'd like to run the python script with the input being the clipboard, but I can't find out how to do this. I expected this to be easy, am I missing something? Best regards,
  12. I bought the remote with full expectation of basic media controls. But I can only find controls for iTunes specifically, not system-wide play/pause, next/previous, volume up/down and mute? Please tell me I overlooked it
  13. 1. How does the workflow distinguish between note creation and search? It seems like you can't create a new note that remotely resembles an old one since both operations are done with "n [something here"]? I must be missing something? 2. I also can't create new notes in any way. Here is a debug log: [2016-06-05 13:01:58][ERROR: input.scriptfilter] Code 1: execution error: mkdir: /Users/[myusername]/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data: No such file or directory (1) [2016-06-05 13:01:58][ERROR: input.scriptfilter] Code 1: execution error: mkdir: /Users/[myusername]/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data: No such file or directory (1) [2016-06-05 13:01:58][ERROR: input.scriptfilter] Code 1: execution error: mkdir: /Users/[myusername]/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data: No such file or directory (1)
  14. Sadly it doesn't work anymore. It just hangs on searching.
  15. Thank you for the suggestion. However this would still require me to hold Ctrl for every search, is there no way to force google search as default action and only file search by doing a special action (such as space or ')?
  16. Is it possible to have Alfred only do Google Searches unless I specifically specify that I want file search (by pressing space first or putting in a ')? I always use Spotlight for file search anyway, and sometimes my search term coincides with a filename on my computer. I just want Alfred to default to Google Search always unless told otherwise. Thanks
  17. Doesn't work now? If I type 'nf', Alfred start the script, but as soon as I typing something more, it switches to standard google search. Any ideas?
  18. Thanks for the tip. If I wanted to make a global hotkey for opening a new chrome window, then opening a URL (https://inbox.google.com for example), what's the best/fastest/easiest way to do that? Right now I use a "Hotkey -> Open URL" workflow, but it'd be nice to have it open the URL in a new Chrome browser window as well.
  19. Oh wait.. forget it. It always focuses back on Chrome no matter if Keep is hidden or minimized. I don't see an easy solution then. Damn window management of Chrome Apps is a nightmare :/
  20. deanishe I have a favor to ask. I think you know enough Apple Script to be able to help me out one more time, and I would be very grateful! The problem: Chrome apps such as Google Keep mapped to a global hotkey with Alfred opens just fine, but "Toggle visibility for apps" does not work. I.e. it's not possible to hide the app by pressing the hotkey again. What's worse is that pressing Cmd+H to hide the window again hides it, but then also switches focus to Google Chrome, which is a very big annoyance. However Chrome is not put into focus if minimizing Google Keep (Cmd+M) instead of hiding it (Cmd+H). My proposed solution: An Applescript that does the following when hotkey is pressed: if (app is in focus): then minimize app else: focus on app Can you do this? Anyone else is also more than welcome to pitch in of course. As a bonus you'd also be solving a general problem of Chrome apps on Mac. Thanks!
  21. Thanks! it's working just as I wanted to perfectly as far as I can tell! At least the dummy way I completely got what you're saying about bad form, I was just thinking there would be the risk of either a very small delay or perhaps a terminal window poping up briefly if I didn't invoke everything from Alfred using NSAppleScript. But perhaps that is not the case? EDIT: And yeah I find Apple Script a mix of really nice, almost Pythonic, notation that's almost as intuitive as python list comprehension, but then when I need to write something up myself I'm completely lost It'd be nice to be good at though.
  22. deanishe, thanks for all the work you put into it! I'm going to use the script together with a hotkey trigger - not a keyword input (perhaps I should've been more clear about that. How do I use the script with a hotkey and just hardcoding q as e.g. 1? I tried putting q = 1 at the top of the script and running it, but that didn't do it. So how? Sorry I'm not so familiar with AppleScript
  23. Hi everyone, I would like to make a script that does the following: IF current tab of Safari is not tab 1, bring Safari to forefront and switch to tab 1. IF (Safari is currently in focus) AND (tab 1 is the current tab) THEN hide window Also to start Safari if it is not running at all. I would then also make a similar script for tab 2 and tab 3. The idea is that I can make a webapp "feel" almost as a desktop app by opening op when I press hotkey, hiding when I press hotkey again (Like Alfred's "Toggle visibility for app"), BUT if I already have Safari in focus but I just want to switch from tab A to tab B, not hide Safari. What I got so far form various googling: on alfred_script(q) set appName to "Safari" set startIt to false tell application "System Events" tell window 1 of application "Safari" to set current tab to tab 1 if not (exists process appName) then set startIt to true else if frontmost of process appName then set visible of process appName to false else set frontmost of process appName to true end if end tell if startIt then tell application appName to activate end if end alfred_script It works. All I'm missing is to change this line: else if frontmost of process appName then Into something like this: else if frontmost of process appName AND if current tab is 1 then How do I do this? So close now!
×
×
  • Create New...