Keysharp - the resurrection of IronAHK

Talk about things KeySharp, some related to AutoHotkey or C#
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: Keysharp - the resurrection of IronAHK

Post by SOTE » 22 May 2023, 02:48

mfeemster wrote:
04 May 2023, 03:00
It is with great pleasure that I announce an initial release of Keysharp.

A Windows installer and portable zip file can be found here: https://bitbucket.org/mfeemster/keysharp/downloads/
Shouldn't the download link be added to the first page too. After a while and more posts, people will miss what was on page 10, when the latest page is say 15.

User avatar
mfeemster
Posts: 104
Joined: 24 Apr 2020, 18:30

Re: Keysharp - the resurrection of IronAHK

Post by mfeemster » 22 May 2023, 09:39

Thanks @SOTE, I'm discovering some more bugs that I am hard at work on. I would prefer to get things much more solid before elevating the visibility of the project. Otherwise, I'll get flooded with bug reports.

burque505
Posts: 1731
Joined: 22 Jan 2017, 19:37

Re: Keysharp - the resurrection of IronAHK

Post by burque505 » 02 Jun 2023, 10:11

I'm happy to report that at least some COM code can work in both AHK v2.0.2 and Keysharp v0.0.2 without alteration.

Code: Select all

oWord := ComObject("Word.Application")
oWord.visible := True

;oWord.Documents.Open(A_ScriptDir . "\Range.docx") ; New document
oWord.Documents.Add()

oWord.selection.font.bold := True 
oWord.selection.TypeText("Visit ")

oWord.activeDocument.Hyperlinks.add(oWord.selection.range, "https://www.autohotkey.com","","","AHK site ")

oWord.selection.TypeText("to learn more about ")
oWord.selection.font.Italic := true

oWord.selection.TypeText("Autohotkey")
oWord.selection.font.bold := False
oWord.selection.font.italic := False

oWord.selection.TypeText(".")
oWord.selection.TypeParagraph()
oWord.selection.TypeText("That's all, folks!")

oWord.Activate()
I had some issues with the installer this morning, so I just compiled from source and installed, using the the setup.exe and keysharp.msi produced by VS 2022.

User avatar
mfeemster
Posts: 104
Joined: 24 Apr 2020, 18:30

Re: Keysharp - the resurrection of IronAHK

Post by mfeemster » 15 Jun 2023, 08:40

I've added support for fat arrow functions and have fixed many bugs. For those interested in testing, see here: https://bitbucket.org/mfeemster/keysharp/downloads/

Please give me feedback either here or in the #keysharp channel on Discord.

Thanks.

PS: @SOTE I have updated the very first post on this thread to include the download link at the top.

SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: Keysharp - the resurrection of IronAHK

Post by SOTE » 29 Jun 2023, 02:53

mfeemster wrote:
15 Jun 2023, 08:40
I've added support for fat arrow functions and have fixed many bugs. For those interested in testing, see here: https://bitbucket.org/mfeemster/keysharp/downloads/
Very nice and thanks for doing that. Makes it much more convenient and accessible to follow the progress.

Sterwe
Posts: 1
Joined: 09 Jul 2023, 10:43

Re: Keysharp - the resurrection of IronAHK

Post by Sterwe » 09 Jul 2023, 11:28

I tried to use Keysharp in Linux Mint, unfortunately I always got the error message that the "Keysharp.exe" could not be found.
So I would like to ask for help here.
One question is, is Linux supported by Keysharp.

My OS data:
OS: Linux Mint 21.1
.Net runtimes:
Microsoft.AspNetCore.App 7.0.8
Microsoft.NETCore.App 7.0.8

My procedure
I downloaded the keysharp 0.0.0.3.zip from Bitbucket and unpacked it
after that I opened a terminal window to the folder where keysharp is located.
Here is the extract from the terminal window:
~/Downloads/Keysharp 0.3$ dotnet .\keysharp.exe hello.ahk
The command could not be loaded, possibly because:
* You intended to execute a .NET application:
The application '.keysharp.exe' does not exist.
* You intended to execute a .NET SDK command:
No .NET SDKs were found.

Download a .NET SDK:
https://aka.ms/dotnet/download

Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found
steffen@steffen-ASUS-TUF-Gaming-A17-FA706IU-FA706IU:~/Downloads/Keysharp 0.3$


Can somebody please tell me if I'm doing something wrong?
Thank for your help

User avatar
mfeemster
Posts: 104
Joined: 24 Apr 2020, 18:30

