Jump to content

Creating script to clear the cache of Internet Explorer


 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

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...