This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Изменение каталога трубопроводных сетей - для Рудольфа. | |
var regNetwork = $"{HostApplicationServices.Current.UserRegistryProductRootKey}\\Profiles\\" + | |
$"{Application.GetSystemVariable("CPROFILE")}\\Preferences\\AeccUiNetwork100"; | |
using (var networkKey = Registry.CurrentUser.OpenSubKey(regNetwork, RegistryKeyPermissionCheck.ReadWriteSubTree)) | |
{ | |
networkKey.SetValue("SharedContentPath", @"C:\temp\ГП\Pipes Catalog\Aecc Shared Content"); | |
networkKey.SetValue("DCE203A2-D381-466f-A23E-08A9D9F8FDBD", | |
@"C:\temp\ГП\Pipes Catalog\US Imperial Structures\US Imperial Structures.apc"); | |
networkKey.SetValue("F670B5B9-DA12-476d-B461-4FB5C5650A82", | |
@"C:\temp\ГП\Pipes Catalog\Pipes Metric Russia\Pipes Metric Russia.apc"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal static void Automate(UIJob uiJob) | |
{ | |
Console.WriteLine("Нажми любую кнопку для старта:"); | |
Console.ReadKey(); | |
App = Application.Attach(uiJob.ProcessID); | |
using (Auto = new UIA3Automation()) | |
{ | |
var mainWin = App.GetMainWindow(Auto); | |
Console.WriteLine($"Главное окно - {mainWin.Name}"); | |
var elem = mainWin.FindFirstByXPath("/Pane[@Name='Область инструментов']/Pane[@Name='Навигатор']"); |