Jump to content

Is there a better way to handle StringReplace more efficiently.


PnD
 Share

Recommended Posts

Dear all,

I would like to ask for your expert help to see if it is possible to re-write the codes below more efficiently. I really appreciate your help. 

Local $html = FileRead(@ScriptDir & "\Ship LabelV2.html")
    Local $new_html = StringReplace($html,"EUNAME#",$EUName)
    Local $new_html1= StringReplace($new_html,"#ITIorder#",$ITIOrder)
    Local $new_html2 = StringReplace($new_html1,"#Model#",$TVModel)
    Local $new_html3 = StringReplace ($new_html2,"#Ref#",$ITIRef)
    Local $new_html4 = StringReplace ($new_html3,"#Serial#",$Input1)
    Local $new_html5 = StringReplace ($new_html4,"#Sale#",$Input)

    FileDelete(@ScriptDir & "\Ship LabelV3.html")
    FileWrite(@ScriptDir & "\Ship LabelV3.html",$new_html5)

 

 

 

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...