With the above code written and debugged, I just needed to setup a simple action that would ship off the the magic %CLIP variable that contains the clipboard contents to pastebin. The result is a generic Pastebin, Create action that can be used in a number of contexts. The above action is intended to be called by Perform Action with two parameters: the content to paste and an expiration date. You'll need to fill in your own version of API_KEY and USER_KEY to make this work. Content Type:application/x-To Var:%responseĪ few notes on the code above. Here's the Tasker Action I worked up that creates a new pastebin entry:Ī1: Variable Set Ī2: Variable Set Ī3: Variable Set Ī4: Variable Set ![]() As a bonus, pastebin's API is drop dead simple and I was hoping it would play nice with Tasker.įortunately, my hunch was correct: Tasker's HTTP Post action is a near perfect fit for the pastebin API. Additionally, pastebin's archival nature means that accessing older clipboard entries is breeze. By having the clipboard in pastebin, I know I can easily access it from anywhere. Solutions like AirDroid are really slick, but are relatively cumbersome to setup. Here's my first pass at a more automated solution.Īfter a bit of poking around, I decided that I'd shoot for the following: have my Android phone push the system clipboard to, and then use a browser on my desktop to access pastebin. Sure, I had work-arounds like pasting the clipboard into a Google Doc and accessing said Google Doc on a desktop machine, but that's clunky to the say the least. ![]() ![]() The other day I realized I had no seamless way of accessing my phone's clipboard while on my desktop computer.
0 Comments
Leave a Reply. |