Waboodoo / HTTP-Shortcuts

Android app to create home screen shortcuts that trigger arbitrary HTTP requests
https://http-shortcuts.rmy.ch
MIT License
1.17k stars 113 forks source link

Number input prompt from Scripting #368

Closed watatatata810 closed 1 year ago

watatatata810 commented 1 year ago

Hello!

I would like to set a variable in a script to accept only numeric input, but I don't know how to do this. I can do this by using "Number Input" when inserting the variable into the URL, but I don't know how to do it from a script. If there is a way to do this, please let me know. If not, I would appreciate it if you could add it in an update.

One more thing, I have a script that displays toast, but I wonder if it is possible to change the location of the toast. In my script, the toast and the keyboard sometimes overlap, which is a little inconvenient. Screenshot_20230702-102030_HTTP Shortcuts

thanks

Waboodoo commented 1 year ago

Thanks for the feature request. In the future, please avoid grouping multiple requests together into one issue, and instead create separate ones. It makes it much easier to keep track of them and to discuss them.

Regarding the number input: This is currently not possible via Scripting, but I will add it in the next version.

Regarding the toast: This is unfortunately not possible to change. The toast is a system component outside the control of the app. Its appearance and placement is given by the Android OS.

Waboodoo commented 1 year ago

As of version 3.2.0, there is now a promptNumber function. More information here: https://http-shortcuts.rmy.ch/scripting#prompt-number