autoitxp Posted December 7, 2007 Share Posted December 7, 2007 (edited) Hi i getting cofoused here i want to do somthing like when url match then write log in same lines else if not match then write on other line how can i achive this ? like $surl = _IEPropertyGet ($oIE, "locationurl") if $surl = $surl $file = FileOpen("mylog.txt",1) FileWrite($file, $surl) else Endif Edited December 7, 2007 by autoitxp Link to comment Share on other sites More sharing options...
Nahuel Posted December 7, 2007 Share Posted December 7, 2007 if $surl = $surl No idea what you are trying to do, to be honest... what should the url returned by _IePropertyGet() match? Link to comment Share on other sites More sharing options...
autoitxp Posted December 7, 2007 Author Share Posted December 7, 2007 (edited) k here is ma code in this code it save URLS of current active window how i can i save same link at same line expandcollapse popup#include <GUIConstants.au3> #include <Misc.au3> #include <IE.au3> #include <file.au3> GUICreate("_IE") GUISetState (@SW_SHOW) $dll = DllOpen("user32.dll") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case _IsPressed("01", $dll) _IE() Case _IsPressed("0D", $dll) _IE() EndSelect Wend Func _IE() $sHwnd = WinGetHandle("") $window = WinGetTitle($sHwnd) $len = StringTrimRight($window, 30) $oIE = _IEAttach($len) $surl = _IEPropertyGet ($oIE, "locationurl") $file = FileOpen("mylog.txt",1) FileWrite($file, $surl & @CRLF) FileClose($file) EndFunc DllClose($dll) Edited December 7, 2007 by autoitxp 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