Determine wether project is running in ZennoPoster or ProjectMaker

  • Автор темы Автор темы Maddis
  • Дата начала Дата начала

Maddis

Новичок
Регистрация
22.10.2018
Сообщения
27
Реакции
3
Баллы
3
Is there a way to determine this?
 
Sorry, I should have explained it in more detail. I needed to have a different set of variables while testing in Project Maker so needed to check programmatically.

I think this will work:
Развернуть Свернуть Копировать
// Check Running Environment

string Environ = project. Context.ToString();

if (Environ.Contains("Manipulator"))
{
Running In ZennoPoster Mode
    
project. Variables["project_HomeFolder"]. Value = ("D:\\VM's\\PC\\Shared\\Richard Monnier");
project. SendInfoToLog("Runing in ProjectMaker mode", true);
    
}
else
{
Running In ZennoBox Mode
    
}

return 1;
 
You can save variables in profile file, maybe that helps. So you can load different profile when you run in PM.
You can also get program path and then regex what program name is:

C#:
Развернуть Свернуть Копировать
return AppDomain.CurrentDomain.BaseDirectory;
 
  • Спасибо
Реакции: Maddis

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