Re: Keysharp - the resurrection of IronAHK

Post by mfeemster » 10 Jul 2023, 15:02

No, there is no support at all for Keysharp on Linux yet. I am trying to get the Windows part fully working first. I have almost all of it implemented, but there are a few remaining pieces that I am stumbling on. Namely: threads, COM and OwnProps in classes. After it's fully working, I'll begin the Linux work.

Edit:

In addition, I have discussed this with some members and we've spotted a problem: You can do mouse/keyboard event hooks with X server, however you cannot with Wayland. Many distros are moving to Wayland. So we are unsure what to do here until we find out how Wayland plans to support/allow global keyboard hooks.

User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: Keysharp - the resurrection of IronAHK

Post by boiler » 31 Jul 2023, 09:42

Moderator note: Removed replies that were off-topic editorial comments and questions (and inappropriate).

User avatar
mfeemster
Posts: 104
Joined: 24 Apr 2020, 18:30

Re: Keysharp - the resurrection of IronAHK

Post by mfeemster » 13 Sep 2023, 10:01

When initially developing Keysharp, I didn't think it was possible for it to support reference function parameters like:

Code: Select all

func(&p)
So the notes always said they are not supported. I got to thinking and came up with a way to implement them about a week ago. I committed the code last night, so function reference parameters are now supported.

I am still having trouble with COM and various parts of DllCall(), but I am going to punt on those for now.

Next I am going to work on dynamic properties or "OwnProps" and see how far I can get.

User avatar
mfeemster
Posts: 104
Joined: 24 Apr 2020, 18:30

Re: Keysharp - the resurrection of IronAHK

Post by mfeemster » 09 Oct 2023, 10:50

I am happy to announce testing release 0.0.0.4 has been posted on the downloads page here:

https://bitbucket.org/mfeemster/keysharp/downloads/

The usual list of caveats and differences from AHK are here:

https://bitbucket.org/mfeemster/keysharp/src/master/

This version fixes numerous parsing bugs, and also adds support for function reference parameters as well as dynamic properties used with functions such as DefineProp(), DeleteProp() etc...
Miscellaneous new functionality has also been added in various areas.

OwnProps was another of the last major functional areas to check off, so this release is an important step forward.

The remaining areas of functionality are COM (partially done), DllCall() (mostly done) and finally figuring out a threading model. That last one would benefit from some user input so we can get an idea of how users want threads to work and what the term "thread" should actually mean within Keysharp. We are always in the #keysharp channel under community projects in the Discord, so please feel free to join and opine on threads.

User avatar
mfeemster
Posts: 104
Joined: 24 Apr 2020, 18:30

Re: Keysharp - the resurrection of IronAHK

Post by mfeemster » 02 Jan 2024, 11:04

Release 0.0.0.5 has been posted on the downloads page here:

https://bitbucket.org/mfeemster/keysharp/downloads/

The usual list of caveats and differences from AHK v2 are here:

https://bitbucket.org/mfeemster/keysharp/src/master/

We've ticked off all of the remaining features to get parity (minus caveats above) with AHK v2.

This last push included:

  • Getting ComCall(), DllCall() and the sound functions fully working
  • Implementing AHK's concept of threads
  • Fixing numerous parsing bugs
  • Upgrading to .NET 8
We've also added the ability to launch real threads which are independent of the usual "green" threads. This was done to accommodate users of AHK_H who desire that functionality.

So with this major milestone met, the question is: where do we go from here? I have some thoughts:

  • The parser is done in a very bad way, using all sort of string splits and special checks for edge cases. This makes parsing bugs extremely hard to fix. The ideal way would be to make a legitimate grammar and parser with a tool like ANTLR. I would very much appreciate if someone could begin looking into this, and we can coordinate in the #keysharp channel in Discord. I really need help here because I don't have the time or know-how to do it.
  • The editor with line numbers in Keyview is very sub-optimal. It's based on a control I found and copied. If anyone knows how to make IDE style code editors, I would greatly appreciate help improving Keyview. Adding support for multiple files would be nice too.
  • The more eyes on this project, the better. I'm sure there are still many bugs lurking. So a good way to find them would be to port well known AHK v2 projects piece by piece using Keyview, then reporting bugs on bitbucket or in the Discord.
  • One of the original purposes of this project is to get it working on Linux. Some parts of the code are cross platform, but other parts are very Windows specific. Trying to find the equivalent Linux calls is going to be a substantial effort. I would greatly appreciate help if someone could begin researching this. I can go over the code with them on Discord so they are not shooting in the dark. Note: Wayland prohibits much of what we want to do, so this will be an X11-only effort.

