Template timeout.

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

muchink

Client
Регистрация
28.07.2012
Сообщения
193
Реакции
6
Баллы
18
Is there a way to have a timeout for a template,
example, if the template didn't succeed/fail within 500 sec, finish the template as failure?

Thanks.
 
You can use {-TimeNow.Date-} or {-Environment.TickCount-} to check dates and compare them the way you need inside template
 
Hey, I just tested it, but it doesn't work if for some reason the template is stuck on some page..I tried using "tab timeout" but it didn't work either..

Do you know of a solution to prevent templates from getting stuck/if they get stuck- stop the template...?

Thanks!
 
What do you mean by stuck? What actions were performed? Did instance stop responsing? More infor is needed.
 
The instance stops responding only in ZP,
I will try to test it and see which actions might cause it to happen and in which stage the template gets stuck
 
NVM, I just saw that it is possible via the .bat
I'll test it and see, thanks!
 
Found it,
whenever I'm using multi threading and using this C# code for pasting, the templates probably can't copy and paste one by one so it gets stuck,
this is the code, I remember HB gave it to me once, but only now I noticed that I'm having problems with it, I'll try to find other solutions.

string newTheme = project.Variables["VariableName"].Value;
lock(SyncObjects.InputSyncer)

{

System.Windows.Forms.Clipboard.SetText(newTheme);
Emulator.ActiveWindow(instance.FormTitle);
System.Windows.Forms.SendKeys.SendWait("^v");

}
 

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