Jump to content

Cliff

Member
  • Posts

    27
  • Joined

  • Last visited

Posts posted by Cliff

  1. I prefer another clipboard history manager and set its hotkey to Cmd+Opt+C, which is either what the default from Alfred is or is what I previously had assigned in Alfred.

    Every so often upon a fresh computer startup, Alfred's Snippets (part of Clipboard History if I'm not mistaken) appear instead of my other clipboard app.

    It works to go to Alfred Preferences > Clipboard History > Viewer Hotkey > set it to anything else

    However, even after doing so and doing subsequent rebooting of the computer, Cmd+Opt+C still pops up Alfred. Going to Alfred's preferences, I see my Viewer Hotkey looks to still be set to something different, but if I re-record the Viewer Hotkey, then the issue is again resolved.

  2. I had a different filter in the middle and I guess deleting it made it connect further down the road - or, more likely, I didn't initially connect it properly anyway. ugh - not on my game with this one

     

    My regex and vitor's regex both worked, but I did appreciate your explanation of the rule - it does sound better - although the plus is better than asterisk, as demonstrated here (not matching double slash): https://regex101.com/r/wvT3FC/1

     

    I didn't add the $1 as a replacement because I do want it removed

     

    Thanks for the help and the tips. Really appreciate it!

  3. OMG, the simplest things... tyvm!

     

    Here's some regex testing that matches what I want: https://regex101.com/r/UeGzX3/1

    However, it requires escaping forward slashes yet http://userguide.icu-project.org/strings/regexp seems to not require doing so (so I didn't in my workflow)

     

    Workflow that actually works now except for the regex matching - and interestingly not showing up in debugger: https://cl.ly/5acd6e68fdb1

  4. I want to copy something like

    wp-content/plugins/event-tickets/tests/restv1/TicketNotAccessibleCest.php

    and convert it to

    codecept run tests/restv1/TicketNotAccessibleCest.php

    and paste it

     

    the "event-tickets" part is variable, which is why I used regex to match \w

     

    When I run with debugging on, it's like the Clipboard (what I think should be {query}) is blank. Screenshot: https://cl.ly/120d35b1fd91

     

    Is that a bug or an error in my workflow?

     

    Workflow is here: https://cl.ly/005392a2a9cd

     

    Thanks for helping!

  5. Well I tried this in Alfred's PHP scripting and it didn't do anything:

    https://gist.github.com/cliffordp/a0ce681f51504649cd75cc9c22a53b2a (the opening PHP tag is there only to enable syntax highlighting; it's not actually added in my script)

     

    I'd guess that the syntax for PHP is the same as your Ruby because of PHP's system(). I also tried exec() and passthru() but none of these 3 worked. :(

     

    If someone could please advise how-to in PHP, I'd surely appreciate it just for learning's sake.

     

    However, @vitor, you've been a great help. Thank you so much for that.

  6. Thank you very much. It worked!

     

    However, I see there's no longer any regex logic to remove non-numeric characters.

    For example:

    "12345,281928" works fine

    "12345, 281928" does not work (does not build a valid URL) because of the leading space in the 2nd item ("281928", not " 281928")

    "12c345,281928" typo with "c" character in first item (should result in numbers only: "12345")

     

    Would you be able to include that in there for me please or explain what I should add?

     

    Also, does Alfred's PHP not have functionality to open the browser like your Ruby script does?

     

    Thanks!

  7. I have a workflow (download it here: https://cl.ly/3C0n0e1n3W2N) that works and allows me to select some text like "12345" and use a hotkey to launch a URL of

    https://example.com/issues/{query} -> https://example.com/issues/12345

    However, I want to enhance it to be able to support selecting text like "12345,281928", do the hotkey, then open two browser tabs:

    {query} ->
    A = 12345
    B = 281928
    
    1: open https://example.com/issues/12345
    2: also open https://example.com/issues/281928
    
    last one?
    then we're all done.

    I know PHP well so I could do explode( ',' {query} ), but I'm not sure how to use {query} (is it usable in a PHP script?) and I'm not sure how to tell it to loop through all the items in the array.

    If Alfred can't use PHP to do this, that's fine, but I'm not well versed in bash, AppleScript, and the rest.

     

    Thanks for any help! :)

×
×
  • Create New...