widget to open a specific link in chrome
I want to create a simple widget button in my phone that will open a link in chrome on the computer.
Also if chrome is not running then run chrome.
And also have another button to open a different link on the same tab so i can easily switch between the two tabs.
where can I find the list of chrome actions? what is the best method to do this? URI? run program?
Are the links you refer to always the same, or are you wanting to paste a link in from your clipboard?
Here is an adjustment to the current Chrome remote that includes a text field in which to paste a URL, and a button that will open that URL in a new Chrome tab (starting Chrome if not already running).
Pasting and sending another URL in the remote will open in a new tab, then you can use the Chrome remote's previous/next tab buttons to navigate between the two links. Is this what you were after?
Ahhhh. Skipped right over the widget part :/
So a widget button obviously won't have the functionality to paste anything in. But yes you could have a widget that was based on a remote button, that sent a link:
Here is the remote.
You can just change the URL in the remote.lua:
local keyboard = require("keyboard"); local script = require("script"); local utf8 = require("utf8"); local device = require("device"); local _text = ""; [email protected] Set current text [email protected] text actions.change = function(text) _text = text; end [email protected] Open typed URL actions.open_typed_url = function() local code = utf8.replace(_text, "\"", "\\\""); device.toast("Sent URL to PC"); os.script("echo|set/p="..code.."| clip"); os.open("C:\\ProgramData\\Unified Remote\\Remotes\\Custom\\Open URL\\Paste Clipboard.vbs"); end [email protected] Go to UR Remotes URL actions.remotes = function() os.open("https://www.unifiedremote.com/remotes/all"); end [email protected] Go to UR Tutorials URL actions.tutorials = function() os.open("https://www.unifiedremote.com/tutorials"); end [email protected] Go to UR Forum URL actions.forum = function() os.open("http://community.unifiedremote.com/"); end
Each link will open in a new tab, starting Chrome if not already open.
If you also wanted to then automatically open your Chrome remote on your device, you could add:
device.switchfunction doesn't work from widget, ie. it wont open UR Chrome remote from widget, will only switch to remote from another remote's button. Should be able to do it with Macrodroid integration, will look into it.