Variable - Web Interaction

Jundoku

New member
Hello, I was wondering if there's a way to assign a variable to an UI interaction(such as copying something) and then using the copied value.

I want to setup a variable -> open chrome, copy a URL -> assign to variable -> use the variable in the web requests action
 

Jundoku

New member
Nevermind - after copying the text and using the [clipboard] variable for get requests it will just return with: java.lang.IllegalArgumentException: Invalid URL host: ""

One case could be that the URL format was indeed invalid which is just not true, the other case would be that instead of getting the URL it's probably getting something else from the [clipboard], what's happening?
 

nginx27

New member
Nevermind - after copying the text and using the [clipboard] variable for get requests it will just return with: java.lang.IllegalArgumentException: Invalid URL host: ""

One case could be that the URL format was indeed invalid which is just not true, the other case would be that instead of getting the URL it's probably getting something else from the [clipboard], what's happening?
I think clipboard function is killed by google 🥲 so it's only working on older versions of Android
 

Jacob L

Moderator (Lawsonator)
The solution would be to open the MacroDroid drawer before getting clipboard content. You can of course close the draw after fetching the content
 

MacroDroidDev

Administrator
Staff member
Yes the clipboard cannot work in the background on Android 10. I do hope to somehow have a more seamless way to access it without workarounds like opening drawers, but time is currently limited....
 

Pseudocyclic

Well-known member
If you do it something like this the drawer won't actually appear, it can be closed before Android is able to display it:

A: open drawer
A: access clipboard
A: Wait 5ms
A: close drawer
 
Top