Javascript to insert text from clipboard

Your idea sounds interesting. Maybe you want to share your button when it's finished?

I have a button where a new .url file is created and the contents of the clipboards are pasted. Maybe you'll find some code you need in there.

else {
            // Create a FileSystemObject
            var objFSO = new ActiveXObject('Scripting.FileSystemObject');

            // Create a new text file with the filename
            var objFile = objFSO.CreateTextFile(PathName, true);

            // Write the contents of the URL shortcut to the file
            objFile.Write('[InternetShortcut]\r\n');
            objFile.Write('URL=' + ClipboardData + '\r\n');

            // Close the file
            objFile.Close();
        }
2 Likes