daslick Posted January 1, 2007 Share Posted January 1, 2007 I tried using DirRemove(@UserProfileDir & "Local Settings\History\History.IE5", 1) but its not working. I got it to remove the cookies... the history is a little harder because it is integrated in explorer. THANKs! Link to comment Share on other sites More sharing options...
jlorenz1 Posted January 1, 2007 Share Posted January 1, 2007 (edited) The solution is simple. There is a BLANK in the path. You must put the path in extra '"'(quotes). Or use FileGetShortName DirRemove(@UserProfileDir & '"Local Settings\History\History.IE5"', 1)Johannes Edited January 1, 2007 by jlorenz1 Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post] Link to comment Share on other sites More sharing options...
daslick Posted January 1, 2007 Author Share Posted January 1, 2007 I didn't notice the syntax error, but that is not the problem. Clearing that folder isn't deleting the history. The history file is in DirRemove(@UserProfileDir & '"\History"', 1) but cannot be deleted because it is a windows system folder. Link to comment Share on other sites More sharing options...
theguy0000 Posted January 1, 2007 Share Posted January 1, 2007 I have no idea if this will work, but you could try: FileSetAttrib (FileGetShortName(@UserProfileDir & "Local Settings\History\History.IE5"), "-S", 1) THEN try to DirRemove it. The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
daslick Posted January 1, 2007 Author Share Posted January 1, 2007 Removing that directory is not a problem or what i need... I figured out that I need to clear all the history files like this..... FileDelete(@UserProfileDir & "\History\*.*") but they cannot be deleted like this because they are not standard files or something.... Browse to that folder and look. Im not sure how to go about removing them without opening the folder and hitting delete Link to comment Share on other sites More sharing options...
theguy0000 Posted January 1, 2007 Share Posted January 1, 2007 you said it wouldnt work because its a system folder. I just told you how to make it not a system folder anymore. The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
daslick Posted January 1, 2007 Author Share Posted January 1, 2007 That didnt work becuase it is a 'windows system folder' it cannot be deleted. Open your user folder and try to delete the history folder... it wont let you. windows system folder protection Link to comment Share on other sites More sharing options...
Richard Robertson Posted January 1, 2007 Share Posted January 1, 2007 Did you try deleting *.*? You say they are non-standard, but how do you know? Maybe the folder doesn't really exist and is just a namespace? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 1, 2007 Moderators Share Posted January 1, 2007 (edited) If you guys took the time to actually look at what you were doing, it wouldn't be "I can't" or "Did you try".@theguyFileSetAttrib (FileGetShortName(@UserProfileDir & "Local Settings\History\History.IE5"), "-S", 1)Should be:FileSetAttrib (FileGetShortName(@UserProfileDir & "\Local Settings\History\History.IE5"), "-S", 1)@daslick:You're right: FileDelete(@UserProfileDir & "\History\*.*") isn't going to work, because there is no file there. Edited January 1, 2007 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
daslick Posted January 1, 2007 Author Share Posted January 1, 2007 Yes i tried deleting *.*. Open the folder and you will see... you cannot even right click and get the real file name... Browse to C:\Documents and Settings\Username-here and try to delete history. I have no clue how to do it, but is there a way to simulate using the delete button on the files within the folder? maybe like a shelldelete? Link to comment Share on other sites More sharing options...
daslick Posted January 1, 2007 Author Share Posted January 1, 2007 Is there a way I could run this hidden? RunDll32.exe shell32.dll,Control_RunDLL inetcpl.cpl (this command opens internet explorer internet properties) then send keys or data or something to that hidden window and clear history that way? Link to comment Share on other sites More sharing options...
theguy0000 Posted January 1, 2007 Share Posted January 1, 2007 @theguyFileSetAttrib (FileGetShortName(@UserProfileDir & "Local Settings\History\History.IE5"), "-S", 1)Should be:FileSetAttrib (FileGetShortName(@UserProfileDir & "\Local Settings\History\History.IE5"), "-S", 1)Ah. I didn't notice that. I just copied what the OP had in the first post. The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 1, 2007 Moderators Share Posted January 1, 2007 Here, you can translate this over to AutoIt:http://vbnet.mvps.org/index.html?code/internet/index.html Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
daslick Posted January 1, 2007 Author Share Posted January 1, 2007 (edited) Thanks I'll take a look and post back if I can translate it.... EDIT: Nevermind. I do not know VB.net and couldn't even begin to understand that. If anyone knows VB.net and would like to, I would really appreciate it. http://vbnet.mvps.org/index.html?code/internet/index.html Here is the junky code I have written in the mean time to clear history.Func _clearhistory() Run("RunDll32.exe shell32.dll,Control_RunDLL inetcpl.cpl") WinWaitActive("Internet Properties","",3) if not WinActive("Internet Properties") then Return Send("{Tab 3}") Send("{Enter}") Send("{Enter}") WinWaitActive("Internet Properties","",3) if not WinActive("Internet Properties") then Return Send("{Tab 4}") Send("{Enter}") Send("{left}") Send("{Enter}") WinWaitActive("Internet Properties","",10) if not WinActive("Internet Properties") then Return Send("{Tab 7}") Send("{Right 3}") Send("{Tab 5}") Send("{Enter}") Send("{Tab 4}") Send("{Enter 2}") Send("{Tab}") Send("{Enter 2}") WinClose("AutoComplete Settings") WinClose("Internet Properties") EndFunc Edited January 1, 2007 by daslick Link to comment Share on other sites More sharing options...
daslick Posted January 1, 2007 Author Share Posted January 1, 2007 (edited) Sorry for the double post.... here is a much more stable version of the above. Func _clearhistory() $busy = "yes" Opt("WinTitleMatchMode", 4) ToolTip("Please wait while your browsing history is being cleared...",MouseGetPos(0),MouseGetPos(1),"Virulence Browser") Run("RunDll32.exe shell32.dll,Control_RunDLL inetcpl.cpl") WinWait("Internet Properties","",3) $historyhandle = WinGetHandle("Internet Properties") ControlClick($historyhandle, "", 627) ControlClick(WinGetHandle("Delete Cookies"), "", 1) WinWait($historyhandle, "", 4) ControlClick($historyhandle, "", 624) ControlCommand(WinGetHandle("Delete Files"), "", 1449, "Check") ControlClick(WinGetHandle("Delete Files"), "", 1) ControlClick($historyhandle, "", 1489) ControlClick(WinGetHandle("Internet Options"), "Are you sure you want to delete your history of visted websites?", 6) ControlSend($historyhandle, "", 12320, "{Right 3}") sleep(550) ControlClick($historyhandle, "", 321) WinWait("AutoComplete Settings", "", 2) ControlCommand ( "AutoComplete Settings", "", 756, "Check") ControlCommand ( "AutoComplete Settings", "", 757, "Check") ControlCommand ( "AutoComplete Settings", "", 759, "Check") ControlCommand ( "AutoComplete Settings", "", 761, "Check") ControlClick(WinGetHandle("AutoComplete Settings"), "", 1) WinWait($historyhandle, "", 2) WinKill($historyhandle) ToolTip("") $busy = "no" EndFunc Edited January 1, 2007 by daslick 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