bug with c# on zeno 5.45

strouve

Новичок
Регистрация
20.02.2017
Сообщения
13
Благодарностей
0
Баллы
1
Hello,

i upgrade for 5.45 and i have a problem with c# code whor working verry before.

Th code is :
string inputfile ="{-Variable.csharp_file2-}";
string outputfile ="{-Variable.csharp_file2-}";

string fileContent = File.ReadAllText(inputfile, Encoding.Default);
File.WriteAllText(outputfile, fileContent, Encoding.UTF8-);

and now, it not work because the variable {-Variable.csharp_file2-} not replace by my file but by nothing and i have this message error !

Executing action CSharp OwnCode.id: 0fb5d249-3381-4a2b-bd4d-0e400d226864 Le fichier 'C:\Program Files\ZennoLab\EN\ZennoPoster Pro\5.45.0.0\Progs\{-Variable.csharp_file2-}' est introuvable.

What can i do ?
 

Phoenix78

Client
Read only
Регистрация
06.11.2018
Сообщения
11 790
Благодарностей
5 689
Баллы
113
Hello,

i upgrade for 5.45 and i have a problem with c# code whor working verry before.

Th code is :
string inputfile ="{-Variable.csharp_file2-}";
string outputfile ="{-Variable.csharp_file2-}";

string fileContent = File.ReadAllText(inputfile, Encoding.Default);
File.WriteAllText(outputfile, fileContent, Encoding.UTF8-);

and now, it not work because the variable {-Variable.csharp_file2-} not replace by my file but by nothing and i have this message error !

Executing action CSharp OwnCode.id: 0fb5d249-3381-4a2b-bd4d-0e400d226864 Le fichier 'C:\Program Files\ZennoLab\EN\ZennoPoster Pro\5.45.0.0\Progs\{-Variable.csharp_file2-}' est introuvable.

What can i do ?

Ограничения C# макросов
Ограничение только одно, нельзя писать, макросы ZennoPoster на прямую в коде, доступ к переменным, спискам, таблицам и профилю осуществляется через переменную project. А доступ к инстансу - через переменную instance.
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 218
Благодарностей
5 843
Баллы
113
Do you get this error in ProjectMaker or ZennoPoster?
Variable macro in C# code looks like this - project.Variables["csharp_file2"].Value
Usual macro won't work in zennoposter.
 

strouve

Новичок
Регистрация
20.02.2017
Сообщения
13
Благодарностей
0
Баллы
1
It's on projectmaker
,
 

strouve

Новичок
Регистрация
20.02.2017
Сообщения
13
Благодарностей
0
Баллы
1
It's good, really thank's for that issue.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)