function conversion() { var registrarCode = Project.Variables.code.Value("codeRegister"); var url = "C:\\Users\\vendor_qafusi2\\Documents\\EBAE Upload\\Upload Conversion Script\\conv_to_scripless.conv"; var zip = "C:\\Users\\vendor_qafusi2\\Documents\\EBAE Upload\\Upload Conversion Script\\conv_to_scripless.zip"; var account = Project.Variables.getAccount1.Value("sid1"); var securityCode = Project.Variables.code.Value("instrumenLocalCode"); var certif6 = Project.Variables.certificate.Value("certif6"); var today = new Date(); var dd = String(today.getDate()).padStart(2, '0'); var mm = String(today.getMonth() + 1).padStart(2, '0'); var yyyy = today.getFullYear(); today = yyyy + mm + dd; var template = '\n'+ '\n'+ ''+certif6+'\n'+ ''+registrarCode+'\n'+ ''+account+'\n'+ 'LOCAL\n'+ ''+securityCode+'\n'+ '60\n'+ ''+today+'\n'+ 'DEISSUANCE\n'+ ''+certif6+'\n'+ '151-210\n'+ 'SCRIPLESS\n'+ '123456789\n'+ '\n'+ '' ; if (aqFile.Create(url) == 0) { aqFile.WriteToTextFile(url, template, aqFile.ctUTF8); Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis."); } else { aqFile.Delete(url); aqFile.Delete(zip); if (aqFile.Create(url) == 0) { aqFile.WriteToTextFile(url, template, aqFile.ctUTF8); Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis."); } } }