├── HTM+PDF.bat ├── LICENSE ├── README.md ├── Код.gs └── Шаблоны └── script ├── HTM+PDF.bat ├── curl-ca-bundle.crt ├── curl.exe ├── libcurl-x64.dll ├── mailsend1.19.exe └── СКАНИРОВАТЬ.bat /HTM+PDF.bat: -------------------------------------------------------------------------------- 1 | @echo on 2 | chcp 65001 3 | 4 | rem Инструкция: 5 | rem Заполнить в СуперОкна7 поле КЛИЕНТ: 6 | rem Клиент: ТРИ слова разделённые пробелами 7 | rem Адрес: Строка от 2 до 44 символов 8 | rem Телефон: 11 цифр, перед которыми стоит знак + 9 | 10 | rem Нажать кнопку: 11 | rem Печать > Просмотр > Сохранить > Выберите папку КП! > Файл HTM > 12 | rem Имя файла будет использовано как примечание при создании папки 13 | rem > Сохранить 14 | 15 | rem Перетащите созданный файл HTM на файл HTM+PDF.bat находящийся в той же папке 16 | 17 | 18 | if not "%~x1" == ".htm" if not "%~x2" == ".htm" (echo --- Затащите на этот файл мышкой, файлы HTM и PDF --- && pause && exit) 19 | set "dp0=%~dp0" 20 | @REM FOR /F "tokens=*" %%a IN ('type %dp0:~0,-1%:user.drive.id') DO set "gfid=%%a" 21 | @REM pause 22 | set "gfid=1Ty2o3zAJAvxZM6vZCi7JkSAGbizCZ9Q7" 23 | IF "%~x1" == ".pdf" (start /wait "" "C:\Program Files\SumatraPDF\SumatraPDF.exe" -print-to "HP_M132nw" -print-settings "3x" %~nx1) 24 | IF "%~x2" == ".pdf" (start /wait "" "C:\Program Files\SumatraPDF\SumatraPDF.exe" -print-to "HP_M132nw" -print-settings "3x" %~nx2) 25 | echo --- Выполняется запрос doGet --- 26 | FOR /F "tokens=*" %%a IN ('..\Шаблоны\script\curl.exe -G --data-urlencode "fileName1=%~nx1" --data-urlencode "fileName2=%~nx2" --data-urlencode "folderId=%gfid%" -L "https://script.google.com/macros/s/AKfycby4BQcVGGZeCRyMuHFAbaZKTOX-fVMraCYt7Me7XvthYpWR9YYI8T2RSSj1OKn8LVQR/exec"') DO set "response=%%a" 27 | for /F "tokens=1,2 delims=;" %%a in ("%response%") do ( 28 | timeout 15 && start /wait "Скачивание сформированного договора" ..\Шаблоны\script\curl.exe -L "https://docs.google.com/document/d/%%b/export?exportFormat=pdf" -o Договор.pdf && echo --- Распечатка первой страницы договора --- 29 | start /wait "" "C:\Program Files\SumatraPDF\SumatraPDF.exe" -print-to "HP_M132nw" -print-settings "1,3x" Договор.pdf 30 | rem start /wait "" "C:\Program Files\SumatraPDF\SumatraPDF.exe" -page 1 -print-dialog -exit-when-done Договор.pdf 31 | echo --- Переверните распечатанную страницу договора --- 32 | pause 33 | start /wait "" "C:\Program Files\SumatraPDF\SumatraPDF.exe" -print-to "HP_M132nw" -print-settings "2,3x" Договор.pdf 34 | echo --- После закрытия этого окна запустите файл СКАНИРОВАТЬ.bat --- 35 | echo -!- ЗВОНИ 203: ОКНА, ПОДПИСЬ В ДОГОВОР -!---------------------------------------------- 36 | timeout 20 37 | rem start /wait "" "C:\Program Files\SumatraPDF\SumatraPDF.exe" -page 2 -print-dialog -exit-when-done Договор.pdf 38 | move Договор.pdf "%%a" 39 | explorer /select, "%%a\СКАНИРОВАТЬ.bat" 40 | ) 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ![Maintenance](https://img.shields.io/maintenance/yes/2023) 3 | 4 | # HTM+PDF.bat 5 | Скрипт для создания, распечатки и архивирования договоров на основании КП созданного в программе СуперОкна7 6 | 7 | Инструкция: 8 | Заполнить в СуперОкна7 поле КЛИЕНТ: 9 | Клиент: ТРИ слова разделённые пробелами 10 | Адрес: Строка от 2 до 44 символов 11 | Телефон: 11 цифр, перед которыми стоит знак + 12 | 13 | Нажать кнопку: 14 | Печать > Просмотр > Сохранить > Выберите папку КП! > Файл HTM > 15 | Имя файла будет использовано как примечание при создании папки > Сохранить 16 | 17 | Перетащите созданный файл HTM на файл HTM+PDF.bat находящийся в той же папке 18 | -------------------------------------------------------------------------------- /Код.gs: -------------------------------------------------------------------------------- 1 | function doGet(e) { 2 | var ss = SpreadsheetApp.getActiveSpreadsheet(); 3 | var s = ss.getSheets()[0]; 4 | // var lastCell = s.getRange(s.getLastRow(), s.getLastColumn()); 5 | // lastCell.setValue(123); 6 | var sortedFiles = sortHtmPdf(e); 7 | var tmpSS = copyHtmTmp(sortedFiles[0]).setTrashed(true); 8 | var tmpS = SpreadsheetApp.openById(tmpSS.getId()).getSheets()[0]; 9 | var objHTM = readHTM(tmpS); 10 | if (objHTM == null) return ContentService.createTextOutput(sortedFiles[0]); 11 | var resp = prepareDir(DriveApp.getFolderById(e.parameter.folderId), objHTM, sortedFiles); 12 | writeRow(s,objHTM); 13 | addPhone(objHTM); 14 | var row = s.getLastRow() + 1; 15 | return ContentService.createTextOutput(resp); 16 | } 17 | 18 | function addPhone(objHTM) { 19 | var contact = ContactsApp.createContact(null, null, null); 20 | contact.setGivenName("КПо-"+objHTM.KPnm+"⎯"+objHTM.feeo.join(" ")+"⎯"+objHTM.date.reverse().join(".")); 21 | contact.addPhone(ContactsApp.Field.MOBILE_PHONE, objHTM.phon); 22 | ContactsApp.getContactGroup("System Group: My Contacts").addContact(contact) 23 | } 24 | 25 | function prepareDoc(template, objHTM) { 26 | var months = ["", "Января", "Февраля", "Марта", "Апреля", "Мая", "Июня", "Июля", 27 | "Августа", "Сентября", "Октября", "Ноября", "Декабря"]; 28 | var docbody=DocumentApp.openById(template.getId()).getBody(); 29 | docbody.replaceText('OOO', objHTM.KPnm); 30 | docbody.replaceText(' 21 ', ' ' + objHTM.date[2] + ' '); 31 | docbody.replaceText('Декабря', months[objHTM.date[1]]); 32 | docbody.replaceText('2012', objHTM.date[0]); 33 | docbody.replaceText('Договоров', objHTM.feeo[0]); 34 | docbody.replaceText('Шаблон', objHTM.feeo[1]); 35 | docbody.replaceText('Распечатович', objHTM.feeo[2]); 36 | docbody.replaceText('Дoговоров_Шаблoн_Распечатoвич', objHTM.feeo.join(" ")); 37 | docbody.replaceText('3я_улСтроителей_д25_кв12', objHTM.addr); 38 | docbody.replaceText("78005553535", objHTM.phon.split("+")[1]); 39 | } 40 | 41 | function prepareDir(folderKP,objHTM,sortedFiles) { 42 | var oldFolder = folderKP.searchFolders('title contains "КП-'+objHTM.KPnm+'"'); 43 | // Перемещение старых папок в Архив 44 | while (oldFolder.hasNext()) { 45 | DriveApp.getFileById(oldFolder.next().getId()).moveTo(DriveApp.getFolderById("1r3nvqyf2V98Oc8dVJ1e-TjhqrmWUk-lB")) 46 | // folder.setTrashed(true); //Access Denied 47 | } 48 | var newFolderName = (objHTM.date.reverse().join(".")+" КП-"+objHTM.KPnm+" "+objHTM.price+" "+sortedFiles[0].getName().slice(0,-4)).slice(2); 49 | var newFolder = folderKP.createFolder(newFolderName); 50 | DriveApp.getFileById('1-4djyun2Q03E6md9WW6vaaFQmq7DJnOS').makeCopy(newFolder); // Скан.bat 51 | var template = DriveApp.getFileById('1kfA9ykGCBH4FI4beOx9Y0FPPLObXJu8IVrX-aQZzJlI').makeCopy("Договор-"+objHTM.KPnm+" "+objHTM.feeo[0],newFolder); 52 | if (sortedFiles[1] != null) sortedFiles[1].makeCopy("КП-"+objHTM.KPnm+" "+objHTM.feeo[0]+".pdf",newFolder); 53 | prepareDoc(template, objHTM); 54 | return (newFolderName+";"+template.getId()); 55 | } 56 | 57 | function readHTM(tmpS) { 58 | var objHTM = {}; 59 | var range = tmpS.getRange("A1:D5"); 60 | if (range.getValues()[2][0] != "Плательщик:") return (null); 61 | 62 | objHTM.feeo = range.getValues()[3][1].split(" ИНН")[0].split(" "); 63 | if (objHTM.feeo.length != 3) return (null); 64 | 65 | objHTM.date = range.getValues()[0][0].split(" ")[1].split(".") 66 | if (objHTM.date[2] < 2000 || 2222 < objHTM.date[2]) return (null); 67 | 68 | objHTM.KPnm = range.getValues()[1][0].split("№ ")[1]; 69 | if (objHTM.KPnm < 1 || 999 < objHTM.KPnm) return (null); 70 | 71 | objHTM.addr = range.getValues()[3][0]; 72 | if (objHTM.addr.length < 2 || 44 < objHTM.addr.length) return (null); 73 | 74 | objHTM.phon = range.getValues()[4][1].split("Тел. ")[1].split(" Факс")[0] 75 | if (objHTM.phon.length != 12 || objHTM.phon[0] != "+") return (null); 76 | 77 | var vseItogo = tmpS.getRange("A:A").createTextFinder('Итого').findAll(); 78 | objHTM.price = tmpS.getRange(vseItogo[vseItogo.length-1].getRow(), 2).getValue().split(" руб.")[0]; 79 | 80 | tmpS.getRange("E2").setFormula('=IFS(COUNTIFS(A:A;"Цвет")=COUNTIFS(A:A;"Цвет";B:B;"");3;COUNTIFS(A:A;"Цвет";B:B;"*Лам*") > 0; 30;COUNTIFS(A:A;"Цвет";B:B;"*Лам*") = 0; 15)'); 81 | objHTM.ddln = tmpS.getRange("E2").getValue() 82 | 83 | 84 | return (objHTM) 85 | } 86 | 87 | function writeRow(s,objHTM) { 88 | var row = s.getLastRow() + 1; 89 | s.getRange("A" + row).setValue(objHTM.feeo.join(" ")); 90 | s.getRange("B" + row).setValue("КП-"+objHTM.KPnm+"\n"+objHTM.phon); 91 | s.getRange("C" + row).setValue("⎯⎯⎯⎯"); 92 | s.getRange("D" + row).setFormula((objHTM.ddln < 30) ? "=WORKDAY($K"+row+";"+objHTM.ddln+")" : "=$K"+row+"+"+objHTM.ddln); 93 | s.getRange("E" + row).setFormula((objHTM.ddln < 30) ? "=WORKDAY($K"+row+";"+objHTM.ddln+")" : "=$K"+row+"+"+objHTM.ddln); 94 | // s.getRange("E" + row).setValue("⎯⎯⎯⎯⎯"); 95 | 96 | s.getRange("F" + row).setValue("⎯⎯⎯⎯⎯"); 97 | s.getRange("G" + row).setValue("⎯⎯⎯⎯⎯"); 98 | s.getRange("I" + row).setValue(objHTM.addr); 99 | s.getRange("K" + row).setValue(objHTM.date.join(".")); 100 | s.getRange("H" + row).setValue(objHTM.price); 101 | s.getRange("J"+row).setFormula("=$J"+(row-1)+"+1"); 102 | s.getRange("L"+row).setFormula('=SUMIFS(H:H;K:K;(">="&TEXT(EDATE(K:K;0);"MM/YYYY"));K:K;"<"&TEXT(EDATE(K:K;1);"MM/YYYY"))'); 103 | s.getRange("M"+row).setFormula('=SUMIFS(H:H;K:K;">=1/"&YEAR(K:K);K:K;"<1/"&YEAR(K:K)+1)'); 104 | s.getRange("N"+row).setFormula('=SUM(H:H)'); 105 | s.getRange((row-1)+":"+(row-1)).copyTo(s.getRange((row)+":"+(row)), {formatOnly:true}) 106 | return (objHTM); 107 | } 108 | 109 | function sortHtmPdf(e) { 110 | var folder = DriveApp.getFolderById(e.parameter.folderId); 111 | var aFN = [e.parameter.fileName1, e.parameter.fileName2]; 112 | if (aFN[0].slice(-4).toLowerCase() == ".htm" && aFN[1].slice(-4).toLowerCase() != ".htm") { 113 | aFN = [ 114 | (folder.searchFiles('title contains "'+aFN[0]+'"').hasNext() ? folder.searchFiles('title contains "'+aFN[0]+'"').next() : null), 115 | (aFN[1].slice(-4).toLowerCase() == ".pdf" && folder.searchFiles('title contains "'+aFN[1]+'"').hasNext()) ? folder.searchFiles('title contains "'+aFN[1]+'"').next() : null]; 116 | } else if (aFN[0].slice(-4).toLowerCase() != ".htm" && aFN[1].slice(-4).toLowerCase() == ".htm") { 117 | aFN = [ 118 | (folder.searchFiles('title contains "'+aFN[1]+'"').hasNext() ? folder.searchFiles('title contains "'+aFN[1]+'"').next() : null), 119 | (aFN[0].slice(-4).toLowerCase() == ".pdf" && folder.searchFiles('title contains "'+aFN[0]+'"').hasNext()) ? folder.searchFiles('title contains "'+aFN[0]+'"').next() : null]; 120 | } else { 121 | Logger.log("Нет HTM"); 122 | aFN = ([null, null]); 123 | } 124 | return (aFN); 125 | } 126 | 127 | function copyHtmTmp(source) { 128 | var tmpXLSX = Drive.Files.insert({title: "tmpXLSX", mimeType: (MimeType.MICROSOFT_EXCEL)}, source.getBlob()); 129 | DriveApp.getFileById(tmpXLSX.id).setTrashed(true); 130 | // DriveApp.createFile('New HTML File', source.getBlob(), MimeType.MICROSOFT_EXCEL); 131 | 132 | var tmpHTM = Drive.Files.copy({title: 'tmpHTM'}, tmpXLSX.id, {convert: true}); 133 | return (DriveApp.getFileById(tmpHTM.getId())); 134 | } 135 | 136 | // https://docs.google.com/spreadsheets/d/1T1Gn-XeexJsnbZ4C6XOHQ_8D637JsoyoEFi84Xjkao4/export?exportFormat=pdf&gid=0&range=A:H&top_margin=0.25&bottom_margin=0.25&left_margin=0.3&right_margin=0.2 137 | 138 | -------------------------------------------------------------------------------- /Шаблоны/script/HTM+PDF.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 3 | 4 | rem Инструкция: 5 | rem Заполнить в СуперОкна7 поле КЛИЕНТ: 6 | rem Клиент: ТРИ слова разделённые пробелами 7 | rem Адрес: Строка от 2 до 44 символов 8 | rem Телефон: 11 цифр, перед которыми стоит знак + 9 | 10 | rem Нажать кнопку: 11 | rem Печать > Просмотр > Сохранить > Выберите папку КП! > Файл HTM > 12 | rem Имя файла будет использовано как примечание при создании папки 13 | rem > Сохранить 14 | 15 | rem Перетащите созданный файл HTM на файл HTM+PDF.bat находящийся в той же папке 16 | 17 | 18 | if not "%~x1" == ".htm" if not "%~x2" == ".htm" (echo --- Затащите на этот файл мышкой, файлы HTM и PDF --- && pause && exit) 19 | set "dp0=%~dp0" 20 | FOR /F "tokens=*" %%a IN ('type %dp0:~0,-1%:user.drive.id') DO set "gfid=%%a" 21 | IF "%~x1" == ".pdf" (start /wait "" "C:\Program Files\SumatraPDF\SumatraPDF.exe" -print-to "HP_M132nw" -print-settings "3x" %~nx1) 22 | IF "%~x2" == ".pdf" (start /wait "" "C:\Program Files\SumatraPDF\SumatraPDF.exe" -print-to "HP_M132nw" -print-settings "3x" %~nx2) 23 | echo --- Выполняется запрос doGet --- 24 | FOR /F "tokens=*" %%a IN ('..\Шаблоны\script\curl.exe -G --data-urlencode "fileName1=%~nx1" --data-urlencode "fileName2=%~nx2" --data-urlencode "folderId=%gfid%" -L "https://script.google.com/macros/s/AKfycbxYDA4ngMOHdLyiBpS3jegwI1Q4Ox8I84dvk1EX/exec"') DO set "response=%%a" 25 | for /F "tokens=1,2 delims=;" %%a in ("%response%") do ( 26 | start /wait "Скачивание сформированного договора" ..\Шаблоны\script\curl.exe -L "https://docs.google.com/document/d/%%b/export?exportFormat=pdf" -o Договор.pdf 27 | echo --- Распечатка первой страницы договора --- 28 | start /wait "" "C:\Program Files\SumatraPDF\SumatraPDF.exe" -print-to "HP_M132nw" -print-settings "1,3x" Договор.pdf 29 | rem start /wait "" "C:\Program Files\SumatraPDF\SumatraPDF.exe" -page 1 -print-dialog -exit-when-done Договор.pdf 30 | echo --- Переверните распечатанную страницу договора --- 31 | pause 32 | start /wait "" "C:\Program Files\SumatraPDF\SumatraPDF.exe" -print-to "HP_M132nw" -print-settings "2,3x" Договор.pdf 33 | echo --- После закрытия этого окна запустите файл СКАНИРОВАТЬ.bat --- 34 | timeout 20 35 | rem start /wait "" "C:\Program Files\SumatraPDF\SumatraPDF.exe" -page 2 -print-dialog -exit-when-done Договор.pdf 36 | move Договор.pdf "%%a" 37 | explorer /select, "%%a\СКАНИРОВАТЬ.bat" 38 | ) 39 | -------------------------------------------------------------------------------- /Шаблоны/script/curl.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bacek97/MKGo-GAppsScript_AHK/37c7b90d5f9ed0b45a9034196f486abb17700451/Шаблоны/script/curl.exe -------------------------------------------------------------------------------- /Шаблоны/script/libcurl-x64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bacek97/MKGo-GAppsScript_AHK/37c7b90d5f9ed0b45a9034196f486abb17700451/Шаблоны/script/libcurl-x64.dll -------------------------------------------------------------------------------- /Шаблоны/script/mailsend1.19.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bacek97/MKGo-GAppsScript_AHK/37c7b90d5f9ed0b45a9034196f486abb17700451/Шаблоны/script/mailsend1.19.exe -------------------------------------------------------------------------------- /Шаблоны/script/СКАНИРОВАТЬ.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bacek97/MKGo-GAppsScript_AHK/37c7b90d5f9ed0b45a9034196f486abb17700451/Шаблоны/script/СКАНИРОВАТЬ.bat --------------------------------------------------------------------------------