Чиним:
HtmlElement he = instance.ActiveTab.GetDocumentByAddress("0").FindElementByAttribute("p", "innertext", project.Variables["move_mouse_to"].Value, "regexp", 0);
if (he.IsVoid) return -1;
int duration_of_mouse = int.Parse(project.Variables["duration_of_mouse"].Value)...