22.04.15 — 12:35
пишу так
ScrptCtrl = новый COMОбъект(«MSScriptControl.ScriptControl»);
ScrptCtrl.Language=»JScript»;
ScrptCtrl.AddCode(»
|apiSignature(String userId, String key, String nonce, String secret) throws Exception
|{
| String data = userId+key+nonce;
| Mac hmacSha256 = Mac.getInstance(‘HmacSHA256’);
| SecretKeySpec secretKey = new SecretKeySpec(secret.getBytes(), ‘HmacSHA256’);
| hmacSha256.init(secretKey);
| return Hex.encodeHexString(hmacSha256.doFinal(data.getBytes())).toUpperCase();
|}»);
signature = ScrptCtrl.Eval(«apiSignature(‘» + userid + «‘,» + api_key + «‘,» + nonce + «‘,» + secret + «‘)»);
выдает ошибку
{ВнешняяОбработка.ПолучитьВокеров.МодульОбъекта(55)}: Ошибка при вызове метода контекста (AddCode)
ScrptCtrl.AddCode(»
по причине:
Произошла исключительная ситуация (Ошибка компиляции Microsoft JScript): Предполагается наличие ‘)’
1 — 22.04.15 — 12:43
(0) А кто тебе сказал, что MSScriptControl в сосотянии выполнять код Java? Он может выполнить JavaScript или VB, но ни как не Java
Ну и причина синтаксической ошибки в том, что внутри строки кавычки нужно дублировать:
ПереМенная = «вот сейчас будет кавычка «»внутри»» строки»
2 — 22.04.15 — 12:54
JS <> Java, или в заголовке очепятка?
3 — 22.04.15 — 12:58
(2) Java
мне надо получить сигнатуру, путем шифрования с секретом
на сайте дана такая функция
Example (Java):
public static String apiSignature(String userId, String key, String nonce, String secret) throws Exception {
String data = userId+key+nonce;
Mac hmacSha256 = Mac.getInstance(«HmacSHA256»);
SecretKeySpec secretKey = new SecretKeySpec(secret.getBytes(), «HmacSHA256»);
hmacSha256.init(secretKey);
return Hex.encodeHexString(hmacSha256.doFinal(data.getBytes())).toUpperCase();
}
4 — 22.04.15 — 13:00
(3) код java можно установив java машину выполнять практически на любой железке
т.е. выкинь «MSScriptControl»
5 — 22.04.15 — 13:01
(4)+ правильно будет наваять на java (раз есть код частично готовый) прогу (консольную) и вызывать/запускать ее с параметрами из 1С, потом результат откуда нуна забирать
6 — 22.04.15 — 13:02
(3) ты это можешь выполнить из 1С только путем КомандаСистемы(«javac.exe pathtoapplet»)
MSScriptControl это выполнить не может
7 — 22.04.15 — 13:03
(5)+ да эту прогу на java наваянную раз 1С 8.X засунуть в двоичные данные еще можно и перед запуском сохраняешь в темп и там запускаешь
8 — 22.04.15 — 14:24
Рассчитал подпись на одном онлайн сайте, отправил ее на мой сервер, а он все равно отвечает
{«code»:-7,»message»:»Signature error»}
отправляю так
signature = МодульBTCE.ЗашифроватьSHA256(userId + api_key + nonce, secret);
ПостСообщение =
«key=» + api_key +
«&nonce=» + nonce +
«&signature=» + signature;//+
// «&pageEnable=0» +
// «&page=1» +
// «&pageSize=100»;
ИмяФайлаИсх = ПолучитьИмяВременногоФайла();
ДлинаСообщения = МодульBTCE.ЗаписатьСтрокуВФайлUTF8безBOM(ИмяФайлаИсх, ПостСообщение);
HTTPЗапрос = Новый HTTPЗапрос;
//HTTPЗапрос.АдресРесурса = «api/workers.htm»;
HTTPЗапрос.АдресРесурса = «api/poolStats.htm»;
HTTPЗапрос.Заголовки.Вставить(«Content-Type», «application/x-www-form-urlencoded»);
HTTPЗапрос.Заголовки.Вставить(«Content-Length», ДлинаСообщения);
HTTPЗапрос.УстановитьИмяФайлаТела(ИмяФайлаИсх);
Соединение = Новый HTTPСоединение(«antpool.com»,,,,, 5, Новый ЗащищенноеСоединениеOpenSSL);
ОтветHTTP = Соединение.ОтправитьДляОбработки(HTTPЗапрос);
Ответ = ОтветHTTP.ПолучитьТелоКакСтроку();
9 — 22.04.15 — 14:25
в чем может быть косяк? спросить у китайцев не получается
10 — 22.04.15 — 14:31
(9) в чем косяк-то?
11 — 22.04.15 — 15:01
косяк в том, что API отвечает что не верная сигнатура
{«code»:-7,»message»:»Signature error»}
хотя я ее рассчитал в онлайн шифровальщике, с моим расчетом полностью совпадает
12 — 23.04.15 — 00:53
А в 1С, насколько я помню, есть обращение к криптопровайдерам.
Потом, не забываем, что все сигнатуры требуют, чтобы строки были в кодировке UTF-8, а не двухбайтовые, как в 1С, JavaScript и т.п.
P.S. можно скачать библиотеку javascript с генератором подписей и перевести её на 1С.
(У меня, например, где-то sha256 на VbScript валяется — сам писал — ничего там сложного нет).
13 — 23.04.15 — 01:00
Sha256 можно получить средствами 1С (если речь идёт именно об этом)
Torquader
14 — 23.04.15 — 01:14
(13) Да у него всё равно там в кавычках ошибка, да и про метод Call он явно не знает.

