am632 Posted September 17, 2009 Posted September 17, 2009 (edited) hi, i have nearly finished my firefox script but got 1 last problem Here is the script - see if anyone knows how 2 help ;Clear Profile DirRemove(@HomeDrive & "\Users\" & @UserName & "\AppData\Local\Mozilla\Firefox\Profiles\", 1) DirCreate(@HomeDrive & "\Users\" & @UserName & "\AppData\Local\Mozilla\Firefox\Profiles\") ; Form History & Downloads & cookies & search FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\???????\formhistory.sqlite") FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\???????\cookies.sqlite") FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\???????\search.sqlite") (I know you can just go ryt to the temp directory but it wouldnt work for some reason) the problem is the directory is different for all computers where i put the question marks, how can i get it to go to the directory what ever it says, looked in to the search function but im struggling any ideas please tnx Edited September 17, 2009 by am632
Zedna Posted September 17, 2009 Posted September 17, 2009 Look at _FileListToArray() _FileListToArrayEx() Resources UDF ResourcesEx UDF AutoIt Forum Search
Emolas Posted September 17, 2009 Posted September 17, 2009 (edited) hi, i have nearly finished my firefox script but got 1 last problem Here is the script - see if anyone knows how 2 help ;Clear Profile DirRemove(@HomeDrive & "\Users\" & @UserName & "\AppData\Local\Mozilla\Firefox\Profiles\", 1) DirCreate(@HomeDrive & "\Users\" & @UserName & "\AppData\Local\Mozilla\Firefox\Profiles\") ; Form History & Downloads & cookies & search FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\???????\formhistory.sqlite") FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\???????\cookies.sqlite") FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\???????\search.sqlite") (I know you can just go ryt to the temp directory but it wouldnt work for some reason) the problem is the directory is different for all computers where i put the question marks, how can i get it to go to the directory what ever it says, looked in to the search function but im struggling any ideas please tnx Use the _FileListToArray function: #Include <File.au3> $Path = @HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\" $Folders = _FileListToArray($Path,"*",2) $Loop = UBound($Folders) For $i = 1 to $Loop FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\" & $Folders[$i] & "\formhistory.sqlite") FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\" & $Folders[$i] & "\cookies.sqlite") FileDelete(@HomeDrive & "\Users\" & @UserName & "\AppData\Roaming\Mozilla\Firefox\Profiles\" & $Folders[$i] & "\search.sqlite") next Edited September 17, 2009 by Emolas
am632 Posted September 20, 2009 Author Posted September 20, 2009 Hi, thanks for the help, the script works nicely and does the job but i get an error when i run it (although it still works), how can i stop the error popping up please? I have attached a screenshot of the error thanks
Zedna Posted September 20, 2009 Posted September 20, 2009 (edited) For $i = 1 to $Loop - 1 Edited September 20, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
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