Jump to content
youtuber

About code alignment error

Recommended Posts

youtuber

I have an xml project
according to the project
You need to delete the following lines

<!-- generator-version="4.7.3" -->
<lastmod>2016-11-17T12:00:23+00:00</lastmod>

Is this the fault?

Local $sitelisturl = StringSplit(StringStripCR(GUICtrlRead($Edit1)), @LF)
        Local $olderinfo[UBound($sitelisturl) + 1][2]
        Local $newerinfo[UBound($sitelisturl) + 1][2]
        Local $previousmodification[UBound($sitelisturl) + 1][2]
        Local $nextmodification[UBound($sitelisturl) + 1][2]
        
        For $i = 1 To UBound($sitelisturl) - 1
            $sitenamestr = StringRegExp($sitelisturl[$i], 'https?://(?:www.)?([^.]+)', 3)
            $old = $olddir & $sitenamestr[0] & '.xml'
            $new = $newdir & $sitenamestr[0] & '.xml'
            
            $olderinfo[$i][1] = StringRegExpReplace(FileRead($old), '(?s)<!--.*?-->', "") And $previousmodification[$i][1] & '(?s)<lastmod>.*?</lastmod>', "")
            $newerinfo[$i][1] = StringRegExpReplace(FileRead($new), '(?s)<!--.*?-->', "") And $nextmodification[$i][1] & '(?s)<lastmod>.*?</lastmod>', "")

            $olderLine = StringLen($olderinfo[$i][1])
            GUICtrlSetData($EditLog, $olderLine & @CRLF, 1)
            
            $newerLine = StringLen($newerinfo[$i][1])
            GUICtrlSetData($EditLog, $newerLine & @CRLF, 1)
            
            If $olderLine <> $newerLine Then
                
                vs...

There is a problem here I guess the code is wrong

$olderinfo[$i][1] = StringRegExpReplace(FileRead($old), '(?s)<!--.*?-->', "") And $previousmodification[$i][1] & '(?s)<lastmod>.*?</lastmod>', "")
$newerinfo[$i][1] = StringRegExpReplace(FileRead($new), '(?s)<!--.*?-->', "") And $nextmodification[$i][1] & '(?s)<lastmod>.*?</lastmod>', "")

 

Share this post


Link to post
Share on other sites
Jos

What are you expecting to be the result of these lines and what is actually the result?

Jos

Edited by Jos
  • Like 1

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
youtuber

 

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <File.au3>
#include <Array.au3>
#include <Inet.au3>
#include <String.au3>
$aTime = 5
$Form1 = GUICreate("Form1", 694, 383, 192, 124)
$EditLog = GUICtrlCreateEdit("" & @CRLF, 432, 40, 249, 161, BitOR($ES_MULTILINE, $ES_AUTOVSCROLL, $WS_VSCROLL))
$Edit1 = GUICtrlCreateEdit("", 24, 40, 393, 281)
GUICtrlSetData(-1, FileRead(@ScriptDir & "\sitelist.txt"))
$olddown = GUICtrlCreateButton("olddown", 128, 336, 75, 25)
$newtest = GUICtrlCreateButton("newtest", 224, 338, 75, 25)
$EditUrlLog = GUICtrlCreateEdit("" & @CRLF, 432, 208, 249, 161, BitOR($ES_MULTILINE, $ES_AUTOVSCROLL, $WS_VSCROLL))
GUISetState(@SW_SHOW)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

Case $olddown
_firstdownloaded()
Case $newtest
_newtest()
    EndSwitch
WEnd

