If a line in script is too long, autoit3 can't handle with it. So this function will cut it by using a variable $Value . ;=============================================================================== ; Description: Export registry key to an autoit script file ; Usage _RegToScript($File, $KeyName [,$ValueName]) ; Parameter(s): $File - The file to write to ; $KeyName - The registry key to export ; $ValueName - The value to export ; Requirement(s): None ; Return Value(s):