Jump to content
Sign in to follow this  
talgreen

Creating script to clear the cache of Internet Explorer

Recommended Posts

talgreen

Hi,

Im trying to create a script to clear the cache of IE ver.6 , by choosing Tools -> Internet Options and then clicking on Delete Files button.

Here is the code I wrote:

Run  ( "C:\Program Files\Internet Explorer\IEXPLORE.EXE about:blank")
    WinWaitActive("about:blank - Microsoft Internet Explorer")
    
ControlSend("about:blank - Microsoft Internet Explorer","","ToolbarWindow324","!to!f")
WinWaitActive("Internet Options")

ControlClick("Internet Options", "", "Button7")
WinWaitActive("Delete Files")
ControlCommand("Delete Files","", "Button1", "Check")
sleep(100)
ControlClick("Delete Files", "", "Button2")

WinWaitActive("Internet Options")
ControlClick("Internet Options", "", "Button15")
WinWaitActive("about:blank - Microsoft Internet Explorer")
WinClose("about:blank - Microsoft Internet Explorer")

The thing is that this script some times does not work, and some time other menu items are pressed.

Is there any other robust way of doing this?

Thanks,

Tal.

Share this post


Link to post
Share on other sites
i542

C:\Documents and Settings\Ivan\Local Settings\Temporary Internet Files (Ivan is my name) is a place where the temporary internet files are stored

FileDelete("C:\Documents and Settings\Ivan\Local Settings\Temporary Internet Files\*.*")

A single line solves all <_<

Just replace Ivan with your account name.


I can do signature me.

Share this post


Link to post
Share on other sites
talgreen

Hi,

But I think that this folder also contains the cookies, doesnt it?

Tal.

Share this post


Link to post
Share on other sites
i542

Hi,

But I think that this folder also contains the cookies, doesnt it?

Tal.

Cookies are contained in folder C:\Documents and Settings\Ivan\Cookies.

i542


I can do signature me.

Share this post


Link to post
Share on other sites
rudi

C:\Documents and Settings\Ivan\Local Settings\Temporary Internet Files (Ivan is my name) is a place where the temporary internet files are stored

FileDelete("C:\Documents and Settings\Ivan\Local Settings\Temporary Internet Files\*.*")

This will work (at least) for IE6 on Windows XP for the current user, indipendent of the Language Version of the Windows installation.

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

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  

×