Jump to content

Help Save the file in For Next


 Share

Recommended Posts

I want to save the files in For Next, my way does not work, please help me

$code = FileRead(@ScriptDir & "\lzd.html")
$code1 = StringRegExp($code, '(?s)"product-description.*?\n(.*?)class\="clear">', 1)

Global $codesave[3]
For $i = 0 To UBound($codesave) - 1

    $codesave0] = StringReplace($code1[0], "src", "data-original")

    $codesave[1] = StringReplace($code1[0], '<noscript><img', '<img class="productlazyimage"')

    $codesave[2] = StringRegExpReplace($code10], '\/><\/noscript>(.*?)original', 'src')
    FileWrite(@ScriptDir & "\lzd5.html", $codesave[$i])
Next

Link to comment
Share on other sites

  • Developers

There is zero error checking whether the StringRegExp  was successful and fail to understand what the For..Next is for.

Jos 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...