Jump to content
Sign in to follow this  
Palestinian

_IECreateEmbedded Cache

Recommended Posts

Palestinian

Hello everyone, I was wondering where does _IECreateEmbedded store its cache? I'm thinking about creating a little program for my everyday online surfing and I want its cache to be kept so the program won't reload the whole thing whenever I start it.

Share this post


Link to post
Share on other sites
mikell

_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
  • Like 1

Share this post


Link to post
Share on other sites
Palestinian

Cheers mate.

Another question if it isn't asking too much, is there a way to set a seperate folder for _IECreateEmbedded cache?

Share this post


Link to post
Share on other sites
mikell

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
  • Like 1

Share this post


Link to post
Share on other sites
Palestinian

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.

Share this post


Link to post
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
Sign in to follow this  

×