Skip to content

Feature Request: Support URLs with multiple parameters #31

@tomgeraghty3

Description

@tomgeraghty3

I used to use a program called "Launchy" way back when which allowed you to do very similar to what this plugin is doing here i.e. type text that is then translated into URL query parameters and launch the browser. It's great to see this on a modern app like PowerToys so thanks for this.

Something that I did have previously, which looks to be missing is the ability to support multiple query parameters.
To give you an example, I used to do this in Launchy:
rail WBQ GLC 121224 10 00 which translates to "Lookup trains from Warrington Bank Quay to Glasgow Central on 12/12/24 at 10am"
This would then resolve to the following and open it in the browser:
https://www.nationalrail.co.uk/journey-planner/?type=single&origin=WBQ&destination=GLC&leavingType=departing&leavingDate=121224&leavingHour=10&leavingMin=00&adults=1

I was hoping this plugin would be able to support the above too. In the config file your URL could be something like
"Url": "https://www.nationalrail.co.uk/journey-planner/?type=single&origin=%s&destination=%s&leavingType=departing&leavingDate=%s&leavingHour=%s&leavingMin=%s&adults=1"

but if I do that and supply multiple arguments it replaces all of the %s with it
e.g. https://www.nationalrail.co.uk/journey-planner/?type=single&origin=WBQ+GLC+121224+10+00&destination=WBQ+GLC+121224+10+00&leavingType=departing&leavingDate=WBQ+GLC+121224+10+00&leavingHour=WBQ+GLC+121224+10+00&leavingMin=WBQ+GLC+121224+10+00&adults=1

Is this something that could be looked at if it's not too big a change?
I'm not too verse in .NET / C# so would struggle but if you point me in the right direction, might be able to work it out

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions