masvil Posted January 11, 2006 Share Posted January 11, 2006 How can I log visited URLs? I mean I have to catch URL form content everytime browser windows title change. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 11, 2006 Share Posted January 11, 2006 (edited) what browser do you happen to be using? just for refrences i know with IE all visited URLs there names are saved in the Cache and its easy to get to but with firefox im trying to find what folder it is in Edited January 11, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
masvil Posted January 11, 2006 Author Share Posted January 11, 2006 what browser do you happen to be using? just for refrencesIE and Firefox (but I don't dislike help on Opera too).i know with IE all visited URLs there names are saved in the Cache and its easy to get toAh, isn't IE cache crypted? Anyway consider that I need to add new visited URL to a list, not to build a history from zero.but with firefox im trying to find what folder it is inI hope it can be extracted.In both cases I'm trying to catch URL from Windows form instead of search into caches, but if there is a simple way to go... Link to comment Share on other sites More sharing options...
CyberSlug Posted January 11, 2006 Share Posted January 11, 2006 Firefox: Locate your profile folderHowever, the history.dat file is encoded somehow.Probably the most reliable way to log all URLs would be to use a program like http://www.proxomitron.info/ (even if it does have a weird icon) Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
masvil Posted January 11, 2006 Author Share Posted January 11, 2006 I made the job with IE. It logs windows title + URL for every IE window activated (so that hidden popup are not logged). As you can see there is F11 hotkey to open the log. Any suggestion is appreciated. I can't do it something like that with FireFox, it seems AutoIT can't read URL form :-( Can someone help me? expandcollapse popupOpt("WinTitleMatchMode", 2) HotKeySet("{F11}", "ViewLog") $title = '' $url = '' While 1 Sleep(100) $title2 = WinGetTitle("") If StringInStr($title2, "- Microsoft Internet Explorer") Then; so that it catches only IE windows $text = WinGetText($title2, ""); it reads text ;MsgBox(1, "Text read was:", $text) $file = FileOpen(@ScriptDir & "\temp.txt", 1);create temporary file FileWrite($file, $text) FileClose($file) $url2 = FileReadLine(@ScriptDir & "\temp.txt", 2); reads URL (the 2nd line seems the right one) FileDelete(@ScriptDir & "\temp.txt"); it deletes temporary file If $url <> $url2 And $url2 <> '' Then $url = $url2 $title = $title2 $file = FileOpen(@ScriptDir & "\ielog.txt", 1); write URL in log in log file together with Window Title FileWriteLine($file, "Windows: [" & $title & "] - " & @MDAY & "/" & @MON & "/" & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC) FileWriteLine($file, "< IE URL: " & $url) FileClose($file) ;MsgBox(1, "written:", $url) EndIf EndIf WEnd Func ViewLog() Run(@ComSpec & " /c start ielog.txt", @ScriptDir,@SW_HIDE) EndFunc;==>ViewLog Link to comment Share on other sites More sharing options...
lebobo Posted June 5, 2006 Share Posted June 5, 2006 (edited) Here is my new code : #include <file.au3> Opt("WinTitleMatchMode", 2) $title = '' $url = '' $tmpfile = @ScriptDir & "\" & @MDAY & @MON & @YEAR & "_" & @ComputerName & "_" & @UserName & ".tmp" $logfile = @ScriptDir & "\" & @MDAY & @MON & @YEAR & "_" & @ComputerName & "_" & @UserName & ".log" While 1 Sleep(100) $title2 = WinGetTitle("") If StringInStr($title2, "- Microsoft Internet Explorer") Then $text = WinGetText($title2, "") $file = FileOpen($tmpfile, 1) FileWrite($file, $text) FileClose($file) $url2 = FileReadLine($tmpfile, 2) FileDelete($tmpfile) If $url <> $url2 And $url2 <> '' Then $url = $url2 $title = $title2 $file = FileOpen($logfile, 1) FileWrite($file, @HOUR & ":" & @MIN & ":" & @SEC & " " & $url & @CRLF) FileClose($file) EndIf EndIf WEnd It works fine BUT if you type manually the URL in IE, it log every change like this : 08:58:59 h 08:59:00 ht 08:59:00 htt 08:59:01 http 08:59:01 http: 08:59:01 http:/ 08:59:02 http:// 08:59:02 http://w 08:59:02 http://ww 08:59:03 http://www 08:59:03 http://www. 08:59:03 http://www.a 08:59:03 http://www.au 08:59:04 http://www.aut 08:59:04 http://www.auto 08:59:04 http://www.autoi 08:59:05 http://www.autoit 08:59:05 http://www.autoits 08:59:05 http://www.autoitsc 08:59:06 http://www.autoitscr 08:59:06 http://www.autoitscri ... Can someone help me to solve this problem ? Regards Edited June 5, 2006 by lebobo Link to comment Share on other sites More sharing options...
dirtymafia Posted June 19, 2006 Share Posted June 19, 2006 (edited) I am actually in the process of doing a full re-write on this using the IE.au3 UDF's. In case anyone cares I will be making a new post when it is completed. With using the ie.au3 UDF's the problem of logging every keystroke of the url is also fixed, it doesn't actually get logged until the url is loaded. I will also be creating a parser for the log files in order to make it readable by non-savy people. I am actually wrighting this for work and the people that want this information wouldn't be able to make heads or tails of the log file, even though it is simple enough. They just want numbers. Edited June 19, 2006 by dirtymafia 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