ueli icon indicating copy to clipboard operation
ueli copied to clipboard

Shortcuts: Additional Arguments for selfmade Script in Shortcuts

Open JMountainMan opened this issue 5 years ago • 8 comments

First of all: Thank you! I love ueli, it makes my life so much easier.

I use a lot of self made scripts (mostly python). I open the Scripts using Shortcuts type: Comandline. It would be awesome to be able to call the script and giving it addtional Arguments.

example: This script takes two arguments

C:\users\me\.\pythonscript.pyw --ID:1002 --Name:Jon

Defining it in ueli:

C:\users\me\.\pythonscript.pyw --ID:{{arg[0]}} --Name:{{arg[1]}}

And then calling the Shortcut in ueli with:

myshortcut 1002 Jon

Again, Love your work. Thanks.

JMountainMan avatar Feb 14 '20 09:02 JMountainMan

Indeed this is a fantastic work.

I think I have the same request, not for script, but for application. Thus I leave a comment here rather than open a new issue.

Here is the detail:

ueli has the everything plugin to pass the query to es.exe and the web search plugin to search in browser. Thus, I think it work the same if run some other apps.

So I try to locate goldendict.exe on the setting page of everything, and use es?[word] on ueli. It turn out to work fine.

input: es?test

it work the same as directly execute:

C:\...\GoldenDict.exe test

Many applications accept arguments even though they don't provide command-line interface, so I think this feature will be great.

Thanks again😊

herbhuang avatar Mar 23 '20 07:03 herbhuang

I would love this. It seems like something like this used to be possible with customCommands (#50).

jondcoleman avatar Jun 17 '20 21:06 jondcoleman

This would be really great. I used wo have a shortcut for "jira xxx-3123" which opened my local jira instance with the argument[0] as ticket. Maybe just allow a regex to be used as the "command"? So in my case it would be: Type: Url Name: jira Url: https://my.jira/jira/browse/{0} NEW Field: Parameter Regex: (.*) So this would then parse the whole argument string with the given regex and replace the placeholders in the url/command with the according capture groups before executing. This way you could even use multiple parameters.

Roemer avatar Sep 22 '20 06:09 Roemer

I just found out for my scenario, I can use the "Web search" plugin.

Roemer avatar Sep 22 '20 08:09 Roemer

Great idea and very useful feature, especially in terms of using argument with applications as hwongbaul mentioned above

painkrd avatar Nov 11 '20 08:11 painkrd

I'm also interested in this feature! Thank you for your awesome work!

1two3code avatar Dec 03 '20 14:12 1two3code

i would also need that. it is actually the only thing we i haven't migrated from Keypirinha to euli. i have several scripts that i run with different arguments. this would be a gamechanger for me

ascii-ts avatar Mar 30 '22 08:03 ascii-ts

Also wanting this feature so I can pass arguments to programs/scripts.

HeyItsJono avatar Apr 09 '22 06:04 HeyItsJono