Sign in to follow this  
Followers 0
autoitxp

FileWrite lines Match

3 posts in this topic

#1 ·  Posted (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 by autoitxp

Share this post


Link to post
Share on other sites



if $surl = $surl :)

No idea what you are trying to do, to be honest... what should the url returned by _IePropertyGet() match?

Share this post


Link to post
Share on other sites

#3 ·  Posted (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

#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 by autoitxp

Share this post


Link to post
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
Sign in to follow this  
Followers 0