How to add apostrophe (") to string?

前端 未结 3 742
终归单人心
终归单人心 2021-01-23 14:19

I have this AutoIt script:

ControlFocus(\"Open\", \"\", \"Edit1\")
Sleep(500)
ControlSetText(\"Open\", \"\", \"Edit1\", $CmdLine[1])
Sleep(500)
ControlClick(\"Op         


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-23 14:51

    Autoit uses pairs quotes to indicate a single instance within a string.

    E.g., """" (notice, there are 4 double quotation marks) acts as a single double-quote within the string.

    So $CmdLine[1] & """" should add a single double-quote.

    See AutoIt's documentation. https://www.autoitscript.com/autoit3/docs/intro/lang_datatypes.htm has a section on strings.

提交回复
热议问题