Jump to content

LiquidIce

Member
  • Posts

    4
  • Joined

  • Last visited

Posts 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. 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: 

    alfred.png

     

    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...