Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

AHKIDE Project (discontinued)


  • Please log in to reply
155 replies to this topic
JoeSchmoe
  • Members
  • 304 posts
  • Last active: Feb 28 2013 05:39 PM
  • Joined: 17 Feb 2008

If someone serious continue this project it's should be really good ! 8)

With IronAHK coming along solidly, my hope is that one might see an increase in people interested in both AHK and C#. The original developer of AHK made it so incredibly easy to use that many people who have never programmed before start programming using AHK. When they want a language designed for application development, they may transition to C# because IronAHK provides easy interoperability with CLI languages (of which, one could argue, C# is the best supported example for serious app development) and was written in it. Perhaps one of them will pick up this project.

As for myself, I have a 3500 line AHK script, and over the long term, would be interested in potentially porting portions of it to C#, so I find this new project interesting as well. A nice C# or CLI wrapper for AutoHotkey.dll (i.e. AutoHotkey_L) could be pretty cool.

IsNull
  • Moderators
  • 990 posts
  • Last active: May 15 2014 11:56 AM
  • Joined: 10 May 2007

would be interested in potentially porting portions of it to C#

out of curiosity:

1. IronAHK has (in rusty.dll) a Library of all those AHK Functions/Commands.
2. IronAHK produces from AHK Code C# Code (CodeDOM, which can be compiled in any .NET language) - so what want you port? :D
3. c# is a strongly typed, Object oriented language, so I think if you really want use and write in c#, you may consider to write most things new.

JoeSchmoe
  • Members
  • 304 posts
  • Last active: Feb 28 2013 05:39 PM
  • Joined: 17 Feb 2008
Great points, IsNull.

I've got this large codebase, and I know that I'd probably be better off in C#, but AHK is holding up remarkably well. I just don't have the time or see the killer feature to motivate me to port it. As a general long term interest, I'm interested in ways to mix the two languages.

One possible scenario: I've switched to _L, and am running happily in it. I really hope that Lexikos and Polyethene work hard to keep their extensions compatible, but Polyethene has explained that that will be difficult. Hence, I may decide to switch primarily to C#, but want to run some AHK_L code from within it, perhaps for the GUI, for example. Because it will be native C++ based code, it will be nice and snappy.

Of course, I could probably just call AHK.DLL directly from the C++ code, without using drifter's wrapper, whatever that turns out to be, so maybe this use case doesn't make sense. To be honest, I hadn't thought about it much, so your point is well taken. I'm just glad to see potentially more expertise at C#/AHK integration in the community.

2. IronAHK produces from AHK Code C# Code - so what want you port? :D

I think you mean that IA produces CLI code, right?

3. c# is a strongly typed, Object oriented language, so I think if you really want use and write in c#, you may consider to write most things new.

Yeah, I know, my first languages were Pascal and C, so I understand strong typing. I know about object oriented programming, but don't have experience, so I'm probably pretty bad at it. I realize that when I say "port," this will pretty much involve writing things new. Yet, somehow I bet that all the work I've done in AHK will help me with the design of it.

IsNull
  • Moderators
  • 990 posts
  • Last active: May 15 2014 11:56 AM
  • Joined: 10 May 2007
The IA Compiler uses the CodeDOM to produce Code. You can export this (also CLI Code) to C#/VB.NET what soever.
Easiest scenario would be to complie your code with IA and then use .NET_Reflector
Never then less, it would be better to self write your Code.

C# / OOP:

Knowing the Basics about OOP / OOD is one thing, the other is to have an idea of real world OO Design. This is not that easy, but it comes if you keep doing it - always a thing of experience.

I suggest you to learn C#/OOP with some kinda good Book, and after you have some experience you will be able to port your AHK Code - with help of the IA Rusty dll for ex.

Ah yes - AHK has some key features which are really cool, so even if you mastered c# there are reasons to keep AHK Code ;) (otherwise I wouldn't' be here)

@mod: You may split this ot :)

JoeSchmoe
  • Members
  • 304 posts
  • Last active: Feb 28 2013 05:39 PM
  • Joined: 17 Feb 2008
Thanks for the great info, IsNull. It was really interesting reading about CodeDom. For anyone else reading this, it is a .Net namespace used for internally representing and automatically generating code. At it's heart, it's a collection of maybe 70 classes used for representing different types of tiny pieces of code (for example, a reference to the argument to a function). Instances of these classes are connected together into trees to represent larger pieces of code. From this internal representation, code can be spit out in several languages. (Hope I got that right.)

I found the following article useful, and others might find it interesting:
<!-- m -->http://www.15seconds...ssue/020917.htm<!-- m -->

@IsNull: in IronAHK, does CodeDom spit out CLI Code?

@mod: I'm all for splitting this out as well.

IsNull
  • Moderators
  • 990 posts
  • Last active: May 15 2014 11:56 AM
  • Joined: 10 May 2007
The CodeDom is just a language indepent representation of Code.

IA compiles the CodeDom directly in a Assembly but with the CodeProviders in .NET (C#,VB.NET, JScript) you can generate source files of all these languages.

The CodeDomProvider is the core for those Actions, have a look at the provided methods. The concrete implementation of this abstract class depends on the choosen Language.