Adrian Posted April 4, 2013 Share Posted April 4, 2013 (edited) Hopefully this is my last thread for a while, sorry about all the questions lately I've made a workflow that searches a site and everything works as expected now, except when the argument begins with a numeric character followed by an alphabetic character. In that case my workflow is replaced by the default "Search Google for...". Anyone know why that happens? Alphabetic character works: Numeric characters works: Numeric character followed by alphabetic triggers default Search Google for... Edited April 4, 2013 by Adrian Link to comment
jdfwarrior Posted April 5, 2013 Share Posted April 5, 2013 Hopefully this is my last thread for a while, sorry about all the questions lately I've made a workflow that searches a site and everything works as expected now, except when the argument begins with a numeric character followed by an alphabetic character. In that case my workflow is replaced by the default "Search Google for...". Anyone know why that happens? Alphabetic character works: Numeric characters works: Numeric character followed by alphabetic triggers default Search Google for... This typically happens when Alfred doesn't get results or there is an error in the results XML or code. In your script, if you ran that code from the terminal and get ANYTHING extra as output other than proper XML Alfred won't show the results and falls back to Google. I would take your code and try running it from the command line and see if there is anything wrong with the output or the XML Link to comment
Adrian Posted April 5, 2013 Author Share Posted April 5, 2013 This typically happens when Alfred doesn't get results or there is an error in the results XML or code. In your script, if you ran that code from the terminal and get ANYTHING extra as output other than proper XML Alfred won't show the results and falls back to Google. I would take your code and try running it from the command line and see if there is anything wrong with the output or the XML That's the odd thing, when I run my PHP script from the command line I get the same kind of well-formed XML back either with "1password" och "password", as far as I can see. Link to comment
jdfwarrior Posted April 5, 2013 Share Posted April 5, 2013 That's the odd thing, when I run my PHP script from the command line I get the same kind of well-formed XML back either with "1password" och "password", as far as I can see. But is there ANYTHING else shown other than just the XML? Alfred reads all output from the script. So any kind of error or warning from your code would mess it up. You tried it from the command line sending both inputs to test and verified the output? Link to comment
Adrian Posted April 10, 2013 Author Share Posted April 10, 2013 (edited) But is there ANYTHING else shown other than just the XML? Alfred reads all output from the script. So any kind of error or warning from your code would mess it up. You tried it from the command line sending both inputs to test and verified the output? As far as I can see there isn't anything wrong with the output. (There is something odd with the encoding of swedish characters, running a query with "åäö" through bin2hex() generates different strings in Alfred result and from the command line. I've yet to figure out why that is. But I don't think it's related to this digit-alphabetic problem.) Edit: I found out that Alfred was providing UTF-8-MAC, så that's why my Swedish characters where messed up, but as I suspected, it has nothing to do with the problem described here. Edited April 10, 2013 by Adrian Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now