Those are my thoughts at this point, I welcome input.

SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: Keysharp - the resurrection of IronAHK

Post by SOTE » 14 Jan 2024, 13:15

mfeemster wrote:
02 Jan 2024, 11:04
Release 0.0.0.5 has been posted on the downloads page here:

https://bitbucket.org/mfeemster/keysharp/downloads/

The usual list of caveats and differences from AHK v2 are here:

We've ticked off all of the remaining features to get parity (minus caveats above) with AHK v2.
The continual progress is fantastic. :dance:
  • One of the original purposes of this project is to get it working on Linux. Some parts of the code are cross platform, but other parts are very Windows specific. Trying to find the equivalent Linux calls is going to be a substantial effort. I would greatly appreciate help if someone could begin researching this. I can go over the code with them on Discord so they are not shooting in the dark. Note: Wayland prohibits much of what we want to do, so this will be an X11-only effort.
It appears that one of the best AHKers for this is phil294 (@phil294). He has mentioned your project and has created an AHK v1 classic semi-clone for Linux. You guys collaborating would probably be the optimal situation.

User avatar
mfeemster
Posts: 104
Joined: 24 Apr 2020, 18:30

Re: Keysharp - the resurrection of IronAHK

Post by mfeemster » 14 Jan 2024, 15:54

Thanks @SOTE, I am continuing to work on it. Finding and fixing bugs. What I'm doing to test is taking the various *.ahk scripts that come with the AHK v2 installer, and making sure Keysharp can properly parse and run them. This is revealing many bugs and I am fixing them one by one. For example, I can run WindowSpy.ahk now with minimal modifications.

Regarding linux, Phil and I have had a voice chat session on Discord to go over some of the basics.

For the time being, I am going to continue working on getting the Windows build working properly.

SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: Keysharp - the resurrection of IronAHK

Post by SOTE » 15 Jan 2024, 08:26

mfeemster wrote:
02 Jan 2024, 11:04
  • The editor with line numbers in Keyview is very sub-optimal. It's based on a control I found and copied. If anyone knows how to make IDE style code editors, I would greatly appreciate help improving Keyview. Adding support for multiple files would be nice too.
Something that you might want to add or think about it, is a simple macro recorder (or as separate tool called from Keyview) and compiler option (to .exe and .dll), combined with Keyview. I think it's almost inevitable that this would come up.
  • The more eyes on this project, the better. I'm sure there are still many bugs lurking. So a good way to find them would be to port well known AHK v2 projects piece by piece using Keyview, then reporting bugs on bitbucket or in the Discord.
Seems like you might want to go ahead and ask/allow there to be a Keysharp subforum, like there is for AutoHotkey_H. You are kind of tucked away, so don't think this thread or its importance is so obvious to random visitors. Having the Keysharp subforum seems like it would naturally help put more eyes on the project. In addition to that, maybe add to SourceForge (https://sourceforge.net/). I've seen lots of alphas (and almost alphas) added there, and your project is much further along than many I've seen posted. This could help get some interesting outsider perspectives, in addition to AHKers.

To help people along, maybe have an example section on the Keysharp subforum and at SourceForge. This would encourage people to try or port over their AHK v1 and v2 scripts to Keysharp, and see how things go.

User avatar
thelegend
Posts: 13
Joined: 23 Mar 2021, 15:29

Re: Keysharp - the resurrection of IronAHK

Post by thelegend » 15 Jan 2024, 09:39

SOTE wrote:
15 Jan 2024, 08:26
Seems like you might want to go ahead and ask/allow there to be a Keysharp subforum, like there is for AutoHotkey_H. Y
I'm one of those random people that saved this thread to get notifications of how the project is moving forward. And I think a subforum is a great idea!

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Keysharp - the resurrection of IronAHK

Post by joedf » 15 Jan 2024, 11:54

Okay, I've made a post about this idea here: viewtopic.php?f=2&t=124920
So that this a dedicated place for it. Please give your input! :thumbup:
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]

User avatar
mfeemster
Posts: 104
Joined: 24 Apr 2020, 18:30

Re: Keysharp - the resurrection of IronAHK

Post by mfeemster » 23 Jan 2024, 17:45

I've made a new release, 0.0.0.6.

The new place to post for this project this stickied thread: viewtopic.php?f=81&t=125220

So I am going to stop updating this thread now.

Post Reply

Return to “KeySharp”