How to show all global variables name use c#

paydot

Client
Регистрация
21.11.2012
Сообщения
56
Благодарностей
1
Баллы
8

paydot

Client
Регистрация
21.11.2012
Сообщения
56
Благодарностей
1
Баллы
8
and i try
foreach(string key in project.GlobalVariables .Keys)

foreach(string key in Global.Variables .Keys)

all not work.
 

nicanil

Client
Регистрация
06.03.2016
Сообщения
2 242
Благодарностей
1 804
Баллы
113
With this code you can get all variables for specific namespace:
C#:
IEnumerable<IGlobalVariable> variables = project.GlobalVariables["[email protected]"];
foreach(IGlobalVariable vrbl in variables)
{
    project.SendInfoToLog(vrbl.Name + ": " + vrbl.Value);
}
And with this one you can get all variables for all namespaces:
C#:
IEnumerable<string> namespaces = project.GlobalVariables.Namespaces;
foreach(string ns in namespaces)
{
    IEnumerable<IGlobalVariable> variables = project.GlobalVariables[ns];
    foreach(IGlobalVariable vrbl in variables)
    {
        project.SendInfoToLog(ns + " => " + vrbl.Name + ": " + vrbl.Value);
    }
}
Important note: this code works on ZennoPoster version 7.1.0.0 (5.39.0.0) and above
 
  • Спасибо
Реакции: paydot

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