hunt Posted March 3, 2012 Share Posted March 3, 2012 (edited) Hello. I have a problem. I can't to change state of IE offline mode. In example, if to enable manually offline mode and to execute this code $oIE = _IECreate("http://google.com") _IEPropertySet($oIE, "offline", False) then the offline mode does not change state. How to solve this problem? I tested this on IE6 and IE8. Edited March 3, 2012 by hunt Link to comment Share on other sites More sharing options...
water Posted March 3, 2012 Share Posted March 3, 2012 (edited) You need to do some error checking! Most of the functions give you a return value and set the macros @error and @extended to let you know what problem occurred. Return Value Success: Returns 1 Failure: Returns 0 and sets @ERROR @Error: 0 ($_IEStatus_Success) = No Error 3 ($_IEStatus_InvalidDataType) = Invalid Data Type 4 ($_IEStatus_InvalidObjectType) = Invalid Object Type 5 ($_IEStatus_InvalidValue) = Invalid Value @Extended: Contains invalid parameter number So please change your code like this: $oIE = _IECreate("http://google.com") $iResult = _IEPropertySet($oIE, "offline", False) ConsoleWrite("Return Value: " & $iResult & ", @error : " & @error & ", @extended: " & @extended) Edited March 3, 2012 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
hunt Posted March 3, 2012 Author Share Posted March 3, 2012 (edited) Return Value: 1, @error : 0, @extended: 0it seems there's only one way to solve this problem - to write value 0 in HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsGlobalUserOffline Edited March 3, 2012 by hunt Link to comment Share on other sites More sharing options...
water Posted March 3, 2012 Share Posted March 3, 2012 Writing data to the registry is easy with AutoIt so I would try this. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
hunt Posted March 3, 2012 Author Share Posted March 3, 2012 other way does not exist? Link to comment Share on other sites More sharing options...
water Posted March 3, 2012 Share Posted March 3, 2012 I think this explains why _IEPropertySet doesn't work. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
hunt Posted March 3, 2012 Author Share Posted March 3, 2012 Ok thx. Link to comment Share on other sites More sharing options...
water Posted March 3, 2012 Share Posted March 3, 2012 If you got your script working could you please post the result for future reference? Thanks My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now