Hello,
I am new to this community (really, my first post), and also quite new to AHK as well. To be precise, I've come across AHK three months ago, cause I've been looking for a macro processor to automate some tasks in a virtual racing simulator. As usual, things got complex quite fast, I learned a lot about AHK and the list of ideas for my simulation automation software got really long. In the end, I decided to conduct a complete rewrite using the object oriented capabilites of AHK. I ended up with almost 8000 lines of code, several independent applications integrated with interprocess communication, a rules based build system similar to the good old make, but written competely in AHK, and a very capable plugin mechanism for extending the solution at the users site, since every simulation rig is different.
If you're interested take a look at the GitHub repository and the quite extensive documentation. Feel free to use parts of the code for any of your own projects, if you find something useful.
GitHub: https://github.com/SeriousOldMan/Simulator-Controller
Documentation: https://github.com/SeriousOldMan/Simulator-Controller/wiki
Have fun...
TheBigO
Using AHK for large scale software development
Re: Using AHK for large scale software development
That is some fantastic stuff. Will definitely pick your brain when I start building my own. AWESOME!
Re: Using AHK for large scale software development
Yeah, thanks. It was quite some task. The biggest challenge was the fact, that finding errors in complex code ist not quite easy in AutoHotkey, since
evaluates without error. Maybe something to change by a #Warn option in the future...
Code: Select all
foo := false
foo.callBar()[42]
Re: Using AHK for large scale software development
Impressive. You must have a strong background in programming. I have written assembly code and some C but I have learned most of what I know from AHK. I'm basically a hack with no formal training. I can learn a lot from looking at your code. I love classes but I can tell from your work that I have a long way to go to fully take advantage of what they can do.
Thanks for sharing.
Relayer
Thanks for sharing.
Relayer
Re: Using AHK for large scale software development
Version 1.2 is available for download. Lot's of new stuff, including a themes editor for your own simulation worlds, like Rallye, F1, Flight Sim 2020, and so on.
Re: Using AHK for large scale software development
Version 1.3 is out since a few days. The Button Box visual representation now uses photorealistic graphics and you can interact with it using the mouse.
Re: Using AHK for large scale software development
Hi, I wish everyone here on the board a happy new year.
And I have a new release out. This time with a very interesting feature also for non-gaming projects, a multibyte, multilanguage translation system for each and every text used (> 400 entries). A graphical user interface that helps to define the translation rules for a new language is there as well.
TheBigO
And I have a new release out. This time with a very interesting feature also for non-gaming projects, a multibyte, multilanguage translation system for each and every text used (> 400 entries). A graphical user interface that helps to define the translation rules for a new language is there as well.
TheBigO
Re: Using AHK for large scale software development
That would be awesome. Really appreciate it!
Re: Using AHK for large scale software development
It's all there already. You need to extract a few functions from Functions.ahk and isolate the TranslationsEditor classes from "Simulator Configuration.ahk". Nothing very complicated, I think it is doable in about 30 minutes.
Best, Oliver
- Delta Pythagorean
- Posts: 628
- Joined: 13 Feb 2017, 13:44
- Location: Somewhere in the US
- Contact:
Re: Using AHK for large scale software development
Give me a few days and I can port an error system that's somewhat similar to python. I use it everyday when creating script sand it works extensively well. Just have to extract it from my own libraries and not have it hard coded lol
[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat
Re: Using AHK for large scale software development
Time for an update. My software package is growing and growing. As of today, it consists of more than 15 separate applications with about 50.000 lines of AHK code and roughly 10.000 lines of C, C++ and C# code. I have even written a compiler and runtime environment for a hybrid logical programming language completely in plain AHK. This rules engine is used for voice chat capable digital assistants similar to Alexa (domain knowledge is of course racing simulations).
There are lot's of goodies, that might be useful in other AHK projects as well, for example a build pipeline (written in AHK) or a complete automatic software download, installation and update process (written in AHK), just to name a few. Please feel free to use this. I will also help, if you want to separate this from the rest of the system.
There are lot's of goodies, that might be useful in other AHK projects as well, for example a build pipeline (written in AHK) or a complete automatic software download, installation and update process (written in AHK), just to name a few. Please feel free to use this. I will also help, if you want to separate this from the rest of the system.
-
- Posts: 1
- Joined: 24 Oct 2022, 10:23
Re: Using AHK for large scale software development
Welcome to the community! Your project sounds really impressive - it's great to see what can be done with AHK with a bit of creativity and effort. I'm sure other community members will be interested in looking at your code and learning from it.
Re: Using AHK for large scale software development
Hey, thank you. It is quite a long time, I posted here, but I a still producing tons of AHK code each day. And it is amazing, that it is possible to build really serious applications using a language which started like a simple automation macro language.SandroPaling wrote: ↑24 Oct 2022, 10:25Welcome to the community! Your project sounds really impressive - it's great to see what can be done with AHK with a bit of creativity and effort. I'm sure other community members will be interested in looking at your code and learning from it.
Latest addition to my framework, which might be of interest to the AHK community, is a task and coroutining library. I think that it can easily be used standalone with a couple of simple changes: https://github.com/SeriousOldMan/Simulator-Controller/blob/main/Sources/Libraries/Task.ahk
Usage is absolutely simple. Example:
new PeriodicTask(Func("keepAlive").Bind(connector, connection), 10000, kInterruptPriority).start()
This starts a Task, which runs every 10 seconds on interrupt priority level. The obvious question: Why not use SetTimer? Answer: Because you have full control over priority levels, can start, stop and suspend tasks, and things look familar to the coders eye.
-
- Posts: 104
- Joined: 07 Aug 2015, 15:53
Re: Using AHK for large scale software development
How come you got familiar with AHK so fast. You must be a genius
Re: Using AHK for large scale software development
Puuh, ported roughly 120.000 lines to AHK 2. What a journey. Took 6 weeks almost fulltime. Tools like AHK2 Converter help a little bit, but in the end you have to take a look at every single line of code.
Learnings:
1. Performance increased by big numbers, especially when working with (hash) maps.
2. AHK2 is much more bullet-proof for the developer and finds many coding problems at startup time.
3. New type system is very flexible. I created a subclass of Gui, for example, which seamlessly implements a window reszing framework with rules integrated into the standard options of a new control (extended the Gui.Add method)
4. It is now very important to handle errors correctly. A lot more try / catch blocks are necessary to keep things running.
Next on my whish list for AHK: Optionally strongly typed variables!
Learnings:
1. Performance increased by big numbers, especially when working with (hash) maps.
2. AHK2 is much more bullet-proof for the developer and finds many coding problems at startup time.
3. New type system is very flexible. I created a subclass of Gui, for example, which seamlessly implements a window reszing framework with rules integrated into the standard options of a new control (extended the Gui.Add method)
4. It is now very important to handle errors correctly. A lot more try / catch blocks are necessary to keep things running.
Next on my whish list for AHK: Optionally strongly typed variables!
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: No registered users and 202 guests