Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

626 profile views

Cliff's Achievements

Helping Hand

Helping Hand (3/5)



  1. @deanishe thank you! It worked However, when I change it from "with input as argv" to "with input as {query}" (and changed your code to either $gross = {query}; or $gross = "{query}"; then it wouldn't work. Where is documentation for this? I didn't find these specifications at https://www.alfredapp.com/help/workflows/ For example, what else is available within the $argv array?
  2. @giovanni tyvm but is there any way to stick with PHP so I can be comfortable editing further and to learn for other snippets? In PHP, I tried both `return` and `echo` of JSON and it didn't work like your script did I want the result to pass through to the clipboard action so I can auto-paste
  3. I just want to enter "pfee 100" to get "3.2" entered into my clipboard (100 x 2.9% + 0.30) agh! Here's my 4min demo video of how/why it's not working if you could PLEASE help: https://share.getcloudapp.com/NQuwnnr2 And the start of my workflow is here: https://share.getcloudapp.com/llu5eeEE tyvm!
  4. Published to https://github.com/cliffordp/alfred-app-workflows#development if it helps anyone else in the future Again, thanks to you people for helping!
  5. 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!
  6. 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
  7. 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!
  8. I've read this before. I really only do WordPress, and I like it that way... although someday I may not. I dunno. But thanks again!
  9. @deanishe, that solved it for me! I had never used system() before. I updated the gist with the working code and provided a downloadable Alfred Workflow there. I feel empowered! (Although I'm impressed with Ruby's brevity!) Thanks to both of you!!!
  10. 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.
  11. 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!
  • Create New...