Last one for tonight.
Last one for tonight.
Would any of our Javascript Gurus be kind enough to provide a script, which could be assigned as an item’s action (for example, on swipe up), which will open http://www.google.com?
I’d like to use it as a template, and modify the URL, as needed, to create several shortcuts.
]]>
< ![CDATA[
var i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(“https://www.google.co.uk“);
try{
LL.startActivity(i);
}catch(anfe){
Android.makeNewToast(“Activity not found Exception”, true).show();
}
]]>
< ![CDATA[
Jay M
THANK YOU VERY MUCH!
It was throwing an error, at first (line 2 needed an additional ‘)’), but now it’s like butter.
As simple as this must have been for you, given such a quick response, I didn’t know where to start.
Even looking “under the hood,” I don’t understand it, but I can copy it, rename it, swap URLs, and select it as an action.
Problem solved, without an additional app!
Again: Thank you.
]]>
< ![CDATA[
i just pulled it out my web shortcut script and hardcoded the url i must of messed something up before posting it because it worked when i tested it. Glad glad ya got it sussed anyways
]]>
< ![CDATA[
Jay M I thought about trying to extract it out of that script…until I opened it in the editor. 🤔😨🤷 LOL
]]>
< ![CDATA[
Theres loads of Intents you can use with this script btw. Checkout Intents in the Android developer docs you should be able to edit this script quite easily to do other stuff like open the battery usage screen or something.
]]>
< ![CDATA[
Michael P. Jackson you could even use LL variables instead of setting the url so you’ll have only 1 script which you call with the variable as parameter.
]]>
< ![CDATA[
Bruno-Isa LAMOUR-ARNOULD, I have no idea what you are talking about, but it sounds practical…so I guess I need to do some reading.
]]>
< ![CDATA[
Michael P. Jackson when you call a script you can send parameters
]]>
< ![CDATA[
+Bruno-Isa LAMOUR-ARNOULD how do send a variable as a parameter?
]]>
< ![CDATA[
How to call a script with parameter
https://lh3.googleusercontent.com/WYQ75MPkC8zjHFysoZnmZlDqEN-4tfZMBj5KcnRwTyaJb3Tsd4EmbXnPrC_GliouzGx5A3PGAnY
]]>
< ![CDATA[
Param=LL.getEvent().getData();
]]>
< ![CDATA[
To set on your first line of your script
]]>
< ![CDATA[
Bruno-Isa LAMOUR-ARNOULD I know how to use parameters, just not how to call them in the script. What I want to do is modify the script in the first comment (from Jay M) so that I can run this script & just put in the URL I want to open as a parameter instead of it being “hardwired” into the script & having to edit the script itself each time I want to open a URL.
]]>
< ![CDATA[
try the original script plus.google.com – Web Shortcuts for all devices without installing other apps Script is in …
]]>
< ![CDATA[
bahrta sai
https://lh3.googleusercontent.com/Q9r2025YumIkIxpVvuw0PXnyuvOi7mpi5H1z_jULdI4SOkzKR_6f_xZgX_tBnhqyMFzu9HpwQOE
]]>
< ![CDATA[
https://lh3.googleusercontent.com/lccayE5U8tuWFFcmzqlo8WLVRFpr0npWDyFlYHMkZRKwwudZmuTwCJl1DvOotBf2CdLKCW5m3DY
]]>
< ![CDATA[
There was a parenthese ) missing on line 3 from JayM copy so it gave me some trouble lol
]]>
< ![CDATA[
Bruno-Isa LAMOUR-ARNOULD that’s what I was looking for. Thank you.
]]>