- Remove From My Forums
-
Question
-
Trying to learn NodeJS. Working through a tutorial. Worked the first few times I ran the script then rebooted. Hasn’t worked since. I get the following error:
Script: C:Users..myfirst.js
Line: 4
Char: 3
Error: Expected ‘;’
Code: 800A03EC
Source: Microsoft JScript compilation error
Script is simple «Hello World» script cut and pasted from tutorial web page.
All replies
-
-
Edited by
Tuesday, July 4, 2017 6:35 AM
-
Proposed as answer by
Mary Dong
Wednesday, July 12, 2017 9:14 AM
-
Edited by
-
Hi!
Thanks for sharing the post.
I’m having the same issues below;
Script: C:projectstesexercise2.js
Line 1
Char 12
Error Expected;
Code 800A03EC
SourceL Microsoft JScrip compilation error
Anytime when <g class=»gr_ gr_103 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace» data-gr-id=»103″ id=»103″>i’m</g> trying to open any script from my sublime text, I’m getting
this error as I believe both Microsoft <g class=»gr_ gr_267 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace» data-gr-id=»267″ id=»267″>JScrip</g> and sublime test(.js) trying to
open up at the same time.? I’m not sure what the issues are here, but I have disabled and enabled the Microsoft JScript but still having the same issue.Please help!!
-
Hi! Were you able to resolve the issue?
I’m having the same issue when I’m trying to open up files(sublime .js) but having some sort of conflict with Microsoft JScript. I’ve also tried enabling and disabling the Microsoft Script but still wouldn’t work.
Please help if you were able to resolve!
Thank you!
-
The proposed answer, above, still applies. This is not the best forum to use for your query. As described in the sticky note at the beginning of this forum (https://social.technet.microsoft.com/Forums/en-US/9ce53966-49bb-48fe-b195-2652ad8d09d9/purpose-of-this-forum-server-general-please-read-before-posting-?forum=winservergen),
this forum is for general questions about Windows Server. You question is about specific developer topic. You will reach more experts by posting such queries to a developer forum such as posted by Mary.
tim
The solution apply for those who are facing Windows script Error code like 800A03EA. For those, who are unable to open js file and facing error like Windows Script Host.
I was stuck with the same problem for couple of days while working on react.
We have three methods of solving this problem:
Method 1:
Check your computer for viruses and remove them using various method like download MSERT.exe from Microsoft.
Method 2:
Open command prompt as administrator and type following 2 commands:
regsvr32 jscript.dll and press ENTER.
regsvr32 vbscript.dll and press ENTER.
Method 3:
Type internet option on search bar and select it.
Open advance gtab from it and go to security section.
Make sure all of the below ones are selected:
Use SSL 3.0
Use TLS 1.0
Use TLS 1.1
Use TLS 1.2
Method 4:
The workaround that must work 100% but as you know it might be helpful for all, as it only open file do not confuse read the following lines
So simply left click on file and edit and open it.
It will open in notepad and now from here you can transfer your data or use it.😁
Thanks me later for this detail answer. Now just rock the world!!!!!
| Номер | Описание | |
|---|---|---|
| 5 | Invalid procedure call or argument | Недопустимый вызов или аргумент процедуры |
| 6 | Overflow | Переполнение |
| 7 | Out of memory | Недостаточно памяти |
| 9 | Subscript out of range | Индекс выходит за пределы допустимого диапазона |
| 10 | This array is fixed or temporarily locked | Массив имеет фиксированную длину или временно блокирован |
| 11 | Division by zero | Деление на 0 |
| 13 | Type mismatch | Несоответствие типа |
| 14 | Out of string space | Недостаточно памяти для строки |
| 17 | Can’t perform requested operation | Невозможно выполнить требуемую операцию |
| 28 | Out of stack space | Недостаточно места в стеке |
| 35 | Sub or Function not defined | Процедура Sub или Function не определена |
| 48 | Error in loading DLL | Ошибка при загрузке DLL |
| 51 | Internal error | Внутренняя ошибка |
| 52 | Bad file name or number | Недопустимое имя или номер файла |
| 53 | File not found | Файл не найден |
| 54 | Bad file mode | Недопустимый режим файла |
| 55 | File already open | Файл уже открыт |
| 57 | Device I/O error | Ошибка устройства ввода-вывода |
| 58 | File already exists | Файл уже существует |
| 61 | Disk full | Диск переполнен |
| 62 | Input past end of file | Ввод данных за пределами файла |
| 67 | Too many files | Слишком много файлов |
| 68 | Device unavailable | Нет доступа к устройству |
| 70 | Permission denied | Разрешение отклонено |
| 71 | Disk not ready | Диск не готов |
| 74 | Can’t rename with different drive | Невозможно переименование с другим именем диска |
| 75 | Path/File access error | Ошибка доступа к файлу/каталогу |
| 76 | Path not found | Путь не найден |
| 91 | Object variable or With block variable not set | Объектная переменная или переменная блока With не задана |
| 92 | For loop not initialized | Цикл For не инициализирован |
| 94 | Invalid use of Null | Недопустимое использование Null |
| 322 | Can’t create necessary temporary file | Невозможно создание требуемого временного файла |
| 424 | Object required | Требуется объект |
| 429 | Automation server can’t create object | Невозможно создание объекта сервером программирования объектов |
| 430 | Class doesn’t support Automation | Класс не поддерживает программирование объектов |
| 432 | File name or class name not found during Automation operation | Не найдено имя файла или класса при операции программирования объектов |
| 438 | Object doesn’t support this property or method | Объект не поддерживает это свойство или метод |
| 440 | Automation error | Ошибка программирования объектов |
| 445 | Object doesn’t support this action | Команда не поддерживается объектом |
| 446 | Object doesn’t support named arguments | Объект не поддерживает именованные аргументы |
| 447 | Object doesn’t support current locale setting | Объект не поддерживает текущую национальную настройку |
| 448 | Named argument not found | Именованный аргумент не найден |
| 449 | Argument not optional | Обязательный аргумент |
| 450 | Wrong number of arguments or invalid property assignment | Недопустимое число аргументов или присвоение значения свойства |
| 451 | Object not a collection | Объект не является семейством |
| 453 | Specified DLL function not found | Указанная функция DLL не найдена |
| 458 | Variable uses an Automation type not supported in JScript | Переменная использует не поддерживаемый в JScript тип программирования объектов |
| 462 | The remote server machine does not exist or is unavailable | Удаленный сервер не существует или недоступен |
| 501 | Cannot assign to variable | Присвоение значения переменной невозможно |
| 502 | Object not safe for scripting | Применение объекта в сценариях небезопасно |
| 503 | Object not safe for initializing | Инициализация объекта небезопасна |
| 504 | Object not safe for creating | Создание объекта небезопасно |
| 507 | An exception occurred | Произошло исключение |
| 4096 | Microsoft JScript compilation error | Ошибка компиляции Microsoft JScript |
| 4097 | Microsoft JScript runtime error | Ошибка выполнения Microsoft JScript |
| 4098 | Unknown runtime error | Неизвестная ошибка выполнения |
| 5000 | Cannot assign to ‘this’ | Невозможно присвоение значения ‘this’ |
| 5001 | Number expected | Предполагается наличие числа |
| 5002 | Function expected | Предполагается наличие функции |
| 5003 | Cannot assign to a function result | Невозможно присвоение результату функции |
| 5004 | Cannot index object | Невозможно индексирование объекта |
| 5005 | String expected | Предполагается наличие строки |
| 5006 | Date object expected | Предполагается наличие объекта-даты |
| 5007 | Object expected | Предполагается наличие объекта |
| 5008 | Illegal assignment | Недопустимое присвоение |
| 5009 | Undefined identifier | Неопределенный идентификатор |
| 5010 | Boolean expected | Предполагается наличие логического значения |
| 5011 | Can’t execute code from a freed script | Не удается выполнить программу из освобожденного сценария |
| 5012 | Object member expected | Предполагается наличие компонента объекта |
| 5013 | VBArray expected | Предполагается наличие VBArray |
| 5014 | JScript object expected | Предполагается наличие объекта JScript |
| 5015 | Enumerator object expected | Предполагается наличие объекта Enumerator |
| 5016 | Regular Expression object expected | Предполагается наличие объекта регулярного выражения |
| 5017 | Syntax error in regular expression | Ошибка синтаксиса в регулярном выражении |
| 5018 | Unexpected quantifier | Неизвестный числовой показатель |
| 5019 | Expected ‘]’ in regular expression | Предполагается наличие ‘]’ в регулярном выражении |
| 5020 | Expected ‘)’ in regular expression | Предполагается наличие ‘)’ в регулярном выражении |
| 5021 | Invalid range in character set | Недопустимый диапазон в наборе символов |
| 5022 | Exception thrown and not caught | Исключение сгенерировано и не обработано |
| 5023 | Function does not have a valid prototype object | Функция не имеет правильного объекта- прототипа |
| 5024 | The URI to be encoded contains an invalid character | Кодируемый URI содержит недопустимый символ |
| 5025 | The URI to be decoded is not a valid encoding | Декодируемый URI имеет неверную кодировку |
| 5026 | The number of fractional digits is out of range | Недопустимое число цифр дробной части |
| 5027 | The precision is out of range | Недопустимое значение точности |
| 5028 | Array of arguments object expected | Предполагается наличие объекта массив аргументов |
| 5029 | Array length must be a finite positive integer | Длина массива должна быть целым положительным числом |
| 5030 | Array length must be assigned a finite positive number | Длине массива должна быть присвоено целое положительное число |
| 5031 | Array object expected | Предполагается наличие объекта Array |
|
userook 5 / 5 / 2 Регистрация: 24.08.2015 Сообщений: 302 |
||||
|
1 |
||||
Ошибка. Предполагается наличие ‘)’23.08.2018, 10:28. Показов 8172. Ответов 11 Метки нет (Все метки)
Здравствуйте, IE выдает ошибку в
«Предполагается наличие ‘)’ »
__________________
0 |
|
Qwerty_Wasd dev — investigator
2148 / 1493 / 651 Регистрация: 16.04.2016 Сообщений: 3,696 |
||||
|
23.08.2018, 11:32 |
2 |
|||
|
userook,
А вот тут можно почитать, о том, что передается в метод — http://api.jquery.com/slidetoggle/
1 |
|
5 / 5 / 2 Регистрация: 24.08.2015 Сообщений: 302 |
|
|
23.08.2018, 16:01 [ТС] |
3 |
|
jQuery(‘#searchgo’).slideToggle(0.00000001); Тогда в хроме «Uncaught SyntaxError: Octal literals are not allowed in strict mode.»
0 |
|
Qwerty_Wasd dev — investigator
2148 / 1493 / 651 Регистрация: 16.04.2016 Сообщений: 3,696 |
||||||||||||
|
23.08.2018, 18:12 |
4 |
|||||||||||
|
userook, Такая ошибка выскочит, если использовать Ваш вариант. Так как в нем Вы пытаетесь передать восьмеричное число в качестве параметра, заменив один из нолей буквой «o» — смотрим скрин. Песочница => https://codepen.io/qwerty_wasd/pen/bxVGXo
Миниатюры
1 |
|
5 / 5 / 2 Регистрация: 24.08.2015 Сообщений: 302 |
|
|
23.08.2018, 20:16 [ТС] |
5 |
|
У меня в начале скрипта ‘use strict’; стоит из-за этого и ошибка. А как переписать тогда slideToggle(0.00000001); я хз
0 |
|
Qwerty_Wasd dev — investigator
2148 / 1493 / 651 Регистрация: 16.04.2016 Сообщений: 3,696 |
||||
|
23.08.2018, 21:57 |
6 |
|||
|
userook, нет ошибка не из-за этого. Пройдите в песочницу снова, я сменил режим на строгий, чтобы Вы могли убедиться сами в отсутствии ошибки. Специально для Вас, сделал страницу и опробовал c EDGE до IE9 —
Миниатюры
2 |
|
5 / 5 / 2 Регистрация: 24.08.2015 Сообщений: 302 |
|
|
24.08.2018, 01:10 [ТС] |
7 |
|
Да… у меня нету ошибки на «кодепен», но на своем сайте она появляется, а если я убираю ‘use strict’; — исчезает. Из этого я сделал вывод, что виноват — ‘use strict’;
0 |
|
dev — investigator
2148 / 1493 / 651 Регистрация: 16.04.2016 Сообщений: 3,696 |
|
|
24.08.2018, 06:49 |
8 |
|
userook, он-то как раз не виноват
1 |
|
5 / 5 / 2 Регистрация: 24.08.2015 Сообщений: 302 |
|
|
24.08.2018, 09:41 [ТС] |
9 |
|
возможно где-то есть то, что нельзя использовать в нем А как такое может быть «где-то» если он указывает конкретно на эту строку?
0 |
|
dev — investigator
2148 / 1493 / 651 Регистрация: 16.04.2016 Сообщений: 3,696 |
|
|
24.08.2018, 10:07 |
10 |
|
userook, Я же наглядно продемонстрировал Вам что не в ней дело, скорее всего это цепочка ошибок, которая и затрагивает данную конструкцию. Если кроме указания ошибки в консоли Вас все устраивает, отключите строгий режим, если нет, то прошу Вас воспользоваться рекомендациями в пункте 4 Правил Форума и составить минимальный пример, демонстрирующим Вашу проблему. Чтобы мы на кофейной гуще не гадали почему у Вас ошибка, а у меня нет.
1 |
|
5 / 5 / 2 Регистрация: 24.08.2015 Сообщений: 302 |
|
|
25.08.2018, 09:21 [ТС] |
11 |
|
я просто изменил значение на slideToggle(200) и работает без ошибок, просто я не понимаю зачем там было указано slideToggle(0.00000001)
0 |
|
dev — investigator
2148 / 1493 / 651 Регистрация: 16.04.2016 Сообщений: 3,696 |
|
|
25.08.2018, 12:22 |
12 |
|
Решениеuserook,
зачем там было указано ну… я тоже не знаю. Это только у автора кода можно узнать, какую цель он преследовал. Впрочем это не важно. У Вас все получилось как Вы хотели?
0 |

- Remove From My Forums
-
Question
-
Trying to learn NodeJS. Working through a tutorial. Worked the first few times I ran the script then rebooted. Hasn’t worked since. I get the following error:
Script: C:Users..myfirst.js
Line: 4
Char: 3
Error: Expected ‘;’
Code: 800A03EC
Source: Microsoft JScript compilation error
Script is simple «Hello World» script cut and pasted from tutorial web page.
All replies
-
-
Edited by
Tuesday, July 4, 2017 6:35 AM
-
Proposed as answer by
Mary Dong
Wednesday, July 12, 2017 9:14 AM
-
Edited by
-
Hi!
Thanks for sharing the post.
I’m having the same issues below;
Script: C:projectstesexercise2.js
Line 1
Char 12
Error Expected;
Code 800A03EC
SourceL Microsoft JScrip compilation error
Anytime when <g class=»gr_ gr_103 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace» data-gr-id=»103″ id=»103″>i’m</g> trying to open any script from my sublime text, I’m getting
this error as I believe both Microsoft <g class=»gr_ gr_267 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace» data-gr-id=»267″ id=»267″>JScrip</g> and sublime test(.js) trying to
open up at the same time.? I’m not sure what the issues are here, but I have disabled and enabled the Microsoft JScript but still having the same issue.Please help!!
-
Hi! Were you able to resolve the issue?
I’m having the same issue when I’m trying to open up files(sublime .js) but having some sort of conflict with Microsoft JScript. I’ve also tried enabling and disabling the Microsoft Script but still wouldn’t work.
Please help if you were able to resolve!
Thank you!
-
The proposed answer, above, still applies. This is not the best forum to use for your query. As described in the sticky note at the beginning of this forum (https://social.technet.microsoft.com/Forums/en-US/9ce53966-49bb-48fe-b195-2652ad8d09d9/purpose-of-this-forum-server-general-please-read-before-posting-?forum=winservergen),
this forum is for general questions about Windows Server. You question is about specific developer topic. You will reach more experts by posting such queries to a developer forum such as posted by Mary.
tim

- Remove From My Forums
-
Question
-
Trying to learn NodeJS. Working through a tutorial. Worked the first few times I ran the script then rebooted. Hasn’t worked since. I get the following error:
Script: C:Users..myfirst.js
Line: 4
Char: 3
Error: Expected ‘;’
Code: 800A03EC
Source: Microsoft JScript compilation error
Script is simple «Hello World» script cut and pasted from tutorial web page.
All replies
-
-
Edited by
Tuesday, July 4, 2017 6:35 AM
-
Proposed as answer by
Mary Dong
Wednesday, July 12, 2017 9:14 AM
-
Edited by
-
Hi!
Thanks for sharing the post.
I’m having the same issues below;
Script: C:projectstesexercise2.js
Line 1
Char 12
Error Expected;
Code 800A03EC
SourceL Microsoft JScrip compilation error
Anytime when <g class=»gr_ gr_103 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace» data-gr-id=»103″ id=»103″>i’m</g> trying to open any script from my sublime text, I’m getting
this error as I believe both Microsoft <g class=»gr_ gr_267 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace» data-gr-id=»267″ id=»267″>JScrip</g> and sublime test(.js) trying to
open up at the same time.? I’m not sure what the issues are here, but I have disabled and enabled the Microsoft JScript but still having the same issue.Please help!!
-
Hi! Were you able to resolve the issue?
I’m having the same issue when I’m trying to open up files(sublime .js) but having some sort of conflict with Microsoft JScript. I’ve also tried enabling and disabling the Microsoft Script but still wouldn’t work.
Please help if you were able to resolve!
Thank you!
-
The proposed answer, above, still applies. This is not the best forum to use for your query. As described in the sticky note at the beginning of this forum (https://social.technet.microsoft.com/Forums/en-US/9ce53966-49bb-48fe-b195-2652ad8d09d9/purpose-of-this-forum-server-general-please-read-before-posting-?forum=winservergen),
this forum is for general questions about Windows Server. You question is about specific developer topic. You will reach more experts by posting such queries to a developer forum such as posted by Mary.
tim

Виноват какой-то методполеконструкция в коде, что запрещены к использованию в строгом режиме. Он как раз и нужен на этапе разработки, чтобы легче было дебажить. Посмотрите в свой код — возможно где-то есть то, что нельзя использовать в нем, прочитать можно здесь — https://developer.mozilla.org/… trict_mode , https://www.ecma-international… sec-10.1.1
Сообщение было отмечено userook как решение