lionfaggot Posted July 26, 2019 Posted July 26, 2019 (edited) // ==UserScript== // @name New Userscript // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match https://example.com/example // @grant GM.setClipboard // ==/UserScript== (function() { var waitForEl = setInterval(function() { if (typeof document.querySelector('.example') != 'undefined') { document.querySelector('.example').focus(); GM.setClipboard('fillMe:test text'); clearInterval(waitForEl); } }, 100); // wait for element to exist })(); the above snippet will wait every millisecond for a form with the classname example to exist. once it does it focuses on the form then sets the clipboard to fillMe:test text While 1 If StringInStr(ClipGet(), 'fillMe:') Then $cliprep = StringReplace(ClipGet(), 'fillMe:', '') ClipPut($cliprep) Send('^v') ClipPut('') EndIf Sleep(100) WEnd and then you have autoit infinitely check clip for wildcard fillMe: which then will send the specified text to the currently focused form. most forms on most websites will not work if you simply use .value because of the istrusted event. the only way to activate most forms on most websites these days is with actual end user hardware input, or by figuring out functions attached to these forms which is not usually worth doing. anyone whos needed an easy fix for this issue should thank me. run windows in a virtualbox and you can even have this run silently in the background without needing to keep the browser window active Edited July 26, 2019 by lionfaggot
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now