• Intro to AutoHotkey Intermediate AutoHotkey Intermediate Objects GUIs are Easy w/AutoHotkey Painlessly switch from V1 to V2

Updating the Scintilla Control

Updating the Scintilla Control

The below video discusses using a library for text editing in Scintilla, including converting function names into messages and using send and post message commands to control Scintilla, as well as adding options, styles, and highlighting keywords in a tab setting, creating lexers for syntax-based coloring, and implementing Unicode with the utf-8 library in C++.

Helpful links

  • 00:00 📚 The lecture discusses a library for text editing in Scintilla, including a function for converting function names into messages and using send and post message commands to control Scintilla.
    • The lecture discusses a library for dealing with text in an editor.
    • The function converts a function name into the actual message that needs to be sent, making it easy to call the send editor function with the translated message.
    • You can control Scintilla with the send and post message commands, with the only difference being that send message waits for a reply and has a timeout.
    • To add or remove functions in Scintilla, use the send command with the corresponding message number, which can be found in the documentation, and a basic pointer to the function saved in a static variable.
  • 05:19 📝 Learn how to efficiently edit text with the Raptor Scintilla control by adding options, styles, and highlighting keywords in a tab setting.
    • The Raptor allows for various functions with Scintilla, including automatic scrolling, styling, hot spots, and annotations, and can be replicated with basic examples provided in a folder.
    • Learn how to add options, set styles, and highlight keywords in a tab setting for efficient text editing.
    • Create a list, read it from a file, and use a lexer to add functionality to your Elixir program, including tab settings, styles, text highlighting, and notifications.
    • The Scintilla control notifies you when highlighting is needed and you can define colors or actions in Autohotkey to create an editor.
  • 10:24 👨‍💻 The separation of Lexer and control required messages to be sent separately, and creating a class with all available functions is a simple solution but requires frequent referencing of documentation.
    • The Lexer and control were previously in one DLL, but now they are separated, requiring messages to be sent to the Lexer separately.
    • The speaker explains how they created a new class called Lexile to intercept functions and translate their names into numbers, but later realized this approach was problematic for coding.
    • Creating a class with all available functions is a simple solution, but requires creating a method for each function and referencing documentation frequently.
  • 14:48 💻 Using the utf-8 library in C++ simplifies the implementation of Unicode without complex calculations.
    • Getting the length of text is simple, but adding, inserting, or getting text requires sending a buffer with a memory address and size.
    • Using the utf-8 library in C++, Unicode can be implemented without the need for complex calculations.
    • Using Aroha V2 simplifies the process of dealing with buffers in Scintilla, but the edit control library needs to be converted before it can be implemented.
    • Everything is just a number and can be manipulated with the send message command, starting with simple ones like get size or get current line before moving on to text manipulation with bar set capacity and string get/put.
  • 20:10 💻 Creating lexers in C++ or AutoHotkey for syntax-based coloring in version 5 of dll and Scintilla requires some effort, but the control itself works the same as version 4.
    • Version 5 of the dll and Scintilla has minor changes and the control itself works exactly the same as version 4.
    • The main issue is the syntax-based coloring, which requires creating a new solution, but the lexila protocol functions are already available and the project may have already been started by someone else.
    • Creating lexers in C++ is the main topic, but it is possible to create them in AutoHotkey by capturing notifications, and it shouldn’t take more than three hours to create the Elixir object, but building a C++ lexer would be more complicated.
    • The speaker plans to modify a C++ code, but it may take a week or two due to the language difference, and they will keep it in version four instead of moving to version five.
    • Learn to code in your free time, but be prepared for the challenge of creating and compiling programs.
  • 26:39 🤖 Lexilla’s text encapsulators cause highlighting issues, C++ file compilation requires specific settings, and an email tool with SQL highlighting was created using a copy-pasted configuration.
    • The issue with the Lexilla is that it only uses double quotes as text encapsulators, causing problems with highlighting, but removing the quotes would solve the issue.
    • Compiling C++ files requires a specific compiler and settings, which can be time-consuming to research and set up.
    • The speaker created an email tool with a newsletter and client lookup feature, using a copy-pasted configuration for the Scintilla control.
    • Set up SQL highlighting by adding Sentile Elixir for basic highlighting of comments, numbers, and words, and consider using the internet control tool for auto key and accessing different language lectures.
  • 31:49 💻 The lecture discussed the importance of character limits in Windows edit controls and demonstrated a data control with a size of 1.8 Megs.
    • Scintilla editor has a limit of 35,000 characters, but there are more efficient editors available without this limitation.
    • The lecture discussed the importance of the size of characters that can be displayed in a control, demonstrated a data control with a size of 1.8 Megs, and showed a quick find and replace function.
    • The default limit for the amount of text a user can enter in an edit control in Windows is 32,000 characters, but it is possible to edit up to two megabytes of text.
    • There is a function called “get limit text” and another called “set limit text” that can be used to adjust the text limit for an edit control in AutoHotkey, but it is unclear if the library itself already does this, and it may not be possible to use AutoHotkey as just an edit field.
    • The speaker discusses the maximum number of characters a user can enter in Windows NT, but this function does not affect any text already in the edit control.
    • The speaker plans to live with the limits of aided control for version one and will address any user complaints in version two.
  • 40:04 📝 Learn how to disable the toolbar and tab bar in HTML using Scintilla control, with updates to the toolkit coming soon.
    • Scintilla control can be used to quickly set up syntax highlighting for languages like HTML and Python, but modifying the wrapper itself is a separate topic.
    • The speaker discusses how to disable the toolbar and tab bar in HTML and mentions updates to a toolkit that have not yet been pushed.
    • The speaker shared a video example in the chat.


Comments are closed.