├── Cookbook └── files │ ├── - │ ├── Test.cs │ ├── init.cs │ ├── TODO.cs │ └── How to write the cookbook.cs │ ├── Filesystem │ ├── -Backup files.cs │ ├── Create folder.cs │ ├── Enumerate drives, get drive properties.cs │ ├── File delete, Recycle Bin.cs │ ├── Wait for file.cs │ ├── File move, rename.cs │ └── File shortcuts, symbolic links.cs │ ├── Triggers, toolbars │ ├── -Hooks.cs │ ├── Using action triggers │ │ ├── Show triggers.cs │ │ └── -Trigger options.cs │ ├── Run code when script ends.cs │ ├── Mouse triggers.cs │ ├── Autotext triggers, expand text.cs │ ├── Window triggers, auto-close popup windows.cs │ └── Keyboard triggers (hotkeys).cs │ ├── Math, convert, security │ ├── -Color.cs │ ├── Other conversions.cs │ ├── Compress data.cs │ ├── Passwords in scripts.cs │ ├── Math functions.cs │ ├── Convert to-from string.cs │ ├── Random numbers and strings, GUID.cs │ └── Encrypt, hash.cs │ ├── Data, document │ ├── -Excel automation │ │ ├── Excel - TODO.cs │ │ └── Excel automation script.cs │ ├── SQLite database.cs │ ├── Markdown.cs │ ├── Excel files │ │ ├── Read-write Excel files with ClosedXML.cs │ │ ├── Read-write Excel files with EPPlus.cs │ │ └── Read Excel files with ExcelDataReader.cs │ └── Databases.cs │ ├── Window, UI automation │ ├── -Computer vision.cs │ ├── Screens (display monitors).cs │ ├── Take screenshot.cs │ ├── OCR, find UI text, extract text.cs │ ├── Window actions (close, move, resize, properties, etc).cs │ └── Find UI image or color.cs │ ├── More │ ├── Use C# compiler at run time.cs │ ├── Frequently asked questions.cs │ ├── Command line programs.cs │ ├── Using .NET, NuGet, other libraries.cs │ ├── WMI.cs │ └── PowerShell, VBScript, Python.cs │ ├── Custom dialog windows │ ├── -Dialog - rejected or future.cs │ ├── Dialog - select date.cs │ ├── Dialog - textbox watermark, adorner.cs │ ├── Dialog - owned, non-modal (don't wait).cs │ ├── Dialog - validation.cs │ ├── Dialog - save window placement, control values.cs │ ├── Dialog - window size, position, other properties.cs │ ├── Dialog - icons, images, shapes.cs │ ├── Dialog - multiple tabs.cs │ ├── Dialog - enum check-list, select.cs │ ├── Dialog - menu bar.cs │ ├── Dialog - events.cs │ ├── Dialog - element color, font, border.cs │ └── Dialog - button icon, toolbar.cs │ ├── Internet │ ├── Check internet connection, ping.cs │ ├── SFTP (upload, download, etc).cs │ └── Send email message (SMTP).cs │ ├── Input, output │ ├── Play sound, speak.cs │ ├── Input box dialog.cs │ └── Display text and variables.cs │ ├── Keys, mouse, clipboard │ ├── If key pressed, toggled.cs │ ├── Wait for key, hotkey.cs │ ├── Mouse get position, wait, cursor, etc.cs │ ├── Clipboard copy, paste, set-get text etc.cs │ └── Select-click menu, control (keyboard shortcuts).cs │ ├── System │ ├── Windows OS version, computer and user name.cs │ ├── Desktop (show etc).cs │ ├── Environment variables.cs │ ├── Services.cs │ ├── Shutdown, restart, logoff, sleep, hibernate, lock computer, battery power.cs │ ├── Registry.cs │ └── Run console program and get its output text.cs │ ├── Wait, time │ ├── Timers.cs │ ├── Simple wait (sleep, delay).cs │ └── Computer time, code speed.cs │ ├── Script │ ├── Run script at startup, output link.cs │ ├── Script testing and debugging.cs │ ├── Multi-file scripts, projects.cs │ ├── Tray icon and notifications.cs │ ├── Saving variables, settings.cs │ ├── Shared classes and functions, libraries.cs │ ├── Run script command line, shortcut, schedule, shell menu.cs │ ├── Script run-time settings.cs │ └── Script class with Main().cs │ ├── Text │ ├── Wildcard expressions (compare text).cs │ ├── Fuzzy string matching, word stemming.cs │ └── Strings and characters.cs │ └── C# language │ ├── Comments, disabled code.cs │ └── return, goto (exit, end, stop, jump).cs ├── _ ├── 32 │ └── 7za.exe ├── Templates │ ├── files │ │ ├── File.txt │ │ ├── New project │ │ │ ├── @Script │ │ │ │ └── Script.cs │ │ │ └── @Library │ │ │ │ └── Library.cs │ │ ├── Script.cs │ │ ├── Class.cs │ │ ├── More │ │ │ └── preBuild postBuild script.cs │ │ ├── Default │ │ │ └── @Triggers and toolbars │ │ │ │ ├── Functions │ │ │ │ ├── Class1.cs │ │ │ │ └── Partial1.cs │ │ │ │ ├── Triggers │ │ │ │ ├── Other triggers.cs │ │ │ │ └── Window triggers.cs │ │ │ │ └── Scripts │ │ │ │ └── Script example1.cs │ │ └── Dialogs │ │ │ ├── Dialog.cs │ │ │ └── Dialog with tabs.cs │ └── files.xml ├── gitBinaryRestore.csv └── Default │ └── Workspace │ ├── files │ ├── Script1.cs │ └── Examples.cs │ └── files.xml ├── .github └── FUNDING.yml ├── Other ├── DocFX │ ├── _doc │ │ ├── articles │ │ │ ├── index.md │ │ │ ├── toc.yml │ │ │ ├── Caller info parameter.md │ │ │ └── Wait timeout.md │ │ ├── template1 │ │ │ ├── partials │ │ │ │ ├── logo.tmpl.partial │ │ │ │ ├── footer.tmpl.partial │ │ │ │ ├── navbar.tmpl.partial │ │ │ │ └── namespace.tmpl.partial │ │ │ ├── favicon.ico │ │ │ ├── styles │ │ │ │ └── main.js │ │ │ └── mod.txt │ │ ├── api │ │ │ ├── index.md │ │ │ └── .gitignore │ │ ├── images │ │ │ ├── Delm.png │ │ │ ├── icon-256.png │ │ │ ├── icon-32.png │ │ │ ├── window.png │ │ │ ├── logo-1080.png │ │ │ └── Input recorder.png │ │ ├── .gitignore │ │ ├── changes │ │ │ ├── v1.11.md │ │ │ ├── template.md │ │ │ ├── old │ │ │ │ ├── v0.10.md │ │ │ │ ├── v0.6.md │ │ │ │ ├── v0.3.md │ │ │ │ ├── v0.2.md │ │ │ │ ├── v1.8.md │ │ │ │ ├── v0.16.md │ │ │ │ ├── v1.5.md │ │ │ │ ├── v1.0.md │ │ │ │ ├── v1.6.md │ │ │ │ ├── v0.7.md │ │ │ │ ├── v1.4.md │ │ │ │ ├── v0.19.md │ │ │ │ ├── v0.11.md │ │ │ │ ├── v1.9.md │ │ │ │ ├── v0.5.md │ │ │ │ ├── v0.9.md │ │ │ │ └── v0.13.md │ │ │ ├── v1.13.md │ │ │ ├── v1.14.md │ │ │ ├── future.md │ │ │ ├── v1.10.md │ │ │ └── v1.12.md │ │ ├── toc.yml │ │ ├── filter.yml │ │ ├── template2 │ │ │ └── partials │ │ │ │ └── item.tmpl.partial │ │ └── editor │ │ │ └── toc.yml │ └── DocFX.csproj ├── Au.Net4 │ ├── App.config │ └── Net4.cs ├── Au.DllHost │ ├── Au.DllHost.vcxproj.filters │ └── DllHost.c ├── DatabasesEtc │ ├── Program.cs │ └── DatabasesEtc.csproj └── BuildEvents │ └── BuildEvents.csproj ├── Libraries └── scintilla │ ├── version.txt │ ├── win32 │ ├── Scintilla.def │ ├── ListBox.h │ ├── SurfaceGDI.h │ ├── HanjaDic.h │ ├── ScintillaWin.h │ ├── ScintRes.rc │ └── ScintillaDLL.cxx │ ├── .editorconfig │ ├── src │ ├── Position.h │ ├── ElapsedPeriod.h │ ├── CharClassify.h │ ├── UniqueString.h │ ├── Debugging.h │ └── CharacterType.cxx │ └── include │ ├── Sci_Position.h │ └── ILoader.h ├── Cpp ├── rejected.cpp ├── Cpp.rc ├── stdafx.cpp ├── Cpp.def ├── resource.h └── Cpp.manifest ├── Au.snk ├── global.json ├── Au ├── x │ ├── Icon-128.png │ └── NuGet.md ├── Resources │ └── red_cross_cursor.cur ├── Au.Types │ └── unused │ │ └── AuClassless.cs ├── Au.cs ├── Triggers │ └── Triggers_util.cs ├── Au.More │ └── SecurityUtil.cs └── Internal │ ├── NamespaceDoc.cs │ ├── misc_.cs │ ├── AttachThreadInput_.cs │ ├── LaDebugger_.cs │ ├── tables.cs │ └── PostToThisThread_.cs ├── Au.Editor ├── resources │ ├── ico │ │ ├── app.ico │ │ ├── Script.ico │ │ ├── app_disabled.ico │ │ └── PictureInPicture.ico │ ├── AssemblyInfo.cs │ └── ci │ │ ├── OverlayStatic.xaml │ │ ├── OverlayAbstract.xaml │ │ ├── Structure.xaml │ │ ├── Label.xaml │ │ ├── Event.xaml │ │ ├── Field.xaml │ │ ├── TypeParameter.xaml │ │ ├── GroupBy.xaml │ │ ├── Keyword.xaml │ │ ├── Class.xaml │ │ ├── Constant.xaml │ │ ├── EnumMember.xaml │ │ ├── ExpandScope.xaml │ │ ├── LocalMethod.xaml │ │ ├── Method.xaml │ │ └── Delegate.xaml ├── Properties │ └── launchSettings.json ├── _prePostBuild.cs ├── Default │ └── Themes │ │ ├── Material dark.csv │ │ ├── One Monokai dark.csv │ │ └── Visual Studio dark.csv └── Au.Editor.cs ├── Au.AppHost ├── ResourceHacker.txt └── Au.AppHost.vcxproj.filters ├── Au.Controls ├── Util, Api │ └── KApi.cs ├── Au.Controls.cs ├── resources │ └── AssemblyInfo.cs └── Simple │ └── KGroupBox.cs ├── Scripts ├── @Au docs │ └── Readme.txt ├── old │ ├── VS goto.cs │ └── Windows SDK to C# │ │ ├── Scripts │ │ └── SdkUtil.cs │ │ ├── @SDK converter │ │ └── SDK converter.cs │ │ └── Readme.txt ├── Update version.txt.cs └── LA docs for AI │ └── Upload AI embeddings.cs ├── .editorconfig └── LICENSE.txt /Cookbook/files/-/Test.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_/Templates/files/File.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_/gitBinaryRestore.csv: -------------------------------------------------------------------------------- 1 | restore -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: qgindi 2 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/articles/index.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_/Default/Workspace/files/Script1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Cookbook/files/Filesystem/-Backup files.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Cookbook/files/Triggers, toolbars/-Hooks.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Libraries/scintilla/version.txt: -------------------------------------------------------------------------------- 1 | 557 2 | -------------------------------------------------------------------------------- /Cookbook/files/Math, convert, security/-Color.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Cpp/rejected.cpp: -------------------------------------------------------------------------------- 1 | #if false 2 | 3 | 4 | #endif 5 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/template1/partials/logo.tmpl.partial: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/template1/partials/footer.tmpl.partial: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_/Templates/files/New project/@Script/Script.cs: -------------------------------------------------------------------------------- 1 | //#script -------------------------------------------------------------------------------- /Cookbook/files/Data, document/-Excel automation/Excel - TODO.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Au.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/Au.snk -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "//sdk": { 3 | "version": "10.0.100" 4 | } 5 | } -------------------------------------------------------------------------------- /Cpp/Cpp.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/Cpp/Cpp.rc -------------------------------------------------------------------------------- /Libraries/scintilla/win32/Scintilla.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | Scintilla_DirectFunction -------------------------------------------------------------------------------- /_/32/7za.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/_/32/7za.exe -------------------------------------------------------------------------------- /Libraries/scintilla/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [**] 4 | indent_style = tab 5 | -------------------------------------------------------------------------------- /Au/x/Icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/Au/x/Icon-128.png -------------------------------------------------------------------------------- /Other/DocFX/_doc/api/index.md: -------------------------------------------------------------------------------- 1 | # Library 2 | 3 | [Library files and namespaces](xref:library) 4 | -------------------------------------------------------------------------------- /_/Templates/files/Script.cs: -------------------------------------------------------------------------------- 1 | //. 2 | script.setup(trayIcon: true, sleepExit: true); 3 | //.. 4 | 5 | -------------------------------------------------------------------------------- /Cookbook/files/Window, UI automation/-Computer vision.cs: -------------------------------------------------------------------------------- 1 | /// Library info: <>. NuGet: <+nuget><>. 2 | -------------------------------------------------------------------------------- /Au.Editor/resources/ico/app.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/Au.Editor/resources/ico/app.ico -------------------------------------------------------------------------------- /Other/DocFX/_doc/api/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # temp file # 3 | ############### 4 | *.yml 5 | .manifest 6 | -------------------------------------------------------------------------------- /Au/Resources/red_cross_cursor.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/Au/Resources/red_cross_cursor.cur -------------------------------------------------------------------------------- /Other/DocFX/_doc/images/Delm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/Other/DocFX/_doc/images/Delm.png -------------------------------------------------------------------------------- /Au.Editor/resources/ico/Script.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/Au.Editor/resources/ico/Script.ico -------------------------------------------------------------------------------- /Other/DocFX/_doc/images/icon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/Other/DocFX/_doc/images/icon-256.png -------------------------------------------------------------------------------- /Other/DocFX/_doc/images/icon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/Other/DocFX/_doc/images/icon-32.png -------------------------------------------------------------------------------- /Other/DocFX/_doc/images/window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/Other/DocFX/_doc/images/window.png -------------------------------------------------------------------------------- /Cookbook/files/-/init.cs: -------------------------------------------------------------------------------- 1 | run.it(@"C:\code\ok\exe\Triggers and toolbars\Triggers and toolbars.exe", flags: RFlags.InheritAdmin); 2 | -------------------------------------------------------------------------------- /Cookbook/files/More/Use C# compiler at run time.cs: -------------------------------------------------------------------------------- 1 | /// See https://www.libreautomate.com/forum/showthread.php?tid=7491<>. 2 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/images/logo-1080.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/Other/DocFX/_doc/images/logo-1080.png -------------------------------------------------------------------------------- /Other/DocFX/_doc/template1/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/Other/DocFX/_doc/template1/favicon.ico -------------------------------------------------------------------------------- /Au.Editor/resources/ico/app_disabled.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/Au.Editor/resources/ico/app_disabled.ico -------------------------------------------------------------------------------- /Other/DocFX/_doc/images/Input recorder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/Other/DocFX/_doc/images/Input recorder.png -------------------------------------------------------------------------------- /_/Templates/files/Class.cs: -------------------------------------------------------------------------------- 1 | 2 | public class Class1 { 3 | 4 | public static void Function1() { 5 | 6 | } 7 | 8 | 9 | } 10 | -------------------------------------------------------------------------------- /Au.Editor/resources/ico/PictureInPicture.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgindi/LibreAutomate/HEAD/Au.Editor/resources/ico/PictureInPicture.ico -------------------------------------------------------------------------------- /Cpp/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes for generating pre-compiled header (pch) file 2 | 3 | #include "stdafx.h" 4 | -------------------------------------------------------------------------------- /_/Templates/files/More/preBuild postBuild script.cs: -------------------------------------------------------------------------------- 1 | /*/ role editorExtension; /*/ 2 | 3 | var c = PrePostBuild.Info; 4 | print.it(c); 5 | print.it(c.outputFile); 6 | -------------------------------------------------------------------------------- /Cpp/Cpp.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | 3 | UnloadAuCppDll ;__stdcall 4 | 5 | pcre2_pattern_info=pcre2_pattern_info_16 6 | pcre2_substring_nametable_scan=pcre2_substring_nametable_scan_16 7 | -------------------------------------------------------------------------------- /Au.Editor/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Au.Editor": { 4 | "commandName": "Project", 5 | "nativeDebugging": false 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /Cookbook/files/Data, document/SQLite database.cs: -------------------------------------------------------------------------------- 1 | /// Consider SQLite<> when need to store data in a single database file that can contain multiple tables. Use class . 2 | -------------------------------------------------------------------------------- /_/Default/Workspace/files.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /_/Templates/files/Default/@Triggers and toolbars/Functions/Class1.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | class Class1 { 4 | 5 | public static void Function1() { 6 | print.it("Class1.Function1"); 7 | } 8 | 9 | 10 | } 11 | -------------------------------------------------------------------------------- /Other/Au.Net4/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Cookbook/files/Custom dialog windows/-Dialog - rejected or future.cs: -------------------------------------------------------------------------------- 1 | /* 2 | HwndHost, WinForms, ActiveX 3 | Last, Panel 4 | And 5 | Options: right-align labels 6 | Popup 7 | Scrolling panel 8 | Bind, BindingContext 9 | */ 10 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # folder # 3 | ############### 4 | /**/DROP/ 5 | /**/TEMP/ 6 | /**/packages/ 7 | /**/bin/ 8 | /**/obj/ 9 | _site/ 10 | _exported_templates/ 11 | *.tar 12 | *.gz 13 | /test/ 14 | -------------------------------------------------------------------------------- /Cookbook/files/Internet/Check internet connection, ping.cs: -------------------------------------------------------------------------------- 1 | /// To check Internet connection, try to connect to a known reliable Internet server. For it can be used ICMP ping. 2 | 3 | bool canConnectToGoogle = internet.ping(); 4 | print.it(canConnectToGoogle); 5 | -------------------------------------------------------------------------------- /Other/Au.DllHost/Au.DllHost.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Au.AppHost/ResourceHacker.txt: -------------------------------------------------------------------------------- 1 | [FILENAMES] 2 | Exe= 64\Au.AppHost.exe 3 | SaveAs= Au.Task.exe 4 | Log= CONSOLE 5 | [COMMANDS] 6 | -add ..\Au.AppHost\Script.ico, ICONGROUP,32512,0 7 | -addoverwrite ..\Au.Editor\Resources\Au.manifest, MANIFEST,1,0 8 | -add dotnet_ref.txt, 220,1,0 9 | -------------------------------------------------------------------------------- /Au.Controls/Util, Api/KApi.cs: -------------------------------------------------------------------------------- 1 | namespace Au.Controls; 2 | 3 | [DebuggerStepThrough] 4 | static unsafe class KApi { 5 | 6 | [DllImport("user32.dll")] 7 | internal static extern bool DrawFrameControl(IntPtr hdc, in RECT r, int type, int state); 8 | 9 | 10 | } 11 | 12 | -------------------------------------------------------------------------------- /_/Templates/files/Default/@Triggers and toolbars/Functions/Partial1.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | partial class Program { 4 | 5 | void Function1() { 6 | 7 | } 8 | 9 | void TriggerActionExample2(wnd w) { 10 | print.it("trigger action example 4", w); 11 | } 12 | 13 | 14 | } 15 | -------------------------------------------------------------------------------- /Cookbook/files/Data, document/Markdown.cs: -------------------------------------------------------------------------------- 1 | /// Library info: Markdig<>. NuGet: <+nuget>Markdig<>. 2 | 3 | /*/ nuget -\Markdig; /*/ 4 | 5 | var md = """ 6 | ## Header 7 | Text. 8 | """; 9 | var s = Markdig.Markdown.ToHtml(md); 10 | print.it(s); 11 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/changes/v1.11.md: -------------------------------------------------------------------------------- 1 | ## Version 1.11.0 (2025-05-14) 2 | 3 | ### Editor 4 | New tools: 5 | - Menu **TT > Script lauchers > Shell menu**. 6 | 7 | ### Library 8 | Fixed bugs: 9 | - In programs compiled with LibreAutomate fails to load assemblies in subfolder `runtimes\win`. 10 | -------------------------------------------------------------------------------- /_/Templates/files/Default/@Triggers and toolbars/Triggers/Other triggers.cs: -------------------------------------------------------------------------------- 1 | partial class Program { 2 | [Triggers] 3 | void OtherTriggers() { 4 | 5 | //Add other triggers here. More info in cookbook and forum. 6 | //Click the Run button to apply changes after editing. 7 | 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/articles/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Library 2 | href: Library.md 3 | 4 | - name: Key names and operators 5 | href: Key names and operators.md 6 | 7 | - name: Output tags 8 | href: Output tags.md 9 | 10 | - name: UAC 11 | href: UAC.md 12 | 13 | - name: Wildcard expression 14 | href: Wildcard expression.md 15 | -------------------------------------------------------------------------------- /Au.AppHost/Au.AppHost.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Other/DatabasesEtc/Program.cs: -------------------------------------------------------------------------------- 1 | static class Program { 2 | public const string c_outputDirBS = @"C:\code\au\_\"; 3 | 4 | [STAThread] 5 | static void Main(string[] args) { 6 | script.setup(); 7 | print.qm2.use = true; 8 | print.clear(); 9 | 10 | RefTxt.Create(); 11 | //RefAndDoc.Create(); 12 | //Icons.CreateDB(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Au.Controls/Au.Controls.cs: -------------------------------------------------------------------------------- 1 | /*/ 2 | role classLibrary 3 | define CONTROLS,IDE_LA,NO_GLOBAL,NO_DEFAULT_CHARSET_UNICODE 4 | noWarnings 1591,419,649 5 | preBuild ..\@Au.Editor\_prePostBuild.cs 6 | outputPath %folders.Workspace%\..\Au.Editor 7 | miscFlags 1 8 | noRef *\Au.dll 9 | pr ..\@Au\Au.cs 10 | resource resources\Generic.xaml /embedded 11 | /*/ 12 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Home 2 | href: index.md 3 | - name: Library 4 | href: api/ 5 | topicHref: api/index.md 6 | - name: Editor 7 | href: editor/ 8 | topicUid: Application 9 | - name: Articles 10 | href: articles/ 11 | topicHref: articles/index.md 12 | - name: Cookbook 13 | href: cookbook/ 14 | topicHref: cookbook/index.md 15 | -------------------------------------------------------------------------------- /Cookbook/files/Input, output/Play sound, speak.cs: -------------------------------------------------------------------------------- 1 | /// Play a system sound. 2 | 3 | sound.playDefault(); 4 | sound.playError(); 5 | sound.playEvent("DeviceConnect"); 6 | 7 | /// Play a sound file. 8 | 9 | sound.playWav(folders.Windows + @"Media\Alarm01.wav"); 10 | 11 | /// Speak text. 12 | 13 | sound.speak("Today is " + DateTime.Now.ToLongDateString()); 14 | -------------------------------------------------------------------------------- /Cookbook/files/Keys, mouse, clipboard/If key pressed, toggled.cs: -------------------------------------------------------------------------------- 1 | /// If key pressed or toggled. 2 | 3 | if (keys.isCtrl) print.it("Ctrl"); 4 | if (keys.isPressed(KKey.Escape)) print.it("Esc"); 5 | if (keys.isCapsLock) print.it("CapsLock toggled"); 6 | 7 | var mod = keys.getMod(); //get states of all four modifier keys 8 | if (mod.Has(KMod.Alt)) print.it("Alt"); 9 | -------------------------------------------------------------------------------- /Cookbook/files/System/Windows OS version, computer and user name.cs: -------------------------------------------------------------------------------- 1 | /// Use class . 2 | 3 | if (osVersion.minWin10) print.it("Windows 10 or later"); 4 | else if (osVersion.minWin8) print.it("Windows 8"); 5 | else print.it("Windows 7"); 6 | 7 | /// Get computer name and current user name. 8 | 9 | print.it(Environment.MachineName, Environment.UserName); 10 | -------------------------------------------------------------------------------- /Au/x/NuGet.md: -------------------------------------------------------------------------------- 1 | LibreAutomate is an automation library for Windows. Mostly desktop and web UI automation. 2 | 3 | To get the most of it, install the [LibreAutomate](https://www.libreautomate.com/) app. 4 | 5 | The host program should use a manifest like [this](https://github.com/qgindi/LibreAutomate/blob/master/_/default.exe.manifest). [More info](https://www.libreautomate.com/articles/Library.html). -------------------------------------------------------------------------------- /Other/DocFX/_doc/changes/template.md: -------------------------------------------------------------------------------- 1 | # Version 1..0 (2025-) 2 | 3 | ## Editor 4 | 5 | New tools: 6 | - . 7 | 8 | New cookbook recipes: 9 | - . 10 | 11 | Improved: 12 | - . 13 | 14 | Fixed bugs: 15 | - . 16 | 17 | ## Library 18 | 19 | New classes: 20 | - . 21 | 22 | New members: 23 | - . 24 | 25 | New parameters: 26 | - . 27 | 28 | Improved: 29 | - . 30 | 31 | Fixed bugs: 32 | - . 33 | 34 | ### Breaking changes 35 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/template1/styles/main.js: -------------------------------------------------------------------------------- 1 | // Anchor scroll workaround. 2 | $(document).ready(function () { 3 | if (window.location.hash) { 4 | $('html, body').animate({ 5 | scrollTop: $(window.location.hash).offset().top - 50 6 | }, 1); 7 | } 8 | }); 9 | 10 | // Navbar Hamburger 11 | $(function () { 12 | $(".navbar-toggle").click(function () { 13 | $(this).toggleClass("change"); 14 | }) 15 | }) 16 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/changes/old/v0.10.md: -------------------------------------------------------------------------------- 1 | ## Version 0.10.0 (2022-10-19) 2 | 3 | ### Editor 4 | New tools: 5 | - Snippets. Add and edit code snippets. 6 | - Customize. Customize menus, toolbars and hotkeys of the editor window. 7 | 8 | 9 | ### Library 10 | New features: 11 | - Several new functions or parameters in **wpfBuilder** class: **Name**, **Watermark**, **Text**, **Border**. 12 | 13 | 14 | ### Bug fixes and improvements 15 | Fixed: **ExplorerFolder.Of** may throw exception. 16 | -------------------------------------------------------------------------------- /Cookbook/files/Custom dialog windows/Dialog - select date.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | 4 | process.thisProcessCultureIsInvariant = false; 5 | 6 | var b = new wpfBuilder("Window").WinSize(400); 7 | b.R.Add("Text", out DatePicker d1); 8 | d1.SelectedDate = DateTime.Now; 9 | d1.SelectedDateFormat = DatePickerFormat.Long; 10 | b.R.AddOkCancel(); 11 | b.End(); 12 | if (!b.ShowDialog()) return; 13 | var date = d1.SelectedDate ?? DateTime.Now.Date; 14 | print.it(date); 15 | -------------------------------------------------------------------------------- /Scripts/@Au docs/Readme.txt: -------------------------------------------------------------------------------- 1 | Us the latest DocFX. Older version may not support new C# features. 2 | If there are some strange errors, likely DocFX uses wrong SDK version. Try to temporarily rename folders of SDKs that should not be used. 3 | 4 | info: we don't use the full text search feature. 5 | Uses CPU 10-20 s after each page [re]load. 6 | Results are poorly sorted. 7 | The Google site search does it much better, and often faster. 8 | info: To enable it, add "_enableSearch": true in "globalMetadata". 9 | -------------------------------------------------------------------------------- /Cpp/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Cpp.rc 4 | // 5 | #define IDR_RT_MANIFEST1 2 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 103 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /Au/Au.Types/unused/AuClassless.cs: -------------------------------------------------------------------------------- 1 | //rejected 2 | //namespace Au.Types 3 | //{ 4 | // /// 5 | // /// Contains functions of this library that can be called without a class, like Function() instead of Class.Function(). 6 | // /// In file global.cs: global using static Au.Types.AuClassless;. 7 | // /// Currently empty. Reserved for the future. 8 | // /// 9 | // public static class AuClassless 10 | // { 11 | // //public static void TestClassless() { } 12 | // } 13 | //} 14 | -------------------------------------------------------------------------------- /Libraries/scintilla/win32/ListBox.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file ListBox.h 3 | ** Definitions for list box on Windows. 4 | **/ 5 | // Copyright 2025 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef LISTBOX_H 9 | #define LISTBOX_H 10 | 11 | namespace Scintilla::Internal { 12 | 13 | bool ListBoxX_Register() noexcept; 14 | void ListBoxX_Unregister() noexcept; 15 | 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/changes/v1.13.md: -------------------------------------------------------------------------------- 1 | ## Version 1.13.0 (2025-07-06) - 1.13.1 (2025-07-08) 2 | 3 | ### Editor 4 | Does not require the .NET SDK for NuGet and Publish. If it isn't installed, automatically downloads (~26 MB) and uses a minimal SDK. 5 | 6 | Removed the " C#" from the full name of the program. Now just "LibreAutomate". 7 | 8 | Several improvements. 9 | 10 | In 1.13.1 fixed bug in the LibreAutomate setup program: Windows UI shows two LibreAutomate programs installed. 11 | 12 | ### Library 13 | No changes 14 | -------------------------------------------------------------------------------- /Scripts/old/VS goto.cs: -------------------------------------------------------------------------------- 1 | var s = args.Length == 0 ? "Au.clipboard.copy" : args[0]; 2 | 3 | if (s.Ends("..ctor")) s=s[..^6]; 4 | else { 5 | int i=s.Find(".op_"); 6 | if(i>0) s=s[..i]; 7 | } 8 | 9 | var w = wnd.find(0, "Au -* Microsoft Visual Studio*", "HwndWrapper[DefaultDomain;*"); 10 | w.Activate(); 11 | //keys.send("Ctrl+T"); 12 | keys.send("Ctrl+(1 S)"); 13 | clipboard.paste(s); 14 | mouse.move(screen.primary); 15 | //if (miscInfo.getTextCursorRect(out var r, out _)) mouse.move(r); else mouse.move(screen.primary); 16 | -------------------------------------------------------------------------------- /Other/Au.Net4/Net4.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Runtime.InteropServices; 5 | using System.Text; 6 | 7 | [module: DefaultCharSet(CharSet.Unicode)] 8 | 9 | class Net4 { 10 | [STAThread] 11 | static int Main(string[] args) { 12 | Console.InputEncoding = Encoding.UTF8; 13 | Console.OutputEncoding = Encoding.UTF8; 14 | 15 | switch (args[0]) { 16 | case "/typelib": 17 | return TypelibConverter.Convert(args[1]); 18 | } 19 | return 1; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Au/Au.cs: -------------------------------------------------------------------------------- 1 | /*/ 2 | role classLibrary; 3 | define IDE_LA,AU,NO_GLOBAL,NO_DEFAULT_CHARSET_UNICODE; 4 | noWarnings 419,649; 5 | preBuild ..\@Au.Editor\_prePostBuild.cs; 6 | outputPath %folders.Workspace%\dll; 7 | miscFlags 1; 8 | noRef *\Au.dll; 9 | resource resources\red_cross_cursor.cur /path; 10 | /*/ 11 | 12 | //Using outputPath %folders.Workspace%\dll; instead of outputPath %folders.Workspace%\..\Au.Editor; because the compiler would replace Au.dll with the older version. 13 | // _prePostBuild will copy Au.dll to Au.Editor. 14 | -------------------------------------------------------------------------------- /Cpp/Cpp.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/changes/old/v0.6.md: -------------------------------------------------------------------------------- 1 | ## Version 0.6.0 2 | 3 | ### Bug fixes and improvements 4 | Improvements and bug fixes in auto-hide toolbars. 5 | 6 | Improvements in **wnd.ZorderX** functions. 7 | 8 | Fixed: **elm** functions may kill Chrome on Windows 7. 9 | 10 | And more. 11 | 12 | 13 | ### Other changes 14 | Menu **TT > New toolbar**. Makes easier to create new toolbars, set trigger, attach to window or auto-hide at screen edge. 15 | 16 | Menu **TT > New trigger**. 17 | 18 | Now icons like `"*Pack.Name color"` can be used in exe and dll too. 19 | -------------------------------------------------------------------------------- /Cookbook/files/System/Desktop (show etc).cs: -------------------------------------------------------------------------------- 1 | /// Can be used Windows keyboard shortcuts<>. 2 | 3 | keys.send("Win+D"); //show desktop; or undo it if possible 4 | keys.send("Win+M"); //minimize all windows 5 | keys.send("Win+Shift+M"); //restore all windows 6 | keys.send("Win+Tab"); //task view 7 | keys.send("Win+Left"); //dock the active window at the left side of the screen 8 | keys.send("Win+Right"); //dock the active window at the right side of the screen 9 | 10 | /// Switch the active window like with `Alt+Tab`. 11 | 12 | wnd.switchActiveWindow(); 13 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/filter.yml: -------------------------------------------------------------------------------- 1 | apiRules: 2 | - exclude: 3 | uidRegex: ^System\.Object$ 4 | type: Type 5 | - exclude: 6 | uidRegex: ^System\.ValueType$ 7 | type: Type 8 | - exclude: 9 | uidRegex: ^System\.Attribute$ 10 | type: Type 11 | - exclude: 12 | uidRegex: ^System\.Collections\.IEnumerable$ 13 | type: Type 14 | - exclude: 15 | hasAttribute: 16 | uid: Au.Types.NoDoc 17 | - exclude: 18 | uidRegex: ^Au\.Types\.NoDoc$ 19 | type: Type 20 | - exclude: 21 | uidRegex: \.Finalize$ 22 | type: Method 23 | -------------------------------------------------------------------------------- /Libraries/scintilla/win32/SurfaceGDI.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file SurfaceGDI.h 3 | ** Definitions for drawing to GDI on Windows. 4 | **/ 5 | // Copyright 2025 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef SURFACEGDI_H 9 | #define SURFACEGDI_H 10 | 11 | namespace Scintilla::Internal { 12 | 13 | std::shared_ptr FontGDI_Allocate(const FontParameters &fp); 14 | std::unique_ptr SurfaceGDI_Allocate(); 15 | 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/changes/old/v0.3.md: -------------------------------------------------------------------------------- 1 | ## Version 0.3.0 - 0.3.1 2 | 3 | ### Breaking changes 4 | Renamed: **mouse.moveRelative** and **mouse.moveRecorded** to **mouse.moveBy**. 5 | 6 | Changed some functions of struct **WOwner**. 7 | 8 | 9 | ### Bug fixes 10 | Editor does not see updated r class libraries. 11 | 12 | Fixed in 0.3.1 13 | - A compilation cannot contain duplicate r. 14 | 15 | 16 | ### Other changes 17 | Added keyboard/mouse recorder. 18 | 19 | New function **mouse.drag**. 20 | 21 | New **elm** functions: **SendKeys**, **Check**, **Expand**. 22 | 23 | Various improvements. 24 | -------------------------------------------------------------------------------- /Libraries/scintilla/win32/HanjaDic.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file HanjaDic.h 3 | ** Korean Hanja Dictionary 4 | ** Convert between Korean Hanja and Hangul by COM interface. 5 | **/ 6 | // Copyright 2015 by Neil Hodgson 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #ifndef HANJADIC_H 10 | #define HANJADIC_H 11 | 12 | namespace Scintilla::Internal { 13 | 14 | namespace HanjaDict { 15 | 16 | bool GetHangulOfHanja(std::wstring &inout) noexcept; 17 | 18 | } 19 | 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Scripts/Update version.txt.cs: -------------------------------------------------------------------------------- 1 | /*/ role editorExtension; c Sftp.cs; /*/ 2 | using System.Runtime.Loader; 3 | 4 | var ver = typeof(osVersion).Assembly.GetName().Version.ToString(3); 5 | var ver2 = AssemblyLoadContext.Default.Assemblies.First(o => o.GetName().Name == "Au.Editor").GetName().Version.ToString(3); 6 | if (ver2 != ver) throw new InvalidOperationException("editor project not compiled"); 7 | 8 | var file = folders.ThisAppBS + "version.txt"; 9 | filesystem.saveText(file, ver); 10 | Sftp.UploadToLA("domains/libreautomate.com/public_html", file); 11 | 12 | print.it("Uploaded: version.txt", ver); 13 | -------------------------------------------------------------------------------- /Cookbook/files/Data, document/Excel files/Read-write Excel files with ClosedXML.cs: -------------------------------------------------------------------------------- 1 | /// ClosedXML<> is a library for reading/writing Excel files (`.xlsx`). NuGet: <+nuget>ClosedXML<>. 2 | 3 | /*/ nuget -\ClosedXML; /*/ 4 | using ClosedXML.Excel; 5 | 6 | var file = folders.Temp + "ClosedXML.xlsx"; 7 | using (var workbook = new XLWorkbook()) { 8 | var worksheet = workbook.Worksheets.Add("Sample Sheet"); 9 | worksheet.Cell("A1").Value = "Hello World!"; 10 | worksheet.Cell("A2").FormulaA1 = "=MID(A1, 7, 5)"; 11 | workbook.SaveAs(file); 12 | } 13 | run.it(file); 14 | -------------------------------------------------------------------------------- /Au.Editor/resources/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: System.Resources.NeutralResourcesLanguage("en-US")] 4 | 5 | [assembly: ThemeInfo( 6 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 7 | //(used if a resource is not found in the page, 8 | // or application resource dictionaries) 9 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 10 | //(used if a resource is not found in the page, 11 | // app, or any theme specific resource dictionaries) 12 | )] 13 | -------------------------------------------------------------------------------- /Cookbook/files/Math, convert, security/Other conversions.cs: -------------------------------------------------------------------------------- 1 | /// To convert simple types such as <.k>int<> to <.k>double<> or vice versa, use implicit or explicit cast. 2 | 3 | int i = 5; 4 | double d4 = i; //implicit cast 5 | //int i1 = d4; //error, can't convert implicitly (because the double type is larger than int) 6 | int i1 = (int)d4; //explicit cast 7 | 8 | /// Or use class . 9 | 10 | i1 = Convert.ToInt32(d4); 11 | 12 | /// In some cases you may need . 13 | 14 | var b = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; 15 | print.it(BitConverter.ToString(b)); 16 | -------------------------------------------------------------------------------- /Cookbook/files/Keys, mouse, clipboard/Wait for key, hotkey.cs: -------------------------------------------------------------------------------- 1 | /// Wait for key. More info<>. 2 | 3 | var key = keys.waitForKey(0, up: false, block: false); //wait for any key 4 | print.it(key); 5 | 6 | if (!keys.waitForKey(-5, KKey.Tab, block: true)) return; //wait for Tab and block it. Exit if not pressed in 5 s. 7 | print.it("Tab"); 8 | 9 | /// Wait for hotkey. More info<>. 10 | 11 | keys.waitForHotkey(5, "Ctrl+Win+K"); //exception after 5 s 12 | 13 | /// Wait until `Ctrl`, `Alt`, `Shift` and `Win` aren't pressed. 14 | 15 | keys.waitForNoModifierKeys(); 16 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/changes/v1.14.md: -------------------------------------------------------------------------------- 1 | ## Version 1.14.0 (2025-08-06) 2 | 3 | ### Editor 4 | **NuGet** tool improvements: 5 | - Check for updates. 6 | - Easier to update to a selected version. 7 | - Right-click an unused folder to delete. 8 | - Supports multiple sources better. 9 | - Displays package icons. 10 | - And more. 11 | 12 | Panel **Find > Saved searches**. 13 | 14 | Fixed bugs: 15 | - Does not work with .NET 9.0.8. Crashes at startup etc. 16 | - When print text contains ``, may hang or not display the image. 17 | - And more. 18 | 19 | ### Library 20 | New members: 21 | - **osVersion.thisLibrary**. 22 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/template1/partials/navbar.tmpl.partial: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{cs,vb}] 2 | 3 | # IDE0032: Use auto property 4 | dotnet_style_prefer_auto_properties = false:silent 5 | 6 | # CA1416: Validate platform compatibility 7 | dotnet_diagnostic.CA1416.severity = none 8 | 9 | # CA1806: Do not ignore method results 10 | dotnet_diagnostic.CA1806.severity = silent 11 | 12 | # CA2014: Do not use stackalloc in loops 13 | dotnet_diagnostic.CA2014.severity = warning 14 | 15 | # CS1573: Parameter has no matching param tag in the XML comment (but other parameters do) 16 | dotnet_diagnostic.CS1573.severity = suggestion 17 | 18 | [*] 19 | charset = utf-8 20 | 21 | [*.iss] 22 | charset = utf-8-bom 23 | -------------------------------------------------------------------------------- /Cookbook/files/Triggers, toolbars/Using action triggers/Show triggers.cs: -------------------------------------------------------------------------------- 1 | /// Function shows a temporary window with a list of currently active triggers for the active window (hotkey, autotext and mouse edge/move triggers) or the mouse window (mouse click/wheel triggers). 2 | /// A good way to call the function is a hotkey or mouse trigger. For example, you can add or/and edit this code in file Hotkey triggers<>. Then click the Run<> button to restart the triggers script. 3 | 4 | hk["Ctrl+Shift+T"] = o => Triggers.ShowTriggersListWindow(); 5 | hk.Last.EnabledAlways = true; 6 | -------------------------------------------------------------------------------- /Cookbook/files/More/Frequently asked questions.cs: -------------------------------------------------------------------------------- 1 | /// How to automate background (inactive) windows?<> 2 | /// Keyboard functions can automate only the active window. Mouse functions activate the clicked window. Workarounds: 3 | /// - Most <+recipe>UI element<> functions can automate background windows (not all). 4 | /// - Run the script in PiP session<>. 5 | 6 | /// Can LibreAutomate automate games?<> 7 | /// May not work. Some games disable artificial clicks/keystrokes, triggers, etc. 8 | 9 | /// Can LibreAutomate execute or convert Quick Macros scripts?<> 10 | /// No. More info<>. 11 | -------------------------------------------------------------------------------- /Cookbook/files/Data, document/Excel files/Read-write Excel files with EPPlus.cs: -------------------------------------------------------------------------------- 1 | /// EPPlus<> is a library for reading/writing/etc Excel files (`.xlsx, .xlsm`). Free for non-commercial. NuGet: <+nuget>EPPlus<>. 2 | 3 | /*/ nuget -\EPPlus; /*/ 4 | using OfficeOpenXml; 5 | 6 | ExcelPackage.LicenseContext = LicenseContext.NonCommercial; 7 | 8 | string file = folders.Downloads + "Financial Sample.xlsx"; 9 | using(var package = new ExcelPackage(new FileInfo(file))) { 10 | var sheet = package.Workbook.Worksheets[0]; 11 | var s = sheet.Cells["A1"].Value; 12 | print.it(s); 13 | sheet.Cells["A1"].Value = "new value"; 14 | package.Save(); 15 | } 16 | -------------------------------------------------------------------------------- /Cookbook/files/Wait, time/Timers.cs: -------------------------------------------------------------------------------- 1 | /// Use in threads that process Windows messages. For example, if the thread has a window. The callback function runs in the same thread. 2 | 3 | timer.after(1000, _ => { print.it("timer after 1000 ms"); }); 4 | timer.every(500, _ => { print.it("timer every 500 ms"); }); 5 | dialog.show("timer"); //the function processes Windows messages 6 | 7 | /// Use in threads that don't process Windows messages. The callback function runs in a thread pool thread. 8 | 9 | timer2.after(1000, _ => { print.it("timer2 after 1000 ms"); }); 10 | timer2.every(500, _ => { print.it("timer2 every 500 ms"); }); 11 | 5.s(); 12 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/changes/future.md: -------------------------------------------------------------------------------- 1 | # Version 1..0 (2025-) 2 | 3 | ## Editor 4 | 5 | Using .NET 10. 6 | 7 | Updated Roslyn dlls (C# compiler). 8 | 9 | New tools: 10 | - . 11 | 12 | New cookbook recipes: 13 | - . 14 | 15 | Improved in **NuGet** tool: 16 | - Restores old folder contents if failed to install/update. 17 | - Can update dlls that are currently loaded in script processes. 18 | 19 | Improved: 20 | - . 21 | 22 | Fixed bugs: 23 | - Was defined `NET8_0`. 24 | 25 | ## Library 26 | 27 | New classes: 28 | - . 29 | 30 | New members: 31 | - . 32 | 33 | New parameters: 34 | - . 35 | 36 | Improved: 37 | - . 38 | 39 | Fixed bugs: 40 | - . 41 | 42 | ### Breaking changes 43 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/changes/old/v0.2.md: -------------------------------------------------------------------------------- 1 | ## Version 0.2.0 - 0.2.5 2 | 3 | ### Breaking changes 4 | Character _ in keys strings cannot be used as a key name. 5 | 6 | 7 | ### Bug fixes 8 | Does not work **Options > hide when closing**. 9 | 10 | Fixed in 0.2.3: 11 | - Mouse click and wheel triggers stop working. 12 | 13 | Fixed in 0.2.4: 14 | - Keyboard triggers stop working temporarily. 15 | 16 | Fixed in 0.2.5: 17 | - Bugs in mouse and keyboard triggers. 18 | 19 | 20 | ### Other changes 21 | In keys strings (**keys.send** etc) with key names now also can be used text characters, like "Alt+_e_a or "Alt+^ea". 22 | 23 | Some improvements in **elm.Navigate** and **elm.ScrollTo**. 24 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/changes/old/v1.8.md: -------------------------------------------------------------------------------- 1 | ## Version 1.8.0 (2025-01-16) 2 | 3 | ### Editor 4 | Can run on Windows ARM64. 5 | 6 | Improved: 7 | - Menu **File > Export, import > Export**: can include files specified in `/*/ c /*/` etc. 8 | - If in `/*/ c /*/` etc used filename without path, and multiple files with the given filename exist in the workspace, can use the one from subfolders or ancestor folders (if single exists there). Previously would be error, unless one is in the same folder. 9 | 10 | Fixed bugs: 11 | - Git does not work when using the newest version of private Git. 12 | - Image text incorrectly hidden in non-ASCII code. 13 | 14 | ### Library 15 | Can be used on Windows ARM64. 16 | -------------------------------------------------------------------------------- /Scripts/old/Windows SDK to C#/Scripts/SdkUtil.cs: -------------------------------------------------------------------------------- 1 | static class SdkUtil { 2 | 3 | public static string GetVisualStudioToolsFolderPath(bool preview) { 4 | //string vswherePath = @"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"; 5 | //if (0 != run.console(out string s, vswherePath, $"-latest {(preview ? "-prerelease" : "")} -property installationPath")) throw null; 6 | //s = s.Trim() + @"\VC\Tools\MSVC\"; 7 | 8 | var s = $@"C:\Program Files\Microsoft Visual Studio\2022\{(preview ? "Preview" : "Community")}\VC\Tools\MSVC\"; 9 | string ver = Directory.GetDirectories(s).OrderByDescending(d => d).First(); 10 | return ver + @"\bin\Hostx64\x64"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Cookbook/files/Data, document/Excel files/Read Excel files with ExcelDataReader.cs: -------------------------------------------------------------------------------- 1 | /// ExcelDataReader<> is a lightweight, fast and free library for reading Excel files (`.xlsx, .xls, .csv`). NuGet: <+nuget>ExcelDataReader<> or <+nuget>ExcelDataReader.DataSet<>. 2 | 3 | /*/ nuget -\ExcelDataReader; /*/ 4 | using ExcelDataReader; 5 | 6 | Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); 7 | 8 | string file = folders.Downloads + "Financial Sample.xlsx"; 9 | using (var stream = File.OpenRead(file)) { 10 | using var r = ExcelReaderFactory.CreateReader(stream); 11 | while (r.Read()) { 12 | print.it(r.GetString(0), r[1]); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/changes/old/v0.16.md: -------------------------------------------------------------------------------- 1 | ## Version 0.16.0 (2023-06-08) 2 | 3 | ### Editor 4 | 5 | New features: 6 | - **Options > Check** for updates. 7 | - Menu **Edit > View > Customize this menu**. 8 | - Tool **Find UI element** can create "find all" code. 9 | 10 | New cookbook recipes: 11 | - Extract table data using UI elements. 12 | 13 | ### Library 14 | New members: 15 | - **osdRect.SetRects**. 16 | - **Triggers.RunThread**. 17 | - **run.thread** overload. 18 | 19 | Improved: 20 | - **HSMessage.Text** and **HSContentPart.Text** now get text even if encoding is unknown. Previously returned null. 21 | 22 | ### Bug fixes 23 | 24 | Editor: 25 | - Fixed some bugs. 26 | 27 | Library: 28 | - Fixed some bugs. 29 | -------------------------------------------------------------------------------- /Cookbook/files/Custom dialog windows/Dialog - textbox watermark, adorner.cs: -------------------------------------------------------------------------------- 1 | /// Use . 2 | 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | using System.Windows.Documents; 6 | 7 | var b = new wpfBuilder("Window").WinSize(250); 8 | b.R.Add().Child().Add(out TextBox text1).Watermark("Water"); 9 | b.R.Add().Child().Add(out ComboBox combo1).Editable().Watermark(out var adorner, "Snow").Items("Zero|One|Two"); 10 | b.R.Add(out TextBox text2).Watermark("Rain"); //without AdornerDecorator. In some kinds of windows may not work (rare). 11 | b.R.AddButton("Change watermark text", _ => { adorner.Text = "Ice"; }); 12 | if (!b.ShowDialog()) return; 13 | -------------------------------------------------------------------------------- /Cookbook/files/Window, UI automation/Screens (display monitors).cs: -------------------------------------------------------------------------------- 1 | /// Use functions to get screens and screen properties. 2 | 3 | var r = screen.primary.Rect; 4 | print.it(r); 5 | 6 | var s1 = screen.index(1); //the first non-primary screen 7 | var k = s1.Info; 8 | print.it(k.rect, k.workArea); 9 | 10 | foreach (var v in screen.all) { 11 | print.it(v.Rect); 12 | } 13 | 14 | /// Also can be used with some functions of <.x>wnd<> and other classes. 15 | 16 | var w = wnd.find(1, "*- Notepad", "Notepad"); 17 | w.Move(100, 100, workArea: true, screen: s1); 18 | 1.s(); 19 | w.MoveToScreenCenter(s1); 20 | 21 | 1.s(); 22 | var d2 = new dialog("Example") { Screen = screen.ofMouse }; 23 | d2.ShowDialog(); 24 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/template2/partials/item.tmpl.partial: -------------------------------------------------------------------------------- 1 |

