Jump to content

LiquidIce

Member
  • Posts

    4
  • Joined

  • Last visited

Everything posted by LiquidIce

  1. Hello Shawn, I have passed the values in "", here is what the code is like: $keyword = strtolower ("{query}"); $urls = [ 'developers' => '1', 'analytics viewer' => '2' ]; if ( array_key_exists( $keyword, $urls ) ) { exec( "open urlhere?id={$urls[$keyword]}" ); } There is more code below it and I have changed the URL because its private, but that part works. Things with 1 entire word works fine, but if I put analytics viewer in alfred it does nothing. Regards,
  2. Thanks for the help Shawn, I figured out another way to do this but as it turns out, if the name has a space, alfred doesn't know how to get the value of that text... Regards,
  3. Thanks for that guys! A quick question though, is it possible to save the array into a file and read it? I have PHP knowledge but I don't know what limitations alfred may have when it comes to syntax, php functions, etc... Kind regards
  4. Hello everyone, I am trying to create a new alfred workflow that what it basically does is: Alfred has an array stored with NAME and VALUE, I then type in a keyword + NAME, i want it to open an URL with the VALUE of that NAME. For example: Lets example a wikipedia search: I type in openup linux and what this should do is: Check array --> NAME = linux? Check the value of linux, VALUE = Linux --> Open URL "http://en.wikipedia.org/wiki/Linux" It may seem hard to explain but its quite simple in mind hehe, Anyone have any ideas? Kind regards,
×
×
  • Create New...