Post by SOTE » 14 Dec 2018, 23:35
nnnik wrote: ↑14 Dec 2018, 03:19
Yeah you would have to give up on Hotkeys, Window features, Send and Control features.
Pascal programmers have long ago created code for Hotkeys and Sendkeys, and the code is on the Lazarus forums. Sendkeys is part of so many languages, to include VBScript. Other features for Windows and controls are a matter of coding. Object Pascal is nearly as capable as C++ for doing what is needed. What is not already available in the Lazarus IDE or Object Pascal, can be coded as functions or libraries. There are already a number of Pascal projects that provide automation, and provide various features and functions that are in AutoIt and AutoHotkey. And it's not like those programming in Pascal can't port or be inspired by looking at C or C++ code, for making an Object Pascal version. To even include that there are programs that can do source-to-source from C to Pascal.
The mix of application building, automation features, and utility is relative to what people have in mind. That is to say, that the intent may not be to exactly duplicate AutoHotkey for Windows, but might be to provide a significant and useful set of features. A good example of this is AutoKey on Linux, which appears to have been inspired by AutoHotkey. Object Pascal is already great for building applications, across many different platforms. We are not talking about re-inventing the wheel or automation from day 1, but mainly talking adding various automation features to a very strong application building platform, and to what extent
To have an understanding of how much more further along some Object Pascal projects are, in regards to automation, refer to the Simba project. This project is quite old, from more than 8 years ago, yet had/has many AutoHotkey-like features and is
cross-platform on both Windows and Linux.
Simba features include Sendkeys, FindColors, IsKeyDown, CreateBitmapString (Bitmap to string), OCR, various Target Window functions and commands, etc...
http://docs.villavu.com/simba/referencescript.html In fact, Simba could arguably be feature compared to AutoHotkey and AutoIt, as they are today, despite that it was developed years ago. Simba is also open-source, on GitHub, and still has some activity.
https://github.com/MerlijnWajer/Simba/releases(Simba releases on GitHub)
The AutoHotkey language is just a subset of the total of what Object Pascal can do. And what is even more interesting, is how well the 2 different languages match up in many areas. If you go through the AutoHotkey Alphabetical Command and Function Index, you will find that a substantial portion of such is already available in the Object Pascal language. It's really more a matter of "
translation" from one language to the other, thus I suggested going the
transpiler route. This potentially opens the door for AHK coders to do source to source translation and then compile useful scripts directly on other OSes. Anyway, the point of posting about it, was to provide some food for thought.
[quote=nnnik post_id=253070 time=1544775548 user_id=74]
Yeah you would have to give up on Hotkeys, Window features, Send and Control features.
[/quote]
Pascal programmers have long ago created code for Hotkeys and Sendkeys, and the code is on the Lazarus forums. Sendkeys is part of so many languages, to include VBScript. Other features for Windows and controls are a matter of coding. Object Pascal is nearly as capable as C++ for doing what is needed. What is not already available in the Lazarus IDE or Object Pascal, can be coded as functions or libraries. There are already a number of Pascal projects that provide automation, and provide various features and functions that are in AutoIt and AutoHotkey. And it's not like those programming in Pascal can't port or be inspired by looking at C or C++ code, for making an Object Pascal version. To even include that there are programs that can do source-to-source from C to Pascal.
The mix of application building, automation features, and utility is relative to what people have in mind. That is to say, that the intent may not be to exactly duplicate AutoHotkey for Windows, but might be to provide a significant and useful set of features. A good example of this is AutoKey on Linux, which appears to have been inspired by AutoHotkey. Object Pascal is already great for building applications, across many different platforms. We are not talking about re-inventing the wheel or automation from day 1, but mainly talking adding various automation features to a very strong application building platform, and to what extent
To have an understanding of how much more further along some Object Pascal projects are, in regards to automation, refer to the Simba project. This project is quite old, from more than 8 years ago, yet had/has many AutoHotkey-like features and is [u]cross-platform on both Windows and Linux[/u].
Simba features include Sendkeys, FindColors, IsKeyDown, CreateBitmapString (Bitmap to string), OCR, various Target Window functions and commands, etc... [url]http://docs.villavu.com/simba/referencescript.html[/url] In fact, Simba could arguably be feature compared to AutoHotkey and AutoIt, as they are today, despite that it was developed years ago. Simba is also open-source, on GitHub, and still has some activity. [url]https://github.com/MerlijnWajer/Simba/releases[/url](Simba releases on GitHub)
The AutoHotkey language is just a subset of the total of what Object Pascal can do. And what is even more interesting, is how well the 2 different languages match up in many areas. If you go through the AutoHotkey Alphabetical Command and Function Index, you will find that a substantial portion of such is already available in the Object Pascal language. It's really more a matter of "[u]translation[/u]" from one language to the other, thus I suggested going the [u]transpiler[/u] route. This potentially opens the door for AHK coders to do source to source translation and then compile useful scripts directly on other OSes. Anyway, the point of posting about it, was to provide some food for thought.