Jump to content

Adrian

Member
  • Posts

    17
  • Joined

  • Last visited

Adrian's Achievements

Helping Hand

Helping Hand (3/5)

1

Reputation

  1. I had to change the strings to match my language (Swedish) but otherwise it worked fine under macOS Sierra, thank you!
  2. Since search brought me to this old thread I thought I'd share my solution for this very problem. The solution was to suppress PHP notice error messages. In the workflow main PHP file I just added this at the top: error_reporting(E_ALL & ~E_NOTICE); (Credit to neohunter who solved it at Github.)
  3. The local network discovery works, I can see all my available computers but when I launch Screen Sharing it can't connect (from my Mac with 10.10.2 to another Mac with 10.10.2) When I look into it I don't think there's anything wrong with the workflow because Screen Sharing can't connect to recently used connection either. I can connect by launching Screen Sharing from Finders share screen button. But I can't reuse that same connection again. (Btw, the file ending in Screen Sharing recent meny is ".vncloc", I think it used to be ".local" but I don't know if that has anything to do with this.)
  4. Anyone else having trouble with this after the latest OS X update?
  5. Actually I think that is not utopic at all. Central repositories works very well for a lot of other projects, but that does not mean that every one *has* to use them. If you write a plugin for WordPress you could post it anywhere you like, but there also is a central repository on wordpress.org where you get the benefit of easy installation, automatic updates, comments and reviews etc, and it is a single official site that all users looking for plugin can use and it is integrated in WordPress. It works really well.
  6. I don't know when it happened, but systemsetup -gettimezone stopped working, it now returns "You need administrator access to run this tool... exiting!"
  7. By the way, strlen() of "på" returns 4 in Alfred result and not 2, so it's not a good way to count characters. mb_strlen() also returns 4 unless I set mb_internal_encoding("UTF-8") first, then mb_strlen() returns 3. Unless I run my script from the command line, then I actually get 2 as I should. There's something odd with the encoding inside Alfred or my script. Or both. Or I don't know... Edit: Oh, there was a online fix for that: $query = iconv("UTF-8-MAC", "UTF-8", $query);
  8. 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.
  9. 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.
  10. 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...
  11. I actually have a Netatmo Weather Station for review right now. I'm not promising any workflows, but I'll look into it at least.
  12. I actually did a "if (strlen($query) < 2)" but 3 works better, didn't think it would matter that much. The other thing I found was that it was somewhat "by design" because for some search terms Alfred is just to quick For example, the terms "int" and "intel" produce results but "inte" does not. Because Alfred is quick to fire of the search for "inte" when I'm typing "intel" then Alfred first displays "no result" for a brief moment (because of "inte") and then shows the result from "intel". Is there a way to tell Alfred not to be so trigger happy and just slow down a bit? I tried with sleep() but that just stalls the entire script (as it should).
  13. I've created a workflow to get search results from an url (JSON-RPC) and display it in Alfred. Everything works, but I can't find a way to prevent Alfred from briefly showing the "no result" first and then the actual results. Below is a very simplified version of my code. if (($json = @file_get_contents($my_url, false, $context)) !== false) { $obj = json_decode($json); // check if there is any results if ($obj->result) { // do some stuff // prepare the result to return to Alfred $wf->result( $uid, $goto_url, $title, $subtitle, 'icon.png' ); // echo the result as xml for Alfred echo $wf->toxml(); } else { // set the "no result" to return to Alfred $wf->result( 'mysearch', 'na', 'No result', 'No result was found matching the search term.', 'icon.png', 'no' ); // echo the result as xml for Alfred echo $wf->toxml(); } } I've tried a lot of things, like moving the echo and counting the length of the query to prevent it from search for the first two characters, but nothing has solved the flashing. I want to be able to tell the user if there is no result, but I don't want to show it if there is results. Anyone else had a similar problem? Or am I approaching this problem in the wrong way? I've seen workflows without these problems, but I haven't understood why it is happening to my workflow. (I also didn't find an answer in this forum when I browsed it.)
  14. Same for me, I was stuck for a while until I understood that the E_NOTICE/time zone caused my problems with Alfred, had to share that too
×
×
  • Create New...