GLobal Const $_INTERNET_OPTION_SETTINGS_CHANGED = 39 GLobal Const $_INTERNET_OPTION_REFRESH = 37 HotkeySet('1', 'NoImages') HotkeySet('2', 'Images') HotkeySet('0', 'Internet_Update_RegistryChange') HotkeySet('{ESC}', '_Pro_Exit') While 1 Sleep(100) Wend Func _Pro_Exit() Exit EndFunc Func NoImages() RegWrite('HKCU\Software\Microsoft\Internet Explorer\Main', 'Display Inline Images', 'REG_SZ', 'no') RegWrite('HKCU\Software\Microsoft\Internet Explorer\Main', 'Play_Animations', 'REG_SZ', 'no') RegWrite('HKCU\Software\Microsoft\Internet Explorer\Main', 'Display Inline Videos', 'REG_SZ', 'no') RegWrite('HKCU\Software\Microsoft\Internet Explorer\Main', 'Play_Background_Sounds', 'REG_SZ', 'no') ToolTip('No Images', 10, 70) EndFunc ;==> Func Images() RegWrite('HKCU\Software\Microsoft\Internet Explorer\Main', 'Display Inline Images', 'REG_SZ', 'yes') RegWrite('HKCU\Software\Microsoft\Internet Explorer\Main', 'Play_Animations', 'REG_SZ', 'yes') RegWrite('HKCU\Software\Microsoft\Internet Explorer\Main', 'Display Inline Videos', 'REG_SZ', 'yes') RegWrite('HKCU\Software\Microsoft\Internet Explorer\Main', 'Play_Background_Sounds', 'REG_SZ', 'yes') ToolTip('Yes Images', 10, 70) EndFunc ;==> Func Internet_Update_RegistryChange() DllCall('wininet.dll', 'int', 'InternetSetOption', 'none', 'null', 'int', $_INTERNET_OPTION_SETTINGS_CHANGED, 'none', 'null', 'int', 0) _GetLastErrorMessage(1, 'INTERNET_OPTION_SETTINGS_CHANGED') DllCall('wininet.dll', 'int', 'InternetSetOption', 'none', 'null', 'int', $_INTERNET_OPTION_REFRESH, 'none', 'null', 'int', 0) _GetLastErrorMessage(1, 'INTERNET_OPTION_REFRESH') ToolTip('Update Dane', 10, 70) EndFunc Func _GetLastErrorMessage($sDisplayMsgBox=0, $sTitle='Windows API last error') Local $aDllCall, $iLastError, $sErrorMsg Local $iPtr = DllStructCreate('char[4096]') Local Const $FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000 If @error Then Return '' $aDllCall= DllCall('Kernel32.dll', 'int', 'GetLastError') $iLastError = $aDllCall[0] $aDllCall = DllCall('kernel32.dll', 'int', 'FormatMessage', _ 'int', $FORMAT_MESSAGE_FROM_SYSTEM, _ 'ptr', 0, _ 'int', $iLastError, _ 'int', 0, _ 'ptr', DllStructGetPtr($iPtr), _ 'int', 4096, _ 'ptr', 0) $sErrorMsg = DllStructGetData($iPtr, 1) $sErrorMsg = StringReplace($sErrorMsg, @CR, '') $sErrorMsg = StringReplace($sErrorMsg, @LF, '') If $sDisplayMsgBox Then MsgBox(0, $sTitle, 'Error code ' & $iLastError & @CRLF & $sErrorMsg) Return $sErrorMsg EndFunc;==>_GetLastErrorMessage |