Jump to content

Search the Community

Showing results for tags 'webbrowsing'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Categories

  • New Features
  • Other

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Website URL


Jabber


Location


Interests

Found 1 result

  1. Hi guys, I recently bought Alfred and trying to make a workflow of my taste, but I'm having a real hard time. I'm new to programming in general, but I'm trying my best so any help would be appreciated! Here's my Goal: I want to create a workflow that is triggered by a key word, with optional arguments, so that when there are no argument, a specific (not the default) browser to open a specific (not the homepage) URL, in a new window regardless the web browser app is running or not. When provided with an argument, I want to search for the argument. So for example, if I type "yy" , then Chrome opens Youtube in a new window, and if I type "yy alfred" then Chrome does a search on alfred on Youtube. The first issue I ran into was that when apps are not running in the background and are activated, if I activate the app and give it an URL, I get 2 new windows. I looked it up and I did fix it (I think). The real problem is that I cannot find how to retrieve? import? the argument as {query} and search for the argument. I've tried what the default web search does on alfred, but no luck at all. Here's my script on alfred_script(q) if q is equal to "" then if application "Google Chrome" is running then run script "tell application \"Google Chrome\" activate open location \"https://www.youtube.com\" end tell" else set theApp to quoted form of "Google Chrome" do shell script "open -n -a " &theApp & " 'https://www.youtube.com'" end if else set query to q if application "Google Chrome" is running then run script "tell application \"Google Chrome\" activate open location \"https://www.youtube.com/search?q={query}\" end tell" else set theApp to quoted form of "Google Chrome" do shell script "open -n -a " &theApp & " 'https://youtube.com/search?q={query}'" end if end if end alfred_script I'd love some hints on how I can make my workflow work! Thanks
×
×
  • Create New...