• 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.

 

Hellbent and Isaias solving Cursor / Bitmap issue with GDI in v2

Solving cursor and bitmap issues in GDI for AutoHotkey v2

Solving cursor and bitmap issues in GDI for AutoHotkey v2

The video discusses using GDI to solve bitmap and picture control issues, including capturing and pasting images with the cursor, and explores different methods for creating and saving bitmaps in C++ and Python.

  • 00:00 👨‍💻 Isaias and Hellbent worked on bitmap and picture control issues, creating a new screenshot class with cursor capture function using GDI.
    • Isaias and Hellbent worked through bitmap and picture control issues in the GDI library, sharing deep learning experiences.
    • Created a new class called screenshot in hotkey V2 that can take screenshots from screen, activity window, and client, with a function called capture, which had an issue with reading information in the wrong order but was eventually resolved.
    • The speaker captures the cursor using GDI and fills out a specific structure with information about the cursor’s size, flags, position, and type.
    • The function gets the icon, reads values from the cursor, draws it using GDI, and returns the context for that particular cursor.
  • 04:30 📋 When working with GDI, manually releasing objects and copying memory prior to setting up the clipboard can solve issues with capturing and pasting images, including the I-beam cursor.
    • When working with GDI, objects must be released manually, and creating a new bitmap can cause issues when trying to copy it to the clipboard.
    • The speaker explains a function that captures cursor information and saves it properly into the clipboard, but when using an I-beam cursor, the captured image appears as a blank square.
    • The I-beam cursor changes color depending on the background and may not actually be an I-beam, with the bit mask and color playing a potential role in its appearance.
    • Copying memory prior to setting up the clipboard may solve issues with the H Global memory handle.
    • Is there a GDI function to convert H Global to H bitmap for use in a picture control?
    • The speaker demonstrated how to copy an image to the clipboard and paste it into a program using the “get image” function.
  • 13:37 📚 Use GDI plus underscore create bitmap from clipboard to easily copy and retrieve images for quick prototyping in the library.
    • The solution is to take the internet into the library.
    • The speaker found a function called GDI plus underscore create bitmap from clipboard that allows for copying images from the clipboard to the screen.
    • Quickly prototype by using a simple two-line code to transfer clipboard data into a bitmap or h-bitmap for testing.
    • The speaker explains how to copy an image to the clipboard and retrieve it using a static function in a class method.
  • 20:00 🔍 Knowing the difference between calling static and instance methods is important in V1 and V2.
    • The speaker discusses the difference between calling static and instance methods in V1 and V2, and the importance of knowing which one to call.
    • The speaker encountered a problem with the clipboard data and pointer allocation while trying to access a screenshot image class.
    • The speaker debugs an issue with a clipboard function by opening the clipboard before trying to get information out of it.
    • The issue with displaying data is not the data itself, but rather the control used to display it, specifically the use of GDI.
  • 26:18 📋 The speaker discusses saving a bitmap to a file and converting a pointer to a bitmap using “convert HP” function.
    • Copying an image to the clipboard requires an additional step of saving it to a file and then reading the file.
    • The speaker plans to save a bitmap to a file but is unsure if it will solve the problem they are currently facing.
    • The speaker discusses converting a pointer to a bitmap using a function called “convert HP” and notes that taking a screenshot already sets the H bitmap.
    • Create a bitmap and save it to a file using the pivot map.
  • 31:54 💻 Updating libraries and code is crucial for project success, while exploring different methods to create and save bitmaps in a file.
    • Always use Unicode and include the GDI plus library for testing, as there is no library for read.
    • The speaker is discussing the use of a codec to decode a string and obtain encoder parameters.
    • The speaker suggests the need for a visual confirmation when saving files and encounters an issue with the control function.
    • The speaker explores different methods to create and save bitmaps in a file.
    • The speaker discusses issues with outdated libraries and code in a project, and mentions the need to update to a newer version.
  • 40:09 👨‍💻 The speaker discusses file creation, pointer usage, and image saving in C++ and Python, encountering issues with if statements and file verification.
    • The speaker discusses creating a file and using a pointer in a function.
    • The code saves a bitmap to an H file and creates a BMP file using GDI library.
    • The speaker encountered an issue with an if statement, made some adjustments, and successfully wrote to a file, but had to specify the type of number every time, and still needed to verify if the file had the correct icon.
    • The speaker demonstrates how to locally load and save an image file in Python using the show function.
    • Using alt submit and GDI plus library allows for proper rendering of binary data in picture controls.
    • Data can be stored in a rock using ones and zeros.
  • 50:24 📷 Using GDI+ Library’s set image function can improve the quality of PNG images in a picture control, but there may be bugs with submitting images on a handle.
    • PNG images have transparency and opacity represented by zeros and ones, and GDI plus is required to work with newer image formats like PNG, which creates composite images with transparency.
    • The speaker discusses the issue of loading PNG images in a picture control and how specifying the image type as PNG does not work with a handle, but using the GDI+ Library’s set image function can improve the quality of the image.
    • The speaker encountered issues with a control’s size and loading a bitmap using GDI plus, but found that it worked correctly when using a BMP file and the “alt submit” command.
    • The rendering function doesn’t know how to handle transparency bits, resulting in different values when viewing an image in different ways.
    • The speaker discusses their process of creating a function to take screenshots from different sources and mentions the potential for using it in a Window Snipping Tool.
    • The issue of submitting images on a handle is complex and there may be a bug with the old submit that needs to be addressed.

