This file contains hidden or 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
| #Requires AutoHotkey v2.0 | |
| #Warn All ;Enable warnings to assist with detecting common errors. | |
| SendMode "Input" ;Recommended for new scripts due to its superior speed and reliability. | |
| SetWorkingDir A_ScriptDir ;Ensures a consistent starting directory. | |
| #SingleInstance force | |
| #HotIf WinActive("ahk_exe DARQ.exe") | |
| ^1:: | |
| { | |
| ;Chapter 5 - Spinning Labyrith puzzle |
This file contains hidden or 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
| public class NppSelection | |
| { | |
| readonly IntPtr sci; | |
| public NppSelection(IntPtr currentScintilla) { sci = currentScintilla; } | |
| public int Anchor | |
| { | |
| get { return (int)Win32.SendMessage(sci, SciMsg.SCI_GETANCHOR, 0, 0); } | |
| set { Win32.SendMessage(sci, SciMsg.SCI_SETANCHOR, value, 0); } |
This file contains hidden or 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
| using System; | |
| using System.Collections; | |
| using System.Text.RegularExpressions; | |
| using System.Windows.Forms; | |
| public class ListViewSorter : IComparer | |
| { | |
| const string HUMAN_COMPARE = "(?'str'[^0-9]+)|(?'num'[0-9]+)"; | |
| public int Column { get; set; } = 0; | |
| public int Direction { get; set; } = 1; |
This file contains hidden or 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
| using System; | |
| using System.Windows.Forms; | |
| using NppScripts; | |
| using System.Collections.Generic; | |
| public class Script : NppScript | |
| { | |
| public override void Run() | |
| { | |
| string input = Npp.GetAllText(); |