I think OP wants to generate a command to assign a variable ($My_Password) the password string
if so then the best way would be to use double quotes to escape the single quotes (method 1)
but if OP doesn't like this way then he could replace the quotes with chr(34) (method 2)
If I didn't understand anything then sorry
; BEGIN - Write Test file
Local $My_Password = "R7PIO'24NJ7'5OI2J6'O23L64P23" & '"J624P46P;46Z7PIO2' & "'4NJ75OI2J6O23Y64P23J6" & '"24P"46P;46T7PIO24N' & "'J75OI2J6'O23T64P" & '"23"J624"P46P;46K'
Local $My_Password_File = @ScriptDir & '\My_Password.txt'
FileWrite($My_Password_File, $My_Password)
; END - Write test file
$My_Password = FileRead($My_Password_File)
FileDelete($My_Password_File) ; Remove test file
ConsoleWrite("- " & $My_Password & @CRLF& @CRLf)
; (method 1)
ConsoleWrite('-> $My_Password = "' & StringReplace($My_Password, '"', '""') & '"' & @CRLF)
; (method 2)
ConsoleWrite('-> $My_Password = "' & StringReplace($My_Password, '"', '" & Chr(34) & "') & '"' & @CRLF)