GUIs are Easy v2 Course – Module 1: The basics

It seems that you haven’t purchased this course yet or you are not logged in.

Log into Your Account

Lost Password?


thumbnail100 rbg

Normal Price: 139.99
Sale price: 99.99
Want 25% off?

https://media.publit.io/file/GUIsAreEasyv2Mod1/Promo.mp4


All of our courses are sold with a 30 day Double your money back guarantee!
If you are unhappy with the course for any reason within the first 30 days, you can get 2X what you paid, no questions asked!


Creating GUIs tested by billions of people is easy with AutoHotkey

If you are looking for a way to create graphical user interfaces (GUIs) for your scripts and applications, you might want to check out AutoHotkey v2. AutoHotkey is a powerful scripting language that can automate tasks, create hotkeys, manipulate text, and much more. And with the latest version of AutoHotkey, creating GUIs has never been easier.

The course is designed for beginners and intermediate users who want to learn how to create GUIs with AutoHotkey v2. It has ~4.5h  of content!.

P.S. You don’t need any prior experience with GUI programming but being familiar with objects in AutoHotkey will help but is not NEEDED.  Our Intermediate AHK Objects & Classes course is a great way to get familiar with objects.

thumbnail

Here’s a high-level overview of what you’ll learn

  • Create Mockups so your GUI is well thought-through
  • Easily build GUIs in just a few lines of code
  • Leverage the proven Microsoft Controls (without having to be a programmer)
  • Learn how to create GUIs by an amazing instructor with 10+ years of GUI experience
  • This is the simplest way to make GUIs or your money back!
  • Other than AutoHotkey there are NO LIBRARIES to install / download!  Your Windows computer has everything you need!
  • Courses are in clear, easy to follow, sections which help you learn snippets at a time
  • UI / UX design doesn’t have to be complicatedYou may find it hard to believe that GUIs are easy but don’t just take our word for it, read the reviews of this course.   Or better yet buy it and, if you’re not happy for ANY reason, simply ask for a refund.

You can get the course by clicking here. Remember, you can get a 25% discount by becoming an AHK Hero.

Objections to Joining the AHK Hero Club

So, you’ve decided to not take me up on our unbelievable offer of joining the AHK Hero group.  I view this as my failure because, all of our members agree, it is an incredible offer.

Here are some of the top objections / reasons why you might have decided the AHK hero club is not for you and why we disagree.

Reality: Many of the AHK hero members are very new to AutoHotkey.  They enjoy the calls and the Telegram chat because they can ask questions and save themselves a TON of time by getting feedback from experts that understand lack of knowledge is not a sign of lack of intelligence.   Also the Saturday call is intended for people new to AutoHotkey

Reality: Many of our members are retired and are loving AutoHotkey to keep their mind active.  Our eldest member recently celebrated his 82nd birhtday!

Reality:  Let me ask you this.  Do you have all the time you would possibly want?  Or are you like the rest of us that are limited on your time?   Learning AutoHotkey is a way of “buying time”.  Having access to AHK Experts means you can save even more time because we can point you in the right direction saving you a ton of time!

Also we currently offer    and bill-out at $71.99 an hour which equals ~$217 each week or $868 per month.  And that’s not taking into account access to the private Telegram group where members can ask questions during the week as well as getting 25% off on all of our courses and consultations.  Our Hero members agree the AHK Hero group is a STEAL❗

Reality: The vast majority of people using AutoHotkey have ZERO background / education in programming!  I’ve spoken to hundreds of AutoHotkey users, fielded two “AHK Surveys” having over 400 respondents and am connected to thousands of people on LinkedIn (connect with me here) that have “AutoHotkey” in their profile and I can 💯% guarantee the vast majority of people using AutoHotkey are not “programmers”.  It’s one of the true selling points of AutoHotkey!

Reality: A lot of people stumble upon AutoHotkey and try a few things but are unsuccessful at being able to automate their Windows program.  They might even ask an “expert” on the AHK forum, Reddit or Discord for help.  The painful truth is the vast majority of AutoHotkey users know 1 or 2 approaches for automating programs.

We have 19 distinct methods for automating programs with AutoHotkey.  And when we don’t know the answer, we have 41 recognized AutoHotkey experts that we can reach out to.   As a matter of fact, we have yet to find a program that we can’t automate!

Reality: Here’s the plain truth; NOBODY and I mean NOBODY “knows it all”.   And even when you find true AutoHotkey experts, they’re missing the point about the community.   There’s a phrase I’ve coined in RPA (Robotics Process Automation).   In Desktop Automation, if you don’t study what other people have done with AHK you’re not “doomed to repeat it”  you “fail to repeat it”.  Meaning we are constantly learning from each other’s uses and innovations.   As humans it is often hard to see what we’re “missing”.  So, by watching how others are using AHK, we get inspired as to ways we might use it.

Reality: A lot of people think they don’t do repetitive tasks however our days are filled with them.  We’re just poor at recognizing that they are the same thing over and over.   One way to help spot them is by batching your work.  When you start grouping together the tasks you do, it is easier for us to realize we’re repeating the same process over and over.  Batching alone helps us be more productive however this is where AHK users really start to shine as they let the humans do the “hard thinking part” and then let the computer repeat the mundane task.

Reality: This is flat-out not true.  Tank, the leader of the AHK forum (and also happens to be a tenant and good friend of mine) has the following directly from Chris Mallett.   Chris did not want the AHK forum to be a “for profit” environment.  Meaning we can’t put ads on the forum / and the AHK Foundation cannot earn money for licensing however Chris in no way what-so-ever wanted to prohibit people from making money off AutoHotkey.    I’m thinking Chris realized that, by allowing people to monetize their knowledge / scripts it would draw more interest from people (like us).  Thus the AHK Community wins because more people are creating amazing things with AutoHotkey!

Reality: This is a very common misconception.  While you might be using a program that, itself, we are not using, the program is more than likely to have been written in a language which AutoHotkey can automate.   True, out of the 12,424 AutoHotkey scripts I have on my computer, none may automate your program directly however many will be very close and similar in the approach.

Reality: The good news here is that we don’t share our videos with the general population.  Only AHK Heroes are provided with links to the videos / can attend the Zoom meetings.  While we still encourage people to anonymize their screens / data, the number of people that actually view a given videos is very low (around 25) thus it is much more private than you probably thought.   If you truly have private data, you can schedule a consultation with us and we will not share your video /scripts with anyone.  When I lived in Washington, D.C. I had a Top-Secret security clearance as I did work for: FBI, DIA, CIA, etc.  Trust me when I say I take privacy VERY seriously!  Your Intellectual Property is (somewhat) protected.

Reality: A lot of our members don’t attend the calls.  However, you can watch the recordings at your convenience, however many simply use the private Telegram group for asking questions and getting help/quick direction.  Most days we have several people asking questions and getting help.  It’s a much friendlier place the AHK Subreddit and much simpler than Discord.  Besides, in our group you know you’re getting advice from true experts, not just people who happen to hang out.

Reality: We’ve lead 68 AHK webinars, 145 AHK Podcasts, 85 live streams helping AHK Users and have over 1,300+ AutoHotkey videos on YouTube.  We’ve already had 90+ AHK Hero 1-hour sessions where we’ve helped members.  We’re also running the largest AHK Facebook group, both LinkedIn AHK groups (btw- I have ~1,400 LinkedIn connections that use AutoHotkey), and have ~43 AHK Gurus on “speed dial”.   It doesn’t hurt that Tank / Charlie Simmons is the admin to the AHK Forum, is a close friend and a tenant of mine.  I have over 12,000+ AutoHotkey scripts on my computer and, between Isaias and I we have been working with AutoHotkey for ~26 years.

