Advertisement
Guest User

Print_IE

a guest
Mar 1st, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.69 KB | None | 0 0
  1. #Region    ;************ Includes ************
  2. #Include <IE.au3>
  3. #EndRegion ;************ Includes ************
  4.  
  5. $sFileToPrint = @ScriptDir & "\print.html"
  6.  
  7. ; Delete registry keys
  8. RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup", "footer")
  9. RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup", "header")
  10.  
  11. ;
  12. $oIE = _IECreate($sFileToPrint)
  13. _IEAction($oIE, "print")
  14. _IEQuit($oIE)
  15.  
  16. ; Restore old registry keys
  17. RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup", "footer", "REG_SZ", "&u&b&d")
  18. RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup", "header", "REG_SZ", "&w&bSeite &p von &P")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement