Jump to content

_IECreateEmbedded Cache


Go to solution Solved by mikell,

Recommended Posts

  • Solution

_IECreateEmbedded creates a Webbrowser object (shell.explorer.2)

#include <GUIConstantsEx.au3>
#include <IE.au3>

$oIE = _IECreateEmbedded()
GUICreate("Embedded Web control Test", 640, 200)
GUICtrlCreateObj($oIE, 10, 50, 600, 100)
$label = GUICtrlCreateLabel("", 10, 10, 500, 25)
GUISetState()

$oIE.Navigate2("shell:cache")
GuiCtrlSetData($label, $oIE.locationurl)

While 1
    $iMsg = GUIGetMsg()
    Select
        Case $iMsg = $GUI_EVENT_CLOSE
            Exit
     EndSelect
WEnd
Link to comment
Share on other sites

The only way I can think of would be to use the Reg* funcs to change it in the registry when starting the script, and then change it back when closing the script

Not tried so no assurance about this  :)

Edit

http://stackoverflow.com/questions/23570606/change-cache-storage-location-for-individual-webbrowser-control-instances

Edited by mikell
Link to comment
Share on other sites

The only way I can think of would be to use the Reg* funcs to change it in the registry when starting the script, and then change it back when closing the script

Not tried so no assurance about this  :)

Edit

http://stackoverflow.com/questions/23570606/change-cache-storage-location-for-individual-webbrowser-control-instances

 

Yeah I kind of figured as much and used the following:

Func CacheChange()
    RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "Cache", "REG_EXPAND_SZ", "C:\TempAppFiles")
EndFunc   ;==>CacheChange

Func CacheReset()
    RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "Cache", "REG_EXPAND_SZ", "%USERPROFILE%\AppData\Local\Microsoft\Windows\Temporary Internet Files")
EndFunc   ;==>CacheReset

 

Thank you again, I really appreciate your help.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...