Jump to content

What triggers default "Search Google for..."?


Recommended Posts

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:

alfred-arguments-1.png

Numeric characters works: 

alfred-arguments-3.pngNumeric character followed by alphabetic triggers default Search Google for...

alfred-arguments-2.png

Edited by Adrian
Link to comment

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:

alfred-arguments-1.png

Numeric characters works: 

alfred-arguments-3.pngNumeric character followed by alphabetic triggers default Search Google for...

alfred-arguments-2.png

 

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

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

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

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 by Adrian
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...