Func _newtest()
    While 1
        $eskidir = @ScriptDir & '\eskidir\'
        $olddir = @ScriptDir & '\old\'
        $newdir = @ScriptDir & '\new\'
        Local $sitelisturl = StringSplit(StringStripCR(GUICtrlRead($Edit1)), @LF)
        Local $olderinfo[UBound($sitelisturl) + 1][2]
        Local $newerinfo[UBound($sitelisturl) + 1][2]
        Local $previousmodification[UBound($sitelisturl) + 1][2]
        Local $nextmodification[UBound($sitelisturl) + 1][2]
        For $i = 1 To UBound($sitelisturl) - 1
            $sitenamestr = StringRegExp($sitelisturl[$i], 'https?://(?:www.)?([^.]+)', 3)
             ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sitenamestr[0] = ' & $sitenamestr[0] & " deneme" & @CRLF & '>Error code: ' & @error & @CRLF)
            $old = $olddir & $sitenamestr[0] & '.xml'
            $new = $newdir & $sitenamestr[0] & '.xml'
            $eski = $eskidir & $sitenamestr[0] & '.xml'

            $inetgetsitesnew = InetGet($sitelisturl[$i], $new, 1, 1)
            Sleep($aTime * 1000)
            
$olderinfo[$i][1] = StringRegExpReplace(FileRead($old), '(?s)<!--.*?-->', "") And $previousmodification[$i][1] & '(?s)<lastmod>.*?</lastmod>', "")
$newerinfo[$i][1] = StringRegExpReplace(FileRead($new), '(?s)<!--.*?-->', "") And $nextmodification[$i][1] & '(?s)<lastmod>.*?</lastmod>', "")

ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $olderinfo[$i][1] = ' & $olderinfo[$i][1] & " ==> " & $sitenamestr[0] & @CRLF & '>Error code: ' & @error & @CRLF)
            $olderLine = StringLen($olderinfo[$i][1])
            ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $olderLine = ' & $olderLine & " ==> " & $sitenamestr[0] & @CRLF & '>Error code: ' & @error & @CRLF)
            GUICtrlSetData($EditLog, $olderLine & " " &$sitenamestr[0] & @CRLF, 1)
            $newerLine = StringLen($newerinfo[$i][1])
            ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $newerLine = ' & $newerLine & " ==> " & $sitenamestr[0] & @CRLF & '>Error code: ' & @error & @CRLF)
            GUICtrlSetData($EditLog, $newerLine & " " &$sitenamestr[0] & @CRLF, 1)
            If $olderLine <> $newerLine Then