Reality: I 💯% understand and agree.  It’s why we have the following rules that we heavily enforce:

  1. Practice respect for yourself and others.
  2. Critique Ideas not people.
  3. Accept & give constructive criticism.
  4. Make sure everyone gets a chance to contribute or speak.
  5. If others are talking wait your turn.
  6. No politics. Period!

While it is a great benefit to attend the calls live, you can still watch the recorded versions at your convenience.   And the private Telegram group is something that can be used at your convenience.  Since the Hero club is “global” there are people often answering questions at all-hours!

Reality: While this is likely accurate, the truth is tracking down the correct answer can take a lot of time.  Yes, sources like YouTube, Reddit, AHK forum, and Chat GPT can be very helpful however our members agree, there is no comparison to talking to an industry expert that work through a Question & Answer session live.

Reality: The truth is that most of us using AutoHotkey don’t want to be programmers.  But we all want to get more done in less time and automating the mundane parts of Windows programs is one of the best ways to get more done.  Sadly, there is no “one way” to automate programs thus we need to learn different approaches depending on the task at hand.   All of this gets you back to working on more important things.

Reality: One of the things I truly value about Isaias is that he understands that the answers provided need to be at the skill & knowledge level of the person we’re helping.  Many of the Hero members are very entry level while we have some that are very advanced.   Also, the Saturday session is meant for people that are just learning AutoHotkey.

Reality: You may find this hard to believe but, there was a time, where I hated being on a webcam.  It’s actually why I started doing the calls with Jackie Sztuk around 10 years ago.   But the truth is most of the Heroes don’t have their webcams on during the call.  Many of us are introverts and cherish our privacy so there’s no problem not having a webcam on and not speaking.

Reality: You may have heard this phrase: The best time to plant a tree is 20 years ago.  The 2nd best time is today!  The truth is we only have time for things when we make time for them.  If you don’t put it on your calendar now and start regularly learning how to be more productive you’ll always be “behind the 🎱 8-ball” rushing from project to project.  Only by investing in being more productive will you ever get ahead of the game.   The more AutoHotkey you learn, the more free time you have!

Reality: While there is definitely nothing wrong with learning AutoHotkey on your own, we’ve found that we learn most when we have an expert available answering questions when we’re stuck.  It’s greatly reduces the amount of time it takes to learn something when you have an expert that can explain something directly to you.

Reality: I’ve had calls with several hundred AutoHotkey users and I can tell you this.  You’ll have far more in common with the mind-set of another AutoHotkey user than you will with: colleagues, friends and family.  I know this is a bold claim but I’ve found it to be very true!  We all want to get stuff done and don’t want to spend a lot of time doing the work.  Getting something that can help me move forward with what I’m trying to do is our #1 goal!

Reality: To tell you the truth, I’m not either!  I just want to be able to focus on what matters, not the mundane.  But, if I need to spend time learning AHK to be more efficient, then that is what I’ll do because, frankly, I just have too much to do and can’t be dragged down by the mundane.

Reality: Every language has it’s niche.   AutoHotkey is the “Swiss Army Knife” for Windows.  It’s, by far, the simplest and easiest language to learn yet is amazingly powerful.  AutoHotkey “hooks” into various Windows APIs better than any other language.  Because of this, it has an amazing amount of “built-in” functionality (because in reality you’re using the Windows API to achieve the task;  AHK just makes it easier for you).  AutoHotkey v1 is super simple to learn however was tricky at doing more advanced things.  AutoHotkey v2 has a slightly-higher learning curve but is better for doing medium to advanced projects.

Reality: English is not the first language for several people in the Hero group.  But, if you’re reading this, your English is probably “good enough”.  Our Hero sessions are hosted on YouTube (but they are unlisted so nobody can find them) which means you can enable subtitles and those can help you if you’re struggling.

Reality: This is very true however remember the old axiom “You get what you pay for”.  In truth, unless you’re a “saint” the quality of the answer & willingness to help others is related to “what’s in it for me”.   Thus, by paying us for helping you, we have a vested interest in ensuring you get your problem solved.

Reality: The truth of the matter is: Automating your life is the best way to “buy time”.   Humans have been using intellect to create tools to make them more efficient for as long as time has been recorded.  AutoHotkey just happens to be the easiest RPA (Robotics Process Automation) tool to use on a windows computer.  If you’ve never heard the “sharpen the saw” story, I highly encourage you to check out this short video.