HOLA!!!
ATENCION: Requiere Firefox / Chrome y ser ejecutado con permisos de admin.
'FUNCIONA SOLO SI LA PC POSEE FIREFOX/CHROME(CON CHROME CAMBIANDO LA LINEA DONDE DICE "FIREFOX.EXE" POR "CHROME.EXE")
Call ScreenShot("c:\web.html","c:\a.html")
Function ScreenShot(WebUrl, Output)
With CreateObject("Word.Basic")
.SendKeys "{1068}"
End With
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile(WebUrl, True)
objFile.Write "<script>function handlepaste () {myimage = ImageGrab.grabclipboard();}</script><body onload='handlepaste()'></body><div id='div' contenteditable='true' onpaste='handlepaste()'>Paste</div>" & vbCrLf
objFile.Close
On Error Resume Next
CreateObject("Scripting.FileSystemObject").DeleteFile "c:\a.html"
On Error GoTo 0
Set wshshell = wscript.CreateObject("WScript.Shell")
'antes de aca se podria poner una instruccion para que cerrara el proceso del Firefox
wshshell.run "firefox.exe -Height 1 -Width 1 " & WebUrl 'Abre firefox en tama�o 1x1
wscript.sleep 5000
wshshell.SendKeys ("{TAB}") 'entra a la web
wscript.sleep 500
wshshell.SendKeys ("+{INSERT}") 'pega el screenshot
wscript.sleep 1000
wshshell.SendKeys ("^s") 'guarda la pagina
wscript.sleep 500
wshshell.SendKeys (Output) 'pone el path
wscript.sleep 1000
wshshell.SendKeys ("{ENTER}") 'confirma el guardado
'aca se podria matar a la ventana del firefox abierta para no dejar rastos.
End Function
GRACIAS POR LEER!!!
alguna solución?
https://i.imgur.com/LBdiiHA.png
HOLA!!!
@NyxKazuya (https://underc0de.org/foro/index.php?action=profile;u=3516) debes ejecutar esto como administrador.
GRACIAS POR LEER!!!