$aUrlread = BinaryToString(InetRead($sitelisturl[$i],0), 4)
$aUrlextract = _StringBetween($aUrlread, '<loc>','</loc>')
If IsArray($aUrlextract) Then
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $aUrlextract[0] = ' & $aUrlextract[0] & @CRLF & '>Error code: ' & @error & @CRLF)
GUICtrlSetData($EditUrlLog, $aUrlextract[0] & @CRLF, 1)
FileOpen(@ScriptDir & '\URLs.txt', 1)
FileWrite(@ScriptDir & '\URLs.txt', $aUrlextract[0] & @CRLF)
FileClose(@ScriptDir & '\URLs.txt')
ClipPut($aUrlextract[0])
TrayTip($sitenamestr[0], " Posted an Article Copied URL " & @CRLF & $aUrlextract[0], 30, 4)
Sleep(3000)
$ext = $sitenamestr[0] & '.xml'
                $array = _FileListToArray($newdir, $ext, $FLTA_FILES)
                $count = $new
                For $i = 1 To $array[0]
                    FileCopy($olddir & "\" & $array[$i], $eskidir, $FC_OVERWRITE)
                    $result = FileCopy($newdir & "\" & $array[$i], $olddir, $FC_OVERWRITE)
                    If $result = 1 Then $count += 1
                Next

If MsgBox(36,"Are you going to the new article? " & $sitenamestr[0] ,$aUrlextract[0], 10) = 6 Then  ShellExecute($aUrlextract[0])
EndIf
EndIf
        Next
    WEnd
EndFunc   ;==>_newtest

Func _firstdownloaded()
   Local $sitelisturl = StringSplit(StringStripCR(GUICtrlRead($Edit1)), @LF)
    For $i = 1 To UBound($sitelisturl) - 1
        $sitenamestr = StringRegExp($sitelisturl[$i], 'https?://(?:www.)?([^.]+)', 3)
        $sitenames = $sitenamestr[0]
        ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sitenames = ' & $sitenames & @CRLF & '>Error code: ' & @error & @CRLF)
        $downloadtemp = @ScriptDir & '\old\' & $sitenames & '.xml'
        If FileExists(@ScriptDir & "\old" & $downloadtemp) Then
            $inetgetsites = InetGet($sitelisturl[$i], $downloadtemp, 1, 1)
        Else
            DirCreate(@ScriptDir & "\" & "old")
            DirCreate(@ScriptDir & "\" & "new")
            $inetgetsites = InetGet($sitelisturl[$i], $downloadtemp, 1, 1)
        EndIf
        GUICtrlSetData($EditUrlLog, $sitenames & ".xml " & " " & $inetgetsites & @CRLF , 1)
Sleep(40)
    Next
EndFunc   ;==>_firstdownloaded
Edited by youtuber

Share this post


Link to post
Share on other sites
youtuber

Is this code correct? :huh2:

$olderinfo[$i][1] = StringRegExpReplace(FileRead($old), '(?s)<!--.*?-->', "")
            $newerinfo[$i][1] = StringRegExpReplace(FileRead($new), '(?s)<!--.*?-->', "")
            
            $previousmodification[$i][1] = StringRegExpReplace(FileRead($old), '(?s)<lastmod>.*?</lastmod>', "")
            $nextmodification[$i][1] = StringRegExpReplace(FileRead($new), '(?s)<lastmod>.*?</lastmod>', "")
            
            $olderLine = StringLen($olderinfo[$i][1] And $previousmodification[$i][1])
            $newerLine = StringLen($newerinfo[$i][1] And $nextmodification[$i][1])
            
            If $olderLine <> $newerLine Then

 

Share this post


Link to post
Share on other sites
Jos

You haven't answer my simple question so how can you expect an answer? 

What are you expecting the answer to be for these 2 lines?

11 hours ago, youtuber said:

$olderLine = StringLen($olderinfo[$i][1] And $previousmodification[$i][1])            
$newerLine = StringLen($newerinfo[$i][1] And $nextmodification[$i][1])

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Jos

So why do you have that AND in the line? Guess it now only returns a boolean value True or False?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
youtuber

This is my example

I do not know more :>

I would like to follow xml changes

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <File.au3>
#include <Array.au3>
#include <Inet.au3>
#include <String.au3>
$aTime = 5
$Form1 = GUICreate("Form1", 694, 383, 192, 124)
$EditLog = GUICtrlCreateEdit("" & @CRLF, 432, 40, 249, 161, BitOR($ES_MULTILINE, $ES_AUTOVSCROLL, $WS_VSCROLL))
$Edit1 = GUICtrlCreateEdit("", 24, 40, 393, 281)
GUICtrlSetData(-1, FileRead(@ScriptDir & "\sitelist.txt"))
$olddown = GUICtrlCreateButton("olddown", 128, 336, 75, 25)
$newtest = GUICtrlCreateButton("newtest", 224, 338, 75, 25)
$EditUrlLog = GUICtrlCreateEdit("" & @CRLF, 432, 208, 249, 161, BitOR($ES_MULTILINE, $ES_AUTOVSCROLL, $WS_VSCROLL))
GUISetState(@SW_SHOW)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

Case $olddown
_firstdownloaded()
Case $newtest
_newtest()
    EndSwitch
WEnd

Func _newtest()
    While 1
        $eskidir = @ScriptDir & '\eskidir\'
        $olddir = @ScriptDir & '\old\'
        $newdir = @ScriptDir & '\new\'
        Local $sitelisturl = StringSplit(StringStripCR(GUICtrlRead($Edit1)), @LF)
        Local $olderinfo[UBound($sitelisturl) + 1][2]
        Local $newerinfo[UBound($sitelisturl) + 1][2]
        Local $previousmodification[UBound($sitelisturl) + 1][2]
        Local $nextmodification[UBound($sitelisturl) + 1][2]
        For $i = 1 To UBound($sitelisturl) - 1
            $sitenamestr = StringRegExp($sitelisturl[$i], 'https?://(?:www.)?([^.]+)', 3)
             ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sitenamestr[0] = ' & $sitenamestr[0] & " deneme" & @CRLF & '>Error code: ' & @error & @CRLF)
            $old = $olddir & $sitenamestr[0] & '.xml'
            $new = $newdir & $sitenamestr[0] & '.xml'
            $eski = $eskidir & $sitenamestr[0] & '.xml'

            $inetgetsitesnew = InetGet($sitelisturl[$i], $new, 1, 1)
            Sleep($aTime * 1000)
            
$olderinfo[$i][1] = StringRegExpReplace(FileRead($old), '(?s)<!--.*?-->', "") And $previousmodification[$i][1] & '(?s)<lastmod>.*?</lastmod>', "")
$newerinfo[$i][1] = StringRegExpReplace(FileRead($new), '(?s)<!--.*?-->', "") And $nextmodification[$i][1] & '(?s)<lastmod>.*?</lastmod>', "")

ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $olderinfo[$i][1] = ' & $olderinfo[$i][1] & " ==> " & $sitenamestr[0] & @CRLF & '>Error code: ' & @error & @CRLF)
            $olderLine = StringLen($olderinfo[$i][1])
            ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $olderLine = ' & $olderLine & " ==> " & $sitenamestr[0] & @CRLF & '>Error code: ' & @error & @CRLF)
            GUICtrlSetData($EditLog, $olderLine & " " &$sitenamestr[0] & @CRLF, 1)
            $newerLine = StringLen($newerinfo[$i][1])
            ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $newerLine = ' & $newerLine & " ==> " & $sitenamestr[0] & @CRLF & '>Error code: ' & @error & @CRLF)
            GUICtrlSetData($EditLog, $newerLine & " " &$sitenamestr[0] & @CRLF, 1)
            If $olderLine <> $newerLine Then
$aUrlread = BinaryToString(InetRead($sitelisturl[$i],0), 4)
$aUrlextract = _StringBetween($aUrlread, '<loc>','</loc>')
If IsArray($aUrlextract) Then
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $aUrlextract[0] = ' & $aUrlextract[0] & @CRLF & '>Error code: ' & @error & @CRLF)
GUICtrlSetData($EditUrlLog, $aUrlextract[0] & @CRLF, 1)
FileOpen(@ScriptDir & '\URLs.txt', 1)
FileWrite(@ScriptDir & '\URLs.txt', $aUrlextract[0] & @CRLF)
FileClose(@ScriptDir & '\URLs.txt')
ClipPut($aUrlextract[0])
TrayTip($sitenamestr[0], " Posted an Article Copied URL " & @CRLF & $aUrlextract[0], 30, 4)
Sleep(3000)
$ext = $sitenamestr[0] & '.xml'
                $array = _FileListToArray($newdir, $ext, $FLTA_FILES)
                $count = $new
                For $i = 1 To $array[0]
                    FileCopy($olddir & "\" & $array[$i], $eskidir, $FC_OVERWRITE)
                    $result = FileCopy($newdir & "\" & $array[$i], $olddir, $FC_OVERWRITE)
                    If $result = 1 Then $count += 1
                Next

If MsgBox(36,"Are you going to the new article? " & $sitenamestr[0] ,$aUrlextract[0], 10) = 6 Then  ShellExecute($aUrlextract[0])
EndIf
EndIf
        Next
    WEnd
EndFunc   ;==>_newtest

Func _firstdownloaded()
   Local $sitelisturl = StringSplit(StringStripCR(GUICtrlRead($Edit1)), @LF)
    For $i = 1 To UBound($sitelisturl) - 1
        $sitenamestr = StringRegExp($sitelisturl[$i], 'https?://(?:www.)?([^.]+)', 3)
        $sitenames = $sitenamestr[0]
        ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sitenames = ' & $sitenames & @CRLF & '>Error code: ' & @error & @CRLF)
        $downloadtemp = @ScriptDir & '\old\' & $sitenames & '.xml'
        If FileExists(@ScriptDir & "\old" & $downloadtemp) Then
            $inetgetsites = InetGet($sitelisturl[$i], $downloadtemp, 1, 1)
        Else
            DirCreate(@ScriptDir & "\" & "old")
            DirCreate(@ScriptDir & "\" & "new")
            $inetgetsites = InetGet($sitelisturl[$i], $downloadtemp, 1, 1)
        EndIf
        GUICtrlSetData($EditUrlLog, $sitenames & ".xml " & " " & $inetgetsites & @CRLF , 1)
Sleep(40)
    Next
EndFunc   ;==>_firstdownloaded

And this is my sitelist.txt 

http://autoitscripttr.blogspot.com.tr/sitemap.xml
https://autoitscriptblog.wordpress.com/sitemap.xml

 

And I want to exclude this part of the calculation

$olderinfo[$i][1] = StringRegExpReplace(FileRead($old), '(?s)<!--.*?-->', "")
            $newerinfo[$i][1] = StringRegExpReplace(FileRead($new), '(?s)<!--.*?-->', "")

            $previousmodification[$i][1] = StringRegExpReplace(FileRead($old), '(?s)<lastmod>.*?</lastmod>', "")
            $nextmodification[$i][1] = StringRegExpReplace(FileRead($new), '(?s)<lastmod>.*?</lastmod>', "")

 

Share this post


Link to post
Share on other sites
youtuber

Ok i solved a problem but i still did not observe the change :(

$olderinfo[$i][1] = StringRegExpReplace(StringRegExpReplace(FileRead($old), '(?s)<!--.*?-->', ""), '(?s)<lastmod>.*?</lastmod>', "")
$newerinfo[$i][1] = StringRegExpReplace(StringRegExpReplace(FileRead($new), '(?s)<!--.*?-->', ""), '(?s)<lastmod>.*?</lastmod>', "")

If $olderLine <> $newerLine Then ;..?

Share this post


Link to post
Share on other sites
youtuber

Can a friend take care of
I still miscalculate the difference between xml and sometimes

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <File.au3>
#include <Array.au3>
#include <Inet.au3>
#include <String.au3>

$aTime = 5
$Form1 = GUICreate("Form1", 694, 383, 192, 124)
$EditLog = GUICtrlCreateEdit("" & @CRLF, 432, 40, 249, 161, BitOR($ES_MULTILINE, $ES_AUTOVSCROLL, $WS_VSCROLL))
$Edit1 = GUICtrlCreateEdit("", 24, 40, 393, 281)
GUICtrlSetData(-1, FileRead(@ScriptDir & "\sitelist.txt"))
$olddown = GUICtrlCreateButton("olddown", 128, 336, 75, 25)
$newtest = GUICtrlCreateButton("newtest", 224, 338, 75, 25)
$EditUrlLog = GUICtrlCreateEdit("" & @CRLF, 432, 208, 249, 161, BitOR($ES_MULTILINE, $ES_AUTOVSCROLL, $WS_VSCROLL))
FileInstall("ses.mp3", @TempDir & "\ses.mp3")
GUISetState(@SW_SHOW)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

Case $olddown
_firstdownloaded()
Case $newtest
_newtest()
    EndSwitch
WEnd


Func _newtest()
    While 1
        $eskidir = @ScriptDir & '\eskidir\'
        $olddir = @ScriptDir & '\old\'
        $newdir = @ScriptDir & '\new\'
        Local $sitelisturl = StringSplit(StringStripCR(GUICtrlRead($Edit1)), @LF)
        Local $olderinfo[UBound($sitelisturl) + 1][2]
        Local $newerinfo[UBound($sitelisturl) + 1][2]
        Local $previousmodification[UBound($sitelisturl) + 1][2]
        Local $nextmodification[UBound($sitelisturl) + 1][2]
        For $i = 1 To UBound($sitelisturl) - 1
            $sitenamestr = StringRegExp($sitelisturl[$i], 'https?://(?:www.)?([^.]+)', 3)
            ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sitenamestr[0] = ' & $sitenamestr[0] & " deneme" & @CRLF & '>Error code: ' & @error & @CRLF)
            $old = $olddir & $sitenamestr[0] & '.xml'
            $new = $newdir & $sitenamestr[0] & '.xml'
            $eski = $eskidir & $sitenamestr[0] & '.xml'
            Sleep($aTime * 1000)
             $inetgetsitesnew = InetGet($sitelisturl[$i], $new, 1, 1)

            $olderinfo[$i][1] = StringRegExpReplace(StringRegExpReplace(FileRead($old), '(?s)<!--.*?-->', ""), '(?s)<lastmod>.*?</lastmod>', "")
            $newerinfo[$i][1] = StringRegExpReplace(StringRegExpReplace(FileRead($new), '(?s)<!--.*?-->', ""), '(?s)<lastmod>.*?</lastmod>', "")
            ;ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $olderinfo[$i][1] = ' & $olderinfo[$i][1] & " ==> " & $sitenamestr[0] & @CRLF & '>Error code: ' & @error & @CRLF)
            $olderLine = StringLen($olderinfo[$i][1])
            ;ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $olderLine = ' & $olderLine & " ==> " & $sitenamestr[0] & @CRLF & '>Error code: ' & @error & @CRLF)
            GUICtrlSetData($EditLog, $olderLine & " " &$sitenamestr[0] & @CRLF, 1)
            $newerLine = StringLen($newerinfo[$i][1])
            ;ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $newerLine = ' & $newerLine & " ==> " & $sitenamestr[0] & @CRLF & '>Error code: ' & @error & @CRLF)
            GUICtrlSetData($EditLog, $newerLine & " " &$sitenamestr[0] & @CRLF, 1)
            If $olderLine <> $newerLine Then
$aUrlread = BinaryToString(InetRead($sitelisturl[$i],0), 4)
$aUrlextract = _StringBetween($aUrlread, '<loc>','</loc>')
If IsArray($aUrlextract) Then
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $aUrlextract[0] = ' & $aUrlextract[0] & @CRLF & '>Error code: ' & @error & @CRLF)
$ext = $sitenamestr[0] & '.xml'
                $array = _FileListToArray($newdir, $ext, $FLTA_FILES)
                $count = $new
                For $i = 1 To $array[0]
                    FileCopy($olddir & "\" & $array[$i], $eskidir, $FC_OVERWRITE)
                    $result = FileCopy($newdir & "\" & $array[$i], $olddir, $FC_OVERWRITE)
                    If $result = 1 Then $count += 1
                Next
GUICtrlSetData($EditUrlLog, $aUrlextract[0] & @CRLF, 1)
FileOpen(@ScriptDir & '\URLs.txt', 1)
FileWrite(@ScriptDir & '\URLs.txt', $aUrlextract[0] & @CRLF)
FileClose(@ScriptDir & '\URLs.txt')
SoundPlay(@TempDir & "\ses.mp3", 10)
ClipPut($aUrlextract[0])
TrayTip($sitenamestr[0], " Posted an Article Copied URL " & @CRLF & $aUrlextract[0], 30, 4)
Sleep(3000)

If MsgBox(36,"Are you going to the new article? " & $sitenamestr[0] ,$aUrlextract[0]) = 6 Then  ShellExecute($aUrlextract[0])
EndIf
EndIf
        Next
    WEnd
EndFunc   ;==>_newtest

Func _firstdownloaded()
   Local $sitelisturl = StringSplit(StringStripCR(GUICtrlRead($Edit1)), @LF)
    For $i = 1 To UBound($sitelisturl) - 1
        $sitenamestr = StringRegExp($sitelisturl[$i], 'https?://(?:www.)?([^.]+)', 3)
        $sitenames = $sitenamestr[0]
        ;ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sitenames = ' & $sitenames & @CRLF & '>Error code: ' & @error & @CRLF)
        $downloadtemp = @ScriptDir & '\old\' & $sitenames & '.xml'
        If FileExists(@ScriptDir & "\old" & $downloadtemp) Then
            $inetgetsites = InetGet($sitelisturl[$i], $downloadtemp, 1, 1)
        Else
            DirCreate(@ScriptDir & "\" & "old")
            DirCreate(@ScriptDir & "\" & "new")
            $inetgetsites = InetGet($sitelisturl[$i], $downloadtemp, 1, 1)
        EndIf
        GUICtrlSetData($EditUrlLog, $sitenames & ".xml " & " " & $inetgetsites & @CRLF , 1)
Sleep(40)
    Next
EndFunc   ;==>_firstdownloaded

 

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

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.