{{>partials/title}}

2 | 3 |
{{{summary}}}
4 |
{{{conceptual}}}
5 | 6 |
7 |
{{syntax.content.0.value}}
8 |
9 | 10 | {{#remarks}} 11 |

{{__global.remarks}}

12 |
{{{remarks}}}
13 | {{/remarks}} 14 | {{#example.0}} 15 |

{{__global.examples}}

16 | {{/example.0}} 17 | {{#example}} 18 | {{{.}}} 19 | {{/example}} 20 | -------------------------------------------------------------------------------- /Cookbook/files/Math, convert, security/Compress data.cs: -------------------------------------------------------------------------------- 1 | /// If need to compress/decompress data without creating files, use class . The <.x>DeflateX<> functions use zip compression; the <.x>BrotliX<> functions compress better. 2 | 3 | byte[] b = new byte[10000]; for (int i = 0; i < b.Length; i++) b[i] = (byte)i; 4 | byte[] b2 = Convert2.DeflateCompress(b); 5 | print.it(b2.Length); 6 | byte[] b3 = Convert2.DeflateDecompress(b2); 7 | print.it(b3.Length); 8 | 9 | /// If need to convert compressed data (or any binary data) from/to string, the best way is Base64 encoding. 10 | 11 | string s1 = Convert.ToBase64String(b2); 12 | b2 = Convert.FromBase64String(s1); 13 | 14 | /// See also recipe <+recipe>Zip files<>. 15 | 16 | -------------------------------------------------------------------------------- /Cookbook/files/Filesystem/Create folder.cs: -------------------------------------------------------------------------------- 1 | /// Create folder (directory) if does not exist. 2 | 3 | filesystem.createDirectory(@"C:\Test\Folder"); //also creates C:\Test if need 4 | 5 | /// Create folder (if does not exist) for the specified file. 6 | 7 | filesystem.createDirectoryFor(@"C:\Test\Folder\file.txt"); //creates C:\Test\Folder if need 8 | 9 | /// If need custom security permissions, there are several ways: 10 | /// - Use a folder that has these security settings as a template. 11 | /// - Run `icacls or cacls`<> with . 12 | /// - Use <.x>DirectoryInfo.SetAccessControl<> and <.x>System.Security.AccessControl.DirectorySecurity<>. 13 | 14 | filesystem.createDirectory(@"C:\Test\Folder", @"C:\Template folder"); 15 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/template1/partials/namespace.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} 2 | 3 |

{{>partials/title}}

4 |
{{{summary}}}
5 |
{{{conceptual}}}
6 |
{{{remarks}}}
7 | {{#children}} 8 |

{{>partials/namespaceSubtitle}}

9 | {{#children}} 10 |
11 |
{{{summary}}}
12 | {{/children}} 13 | {{/children}} 14 | -------------------------------------------------------------------------------- /Cookbook/files/Wait, time/Simple wait (sleep, delay).cs: -------------------------------------------------------------------------------- 1 | /// Use functions of class . 2 | 3 | wait.ms(10); //10 milliseconds 4 | wait.s(2); //2 seconds 5 | 6 | /// The above functions also can be called in this way: 7 | 8 | 10.ms(); 9 | 2.s(); 10 | 11 | /// To quickly insert the above statements you can type `10ms` and `2s`. 12 | 13 | /// The sleep time precision is 1-2 ms. The .NET function <.x>Thread.Sleep<> is less precise (15-16 ms). 14 | 15 | /// Most wait functions should not be used in threads with windows, hooks, triggers, COM. While waiting, the thread cannot process Windows messages and other events, and may hang. If need to wait and process messages, the simplest (but often not the best) way is . 16 | -------------------------------------------------------------------------------- /Au.Editor/resources/ci/OverlayStatic.xaml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | s 12 | 13 | 14 | -------------------------------------------------------------------------------- /Libraries/scintilla/win32/ScintillaWin.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file ScintillaWin.h 3 | ** Define functions from ScintillaWin.cxx that can be called from ScintillaDLL.cxx. 4 | **/ 5 | // Copyright 1998-2018 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef SCINTILLAWIN_H 9 | #define SCINTILLAWIN_H 10 | 11 | namespace Scintilla::Internal { 12 | 13 | class ScintillaWin; 14 | 15 | int ResourcesRelease(bool fromDllMain) noexcept; 16 | int RegisterClasses(void *hInstance) noexcept; 17 | Scintilla::sptr_t DirectFunction(ScintillaWin *sci, UINT iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam); 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /Au.Editor/resources/ci/OverlayAbstract.xaml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | a 12 | 13 | 14 | -------------------------------------------------------------------------------- /Cookbook/files/Filesystem/Enumerate drives, get drive properties.cs: -------------------------------------------------------------------------------- 1 | /// Enumerate drives. 2 | 3 | foreach (var x in DriveInfo.GetDrives()) print.it(x.Name, x.VolumeLabel, x.DriveType); 4 | 5 | /// Get drive info. Enumerate child directories. 6 | 7 | var c = new DriveInfo("C"); 8 | print.it(c.TotalSize, c.AvailableFreeSpace); 9 | foreach (var d in c.RootDirectory.EnumerateDirectories()) print.it(d.FullName); 10 | //or 11 | foreach (var d in filesystem.enumDirectories(c.Name)) print.it(d.FullPath); 12 | 13 | /// Get home drive name and its type (fixed/removable/network). 14 | 15 | print.it(folders.ThisAppDriveBS, new DriveInfo(folders.ThisAppDriveBS).DriveType); 16 | 17 | /// Get a removable drive by index or name. 18 | 19 | print.it(folders.removableDrive(0)); 20 | -------------------------------------------------------------------------------- /Scripts/old/Windows SDK to C#/@SDK converter/SDK converter.cs: -------------------------------------------------------------------------------- 1 | /*/ testInternal Au; /*/ 2 | print.clear(); 3 | var x = new SdkConverter.Converter(); 4 | 5 | #if !true 6 | //x.Convert( 7 | // @"C:\code\au\Other\SdkConverter\Data\Header.h", 8 | // //@"C:\code\au\Other\SdkPreprocess\Cpp.cpp", 9 | // @"C:\code\au\Other\Api\Api-small.cs", false); 10 | 11 | x.Convert(@"C:\code\au\Other\Api\Api-preprocessed-64.cpp", @"C:\code\au\Other\Api\Api-64.cs", false); 12 | print.scrollToTop(); 13 | #else 14 | x.Convert(@"C:\code\au\Other\Api\Api-preprocessed-64.cpp", @"C:\code\au\Other\Api\Api-64.cs", false); 15 | 16 | if (true) { 17 | new SdkConverter.Converter().Convert(@"C:\code\au\Other\Api\Api-preprocessed-32.cpp", @"C:\code\au\Other\Api\Api-32.cs", true); 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /_/Default/Workspace/files/Examples.cs: -------------------------------------------------------------------------------- 1 | /// Examples of some automation functions and C# language syntax. 2 | /// To run this script, click the Run button (green triangle). 3 | /// Look for more examples in the Cookbook panel. 4 | 5 | //print text in the Output panel 6 | print.it("Example"); 7 | 8 | //show message box. Exit if Cancel. 9 | if (!dialog.showOkCancel("Run Notepad?")) return; 10 | 11 | //run Notepad 12 | run.it(@"notepad.exe"); 13 | 14 | //wait 1 s 15 | 1.s(); 16 | 17 | //create string variable s 18 | string s = "text"; 19 | 20 | //repeat 5 times 21 | for (int i = 0; i < 5; i++) { 22 | //send text with variables 23 | keys.sendt($"Example {s} {i + 1}"); 24 | 25 | //wait 500 ms 26 | 500.ms(); 27 | 28 | //send keys 29 | keys.send("Ctrl+Z"); //Undo 30 | } 31 | -------------------------------------------------------------------------------- /Cookbook/files/-/TODO.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Recipe "Automation code examples". Just examples of commonly used automation code, without much explanation. To show how an automation script looks. 4 | 5 | CONSIDER: Recipe "Other C# features". Shortly about directives, disposing, reflection, attributes, inheritance, access, generic, dynamic, async, unsafe, span, range/index, interop, GC, module initializers, etc. 6 | 7 | Create a video about all common and unique things LA can do. Toolbars, hotkeys, autotext, etc. Just what, not how. Or cookbook recipes, or scripts. 8 | 9 | CONSIDER: Create a video tutorial about finding functions (intellisense). 10 | Now it's documented in web page "Code editor", and there is a link to it in intro recipe, but maybe boring to read. 11 | 12 | */ 13 | 14 | 15 | -------------------------------------------------------------------------------- /Cookbook/files/System/Environment variables.cs: -------------------------------------------------------------------------------- 1 | /// Environment variables is a feature of the operating system and not of the C# language. They are similar to static string variables. Use functions like . Some other functions support environment variables in file path string, like `"%variable%..."`. Each process has a copy of environment variables of the caller process or of the system, and can modify the copy (add, remove, change values), but usually does not modify the system environment variables. 2 | 3 | var ev = Environment.GetEnvironmentVariable("TEMP"); 4 | print.it(ev); 5 | 6 | Environment.SetEnvironmentVariable("name", "VALUE"); //adds of changes an environment variable in this process only 7 | 8 | run.it(@"%SystemRoot%\Media"); 9 | -------------------------------------------------------------------------------- /Cookbook/files/Window, UI automation/Take screenshot.cs: -------------------------------------------------------------------------------- 1 | /// Take screenshot of the primary screen and save in a file. 2 | 3 | var file = folders.Temp + "screenshot.png"; 4 | using (var b = CaptureScreen.Image(screen.primary.Rect)) { 5 | b.Save(file); 6 | } 7 | run.it(file); //see what we have 8 | 9 | /// Take screenshot of the active window and put in the clipboard. 10 | 11 | wnd.active.GetRect(out var r, true); 12 | using (var b = CaptureScreen.Image(r)) { 13 | new clipboardData().AddImage(b).SetClipboard(); 14 | } 15 | 16 | /// Take screenshot of a user-selected area and save in a file. 17 | 18 | var file2 = folders.Temp + "screenshot2.png"; 19 | if (!CaptureScreen.ImageColorRectUI(out var captured)) return; 20 | captured.image.Save(file2); 21 | run.it(file2); //see what we have 22 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/changes/old/v1.5.md: -------------------------------------------------------------------------------- 1 | ## Version 1.5.0 (2024-09-12) 2 | 3 | ### Editor 4 | New much bigger Windows API database. 5 | 6 | Changes in `/*/ meta comments /*/`: 7 | - Options can be separated by newlines without semicolon. 8 | - Options can be commented out like `//option value;`. 9 | 10 | New cookbook recipes: 11 | - Passwords in scripts. 12 | 13 | Improved: 14 | - Several improvements. 15 | 16 | Fixed bugs: 17 | - Possible exception when a script is starting. Rare. 18 | - And more. 19 | 20 | ### Library 21 | New members: 22 | - **print.it** and **print.util.toString** overloads for binary data displayed in hex editor format. 23 | 24 | Fixed bugs: 25 | - **consoleProcess** functions **Write** and **Prompt** don't auto-append newline if input encoding is **Encoding.Unicode**. 26 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/changes/old/v1.0.md: -------------------------------------------------------------------------------- 1 | ## Versions 1.0.0 (2024-01-22) to 1.0.1 (2024-01-28) 2 | 3 | ### Editor 4 | Debugger. 5 | 6 | In icon names can be specified size, like `"*Pack.Icon color @12"`. See [ImageUtil.LoadWpfImageElement](). 7 | 8 | Menu **Edit > Generate > Create event handlers, overrides**. 9 | 10 | Fixed bugs: 11 | - When compiling a library, incorrectly adds icons specified in code like `"*Pack.Icon color"`. Then the library may fail to load these icons. 12 | - Incorrectly installs some NuGet packages. 13 | 14 | New in 1.0.1: 15 | - Debugger command **Jump to here**. 16 | - Debugger can print assembly unload events. 17 | 18 | ### Library 19 | New members: 20 | - **wpfBuilder**: **Last2**, **LabeledBy**. 21 | 22 | ### Breaking changes 23 | Removed the "debugger script" feature. 24 | -------------------------------------------------------------------------------- /Au.Editor/_prePostBuild.cs: -------------------------------------------------------------------------------- 1 | /*/ role editorExtension; /*/ 2 | 3 | if (args[0] == "post") { 4 | var outputPath = args[1]; 5 | 6 | var source = @"C:\code\au\_"; 7 | run.console(out var so, "robocopy.exe", $"\"{source}\" \"{outputPath}\" /e /sj /sl /r:2 /w:1 /xd Default Git SDK /xf *.pdb Au.dll Au.Controls.dll Au.Editor.dll LibreAutomateSetup.exe"); 8 | 9 | //compiler always copies the true Au.dll to outputPath. Let's replace it with our Au.dll. 10 | filesystem.copyTo(@"C:\code\ok\dll\Au.dll", outputPath, FIfExists.Delete); 11 | } else { 12 | foreach (var w in wnd.findAll("**m LibreAutomate||Find window||Find UI element", "HwndWrapper[Au.Editor;*", also: o => o.ProcessId != process.thisProcessId)) { 13 | w.Close(noWait: true); 14 | w.WaitForClosed(3, waitUntilProcessEnds: true); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Au/Triggers/Triggers_util.cs: -------------------------------------------------------------------------------- 1 | namespace Au.Triggers; 2 | 3 | static class TrigUtil { 4 | /// 5 | /// Gets left and right modifiers. Uses . 6 | /// Returns modL | modR. 7 | /// 8 | public static KMod GetModLR(out KMod modL, out KMod modR) { 9 | KMod L = 0, R = 0; 10 | if (keys.isPressed(KKey.LCtrl)) L |= KMod.Ctrl; 11 | if (keys.isPressed(KKey.LShift)) L |= KMod.Shift; 12 | if (keys.isPressed(KKey.LAlt)) L |= KMod.Alt; 13 | if (keys.isPressed(KKey.Win)) L |= KMod.Win; 14 | if (keys.isPressed(KKey.RCtrl)) R |= KMod.Ctrl; 15 | if (keys.isPressed(KKey.RShift)) R |= KMod.Shift; 16 | if (keys.isPressed(KKey.RAlt)) R |= KMod.Alt; 17 | if (keys.isPressed(KKey.RWin)) R |= KMod.Win; 18 | modL = L; modR = R; 19 | return L | R; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Cookbook/files/Keys, mouse, clipboard/Mouse get position, wait, cursor, etc.cs: -------------------------------------------------------------------------------- 1 | /// Get mouse cursor position. 2 | 3 | var p = mouse.xy; 4 | print.it(p); 5 | 6 | /// Is mouse left button pressed? 7 | 8 | if (mouse.isPressed(MButtons.Left)) print.it("yes"); 9 | 10 | /// Wait for mouse left button down. More info<>. 11 | 12 | mouse.waitForClick(0, MButtons.Left); 13 | 14 | /// Wait for cursor (mouse pointer). More info<>. 15 | 16 | mouse.waitForCursor(0, MCursor.Hand); //standard 17 | mouse.waitForCursor(0, -3191259760238497114); //custom 18 | 19 | /// Get cursor hash for <.x>waitForCursor<>. 20 | 21 | if(MouseCursor.GetCurrentVisibleCursor(out var c)) print.it(MouseCursor.Hash(c)); 22 | 23 | /// Also there are more class functions. 24 | -------------------------------------------------------------------------------- /Cookbook/files/Data, document/Databases.cs: -------------------------------------------------------------------------------- 1 | /// For SQL Server databases use NuGet package <+nuget>Microsoft.Data.SqlClient<>. For other databases look for other NuGet<> packages. Look for more info+examples on the internet. 2 | 3 | /*/ nuget -\Microsoft.Data.SqlClient; /*/ 4 | using Microsoft.Data.SqlClient; 5 | 6 | var connectionString = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Test\SqlServer\Database1.mdf;Integrated Security=True"; 7 | using var con = new SqlConnection(connectionString); 8 | con.Open(); 9 | 10 | var c1 = new SqlCommand("INSERT INTO [dbo].[Table] VALUES (2, 'text');", con); 11 | c1.ExecuteNonQuery(); 12 | 13 | var c2 = new SqlCommand("SELECT Id,Name FROM [dbo].[Table];", con); 14 | using (var r = c2.ExecuteReader()) { 15 | while (r.Read()) { 16 | print.it(r[0], r[1]); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Libraries/scintilla/src/Position.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file Position.h 3 | ** Defines global type name Position in the Sci internal namespace. 4 | **/ 5 | // Copyright 2015 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef POSITION_H 9 | #define POSITION_H 10 | 11 | /** 12 | * A Position is a position within a document between two characters or at the beginning or end. 13 | * Sometimes used as a character index where it identifies the character after the position. 14 | * A Line is a document or screen line. 15 | */ 16 | 17 | namespace Sci { 18 | 19 | typedef ptrdiff_t Position; 20 | typedef ptrdiff_t Line; 21 | 22 | inline constexpr Position invalidPosition = -1; 23 | 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Other/DocFX/_doc/template1/mod.txt: -------------------------------------------------------------------------------- 1 | Using 3 templates: 2 | template1 - modified "mathew" template. It is included in the DocFX "Templates" webpage. Downloaded from github. Mostly changes style. 3 | template2 - styles to change in member pages. Copied from mathew and modified. 4 | 5 | Currently not using the affix. It is the dynamic links at the right. 6 | 7 | Note: after copy/paste in VS, undo autoformatting done by VS. It damages
.
 8 | 
 9 | Unsuccessfully tried to create a plugin.
10 | 	Followed the tutorial, created the plugin, copied the output files to the plugins folder of template1.
11 | 	Error when DocFX runs: Error:[ImportPlugins]Error when get composition container: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information., loader exceptions: Could not load file
12 | 
13 | 


--------------------------------------------------------------------------------
/Cookbook/files/Script/Run script at startup, output link.cs:
--------------------------------------------------------------------------------
1 | /// To run a script when the editor program starts (actually whenever this workspace loaded), add it in Options > Workspace > Startup scripts<>. Use path like `\Folder\Script.cs` or name like `Script123.cs`. Can be several scripts in separate lines. To temporarily disable a script, prepend `//`, like `//\Folder\Script.cs`.
2 | 
3 | /// To run a script when Windows starts and don't start the editor too, need to create exe program<> from the script. Then launch it like any other program, for example create shortcut in the Startup folder or use Windows Task Scheduler.
4 | 
5 | /// Yet another way to run a script - a link<> in the output panel. In another script use code like this:
6 | 
7 | print.it("<>Run script