1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | $ie = New-Object -com "InternetExplorer.Application" $ie.Navigate("about:blank") $ie.visible = $true $htmlnew=('<script> function muestraInformacion(elEvento) { var evento = elEvento || window.event; var coordenadaX = evento.clientX; var coordenadaY = evento.clientY; document.write("<li>Has pulsadoen la posición: " + coordenadaX + ", " + coordenadaY + "</li>"); } document.onclick = muestraInformacion; </script>') $ie.Document.write($htmlnew) $ie.Document.getElementsByTagName("li") | Select-Object -ExpandProperty innerText |
Obtener información sobre los eventos del ratón creando un objeto InternetExplorer.Application en PowerShell (mostrando la información en la página con document.write y leyéndola desde PowerShell) (PowerShell, JavaScript)
Except where otherwise noted, Jesusninoc by Jesús N. is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.