Вверх ↑
Ответов: 775
Рейтинг: 168
#1: 2021-05-27 09:23:02 ЛС | профиль | цитата
MBO писал(а):
Подскажите, пожалуйста, есть ли более правильный способ выводить информацию в поток, без этого бубна с файлами?

ссылка на архив со схемой - https://forum.hiasm.com/getfile/39243
Время обработки около 600 миллисекунд.

Или, без всего лишнего (только не забудь рядом со схемой Newtonsoft.Json.dll положить)

Add(MainForm,10944027,154,168)
{
link(onCreate,9999278:doReplace,[])
}
Add(Charset,5246825,329,182)
{
link(onCharset,3806717:doReplace,[])
}
Add(Memo,4977782,434,182)
{
Width=384
Height=261
Align=5
ScrollBars=3
}
Add(MultiElementEx,9845988,266,182)
{
link(XML,5246825:doCharset,[])
}
BEGIN_SDK
Add(EditMultiEx,14497425,21,21)
{
WorkCount=#4:JSON|
EventCount=#3:XML|
DataCount=#5:json1|
VOffset=98
HOffset=98
link(JSON,14997909:doString,[])
}
Add(Icon,12540853,266,175)
{
@Hint=#5:#main|
Icon=[ZIPFE01000078DAD590310E803008453F8907E02FA6AB9BA3F79F7A1C6F811FDAE8E46C043EBC424AD202266FCD95179C06AC0076A9498794FD378B08846AEF1D5F1A0923699E3818623DCAC19C27283635CD990935707F9893EB3C6B0EFCE17937BDFE2D99F47BFF88DAF60BBB00C53E0BBB]
}
Add(WinExec,6274490,175,105)
{
FileName="powershell"
Mode=0
Action="runas"
Point(doConsoleExec)
Point(onConsoleResult)
Point(onConsoleError)
link(onConsoleResult,9111216:doWork2,[])
link(onConsoleError,9111216:doWork3,[(228,132)])
}
Add(FormatStr,14997909,119,119)
{
DataCount=1
Mask="Add-Type -Path '.\Newtonsoft.Json.dll'\r\n$json = @'\r\n%1\r\n'@ \r\n[xml]$xml = [Newtonsoft.Json.JsonConvert]::DeserializeXNode($json, 'Root')\r\n$xml.OuterXml\r\n"
link(onFString,6274490:doConsoleExec,[])
link(Str1,14497425:json1,[])
}
Add(HubEx,9111216,224,119)
{
link(onEvent,14497425:XML,[])
}
END_SDK
Add(Replace,3806717,385,182)
{
SubStr="><"
DestStr=">\r\n<"
link(onReplace,4977782:doAdd,[])
}
Add(StrList,10279787,217,126)
{
Strings=#1:{|40: "Date": "2021-05-27T11:30:00+03:00",|48: "PreviousDate": "2021-05-26T11:30:00+03:00",|84: "PreviousURL": "\/\/www.cbr-xml-daily.ru\/archive\/2021\/05\/26\/daily_json.js",|45: "Timestamp": "2021-05-26T21:00:00+03:00",|15: "Valute": {|16: "AUD": {|27: "ID": "R01010",|29: "NumCode": "036",|30: "CharCode": "AUD",|25: "Nominal": 1,|43: "Name": "Австралийский доллар",|29: "Value": 57.1846,|31: "Previous": 56.9775|10: },|16: "AZN": {|28: "ID": "R01020A",|29: "NumCode": "944",|30: "CharCode": "AZN",|25: "Nominal": 1,|44: "Name": "Азербайджанский манат",|29: "Value": 43.2453,|31: "Previous": 43.1997|10: },|16: "GBP": {|27: "ID": "R01035",|29: "NumCode": "826",|30: "CharCode": "GBP",|25: "Nominal": 1,|63: "Name": "Фунт стерлингов Соединенного королевства",|30: "Value": 103.9506,|32: "Previous": 104.0466|10: },|16: "AMD": {|27: "ID": "R01060",|29: "NumCode": "051",|30: "CharCode": "AMD",|27: "Nominal": 100,|39: "Name": "Армянских драмов",|29: "Value": 14.1146,|31: "Previous": 14.0989|10: },|16: "BYN": {|28: "ID": "R01090B",|29: "NumCode": "933",|30: "CharCode": "BYN",|25: "Nominal": 1,|40: "Name": "Белорусский рубль",|29: "Value": 29.3168,|31: "Previous": 29.3023|10: },|16: "BGN": {|27: "ID": "R01100",|29: "NumCode": "975",|30: "CharCode": "BGN",|25: "Nominal": 1,|37: "Name": "Болгарский лев",|29: "Value": 46.0016,|31: "Previous": 45.9761|10: },|16: "BRL": {|27: "ID": "R01115",|29: "NumCode": "986",|30: "CharCode": "BRL",|25: "Nominal": 1,|39: "Name": "Бразильский реал",|29: "Value": 13.7795,|31: "Previous": 13.7953|10: },|16: "HUF": {|27: "ID": "R01135",|29: "NumCode": "348",|30: "CharCode": "HUF",|27: "Nominal": 100,|42: "Name": "Венгерских форинтов",|29: "Value": 25.7333,|31: "Previous": 25.8133|10: },|16: "HKD": {|27: "ID": "R01200",|29: "NumCode": "344",|30: "CharCode": "HKD",|26: "Nominal": 10,|43: "Name": "Гонконгских долларов",|29: "Value": 94.6521,|31: "Previous": 94.5548|10: },|16: "DKK": {|27: "ID": "R01215",|29: "NumCode": "208",|30: "CharCode": "DKK",|25: "Nominal": 1,|36: "Name": "Датская крона",|29: "Value": 12.0984,|31: "Previous": 12.0932|10: },|16: "USD": {|27: "ID": "R01235",|29: "NumCode": "840",|30: "CharCode": "USD",|25: "Nominal": 1,|33: "Name": "Доллар США",|29: "Value": 73.4737,|31: "Previous": 73.3963|10: },|16: "EUR": {|27: "ID": "R01239",|29: "NumCode": "978",|30: "CharCode": "EUR",|25: "Nominal": 1,|27: "Name": "Евро",|29: "Value": 89.9392,|31: "Previous": 89.9545|10: },|16: "INR": {|27: "ID": "R01270",|29: "NumCode": "356",|30: "CharCode": "INR",|26: "Nominal": 10,|38: "Name": "Индийских рупий",|29: "Value": 10.1089,|31: "Previous": 10.0775|10: },|16: "KZT": {|27: "ID": "R01335",|29: "NumCode": "398",|30: "CharCode": "KZT",|27: "Nominal": 100,|42: "Name": "Казахстанских тенге",|29: "Value": 17.1746,|31: "Previous": 17.1967|10: },|16: "CAD": {|27: "ID": "R01350",|29: "NumCode": "124",|30: "CharCode": "CAD",|25: "Nominal": 1,|39: "Name": "Канадский доллар",|29: "Value": 60.8427,|31: "Previous": 60.9199|10: },|16: "KGS": {|27: "ID": "R01370",|29: "NumCode": "417",|30: "CharCode": "KGS",|27: "Nominal": 100,|39: "Name": "Киргизских сомов",|29: "Value": 88.2262,|31: "Previous": 87.7379|10: },|16: "CNY": {|27: "ID": "R01375",|29: "NumCode": "156",|30: "CharCode": "CNY",|25: "Nominal": 1,|37: "Name": "Китайский юань",|29: "Value": 11.4882,|30: "Previous": 11.453|10: },|16: "MDL": {|27: "ID": "R01500",|29: "NumCode": "498",|30: "CharCode": "MDL",|26: "Nominal": 10,|38: "Name": "Молдавских леев",|29: "Value": 41.7583,|31: "Previous": 41.5843|10: },|16: "NOK": {|27: "ID": "R01535",|29: "NumCode": "578",|30: "CharCode": "NOK",|26: "Nominal": 10,|38: "Name": "Норвежских крон",|29: "Value": 88.3427,|31: "Previous": 88.3526|10: },|16: "PLN": {|27: "ID": "R01565",|29: "NumCode": "985",|30: "CharCode": "PLN",|25: "Nominal": 1,|38: "Name": "Польский злотый",|29: "Value": 20.0485,|31: "Previous": 20.0662|10: },|16: "RON": {|28: "ID": "R01585F",|29: "NumCode": "946",|30: "CharCode": "RON",|25: "Nominal": 1,|36: "Name": "Румынский лей",|29: "Value": 18.2684,|31: "Previous": 18.2587|10: },|16: "XDR": {|27: "ID": "R01589",|29: "NumCode": "960",|30: "CharCode": "XDR",|25: "Nominal": 1,|60: "Name": "СДР (специальные права заимствования)",|30: "Value": 106.2496,|31: "Previous": 105.971|10: },|16: "SGD": {|27: "ID": "R01625",|29: "NumCode": "702",|30: "CharCode": "SGD",|25: "Nominal": 1,|42: "Name": "Сингапурский доллар",|29: "Value": 55.5315,|31: "Previous": 55.3266|10: },|16: "TJS": {|27: "ID": "R01670",|29: "NumCode": "972",|30: "CharCode": "TJS",|26: "Nominal": 10,|40: "Name": "Таджикских сомони",|29: "Value": 64.4224,|31: "Previous": 64.3545|10: },|16: "TRY": {|28: "ID": "R01700J",|29: "NumCode": "949",|30: "CharCode": "TRY",|26: "Nominal": 10,|35: "Name": "Турецких лир",|29: "Value": 86.9769,|31: "Previous": 87.2415|10: },|16: "TMT": {|28: "ID": "R01710A",|29: "NumCode": "934",|30: "CharCode": "TMT",|25: "Nominal": 1,|46: "Name": "Новый туркменский манат",|29: "Value": 21.0225,|31: "Previous": 21.0004|10: },|16: "UZS": {|27: "ID": "R01717",|29: "NumCode": "860",|30: "CharCode": "UZS",|29: "Nominal": 10000,|38: "Name": "Узбекских сумов",|29: "Value": 69.3047,|30: "Previous": 69.384|10: },|16: "UAH": {|27: "ID": "R01720",|29: "NumCode": "980",|30: "CharCode": "UAH",|26: "Nominal": 10,|40: "Name": "Украинских гривен",|29: "Value": 26.6655,|31: "Previous": 26.7408|10: },|16: "CZK": {|27: "ID": "R01760",|29: "NumCode": "203",|30: "CharCode": "CZK",|26: "Nominal": 10,|35: "Name": "Чешских крон",|29: "Value": 35.3052,|31: "Previous": 35.3751|10: },|16: "SEK": {|27: "ID": "R01770",|29: "NumCode": "752",|30: "CharCode": "SEK",|26: "Nominal": 10,|36: "Name": "Шведских крон",|28: "Value": 88.656,|31: "Previous": 88.8693|10: },|16: "CHF": {|27: "ID": "R01775",|29: "NumCode": "756",|30: "CharCode": "CHF",|25: "Nominal": 1,|40: "Name": "Швейцарский франк",|29: "Value": 82.0752,|31: "Previous": 82.0621|10: },|16: "ZAR": {|27: "ID": "R01810",|29: "NumCode": "710",|30: "CharCode": "ZAR",|26: "Nominal": 10,|45: "Name": "Южноафриканских рэндов",|29: "Value": 53.1113,|31: "Previous": 52.9864|10: },|16: "KRW": {|27: "ID": "R01815",|29: "NumCode": "410",|30: "CharCode": "KRW",|28: "Nominal": 1000,|43: "Name": "Вон Республики Корея",|29: "Value": 65.7786,|31: "Previous": 65.3754|10: },|16: "JPY": {|27: "ID": "R01820",|29: "NumCode": "392",|30: "CharCode": "JPY",|27: "Nominal": 100,|35: "Name": "Японских иен",|29: "Value": 67.5031,|31: "Previous": 67.4877|9: }|5: }|1:}|
}
Add(Replace,9999278,217,182)
{
SubStr="""
DestStr="'"
link(onReplace,9845988:JSON,[])
link(Str,10279787:Text,[])
}

карма: 15

0