Jump to content

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

IronAHK (alpha): cross platform .NET rewrite of AutoHotkey


  • Please log in to reply
581 replies to this topic
polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012

I noticed the following about MsgBox

MsgBox has two overloads; the method for selecting which to use currently picks the wrong one in the first case. Timeout is not yet supported, but will be soon. As with SetBatchLines, after the script is compiled and executed in memory (a process called JIT) it has no reference to the file it came from. This is why you see a blank title in the third example, but I will try to look for a workaround by v0.7. Thanks for the feedback.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


aparden
  • Members
  • 15 posts
  • Last active: Feb 17 2010 12:54 AM
  • Joined: 12 Dec 2009
Titan: very cool, excellent work :)

Quick questions for ya:

Do you have a list of AHK commands or functionality that is NOT planned to be included in v1.0?

When v1.0 is released, it will basically be possible to compile any .ahk script into a .NET compatible .exe?

Also, which license are you planning on using for v1.0, and do you or the other authors have an issue with IronAHK being used to produce commercial software?

infogulch
  • Moderators
  • 717 posts
  • Last active: Jul 31 2014 08:27 PM
  • Joined: 27 Mar 2008
aparden:

iirc, Gui's won't be supported in the initial 1.0 release, though I could be wrong. And yes, it should be able to compile almost any ahk script directly into a .NET exe. (this is different from AutoHotkey in that it currently just packs AutoHotkey.exe and the (slightly modified) .ahk script into the same package for portability)

Titan said he is licensing this under the most permissive license possible, allowing it's use in commercial software.
In fact, since IronAhk will compile the .ahk script directly into a .NET binary file, it doesn't contain the original IA source and the licence isn't applicable in the first place. (I think)

Titan will probably correct me tomorrow. :p

:)

aparden
  • Members
  • 15 posts
  • Last active: Feb 17 2010 12:54 AM
  • Joined: 12 Dec 2009
Hey info,

Well, going by the roadmap - <!-- m -->http://www.ironahk.n...hanges/#roadmap<!-- m --> - it looks like GUIs will be in v0.7

I do know the difference between the AHK compiler and what IA does ;)

Lemme phrase that second question differently: will any part of the functionality of AHK (minus things you've mentioned like A_ vars) be missing, or will anything not perform as it does in an .ahk script? For example, would Sparrow http://www.autohotke...pic.php?t=36047 or AHK Cabinet http://www.autohotke...pic.php?t=29593 be fully functional?

infogulch
  • Moderators
  • 717 posts
  • Last active: Jul 31 2014 08:27 PM
  • Joined: 27 Mar 2008
It seems it didn't even take Titan to correct me. :lol:

The roadmap you just linked says "v1.0: Complete AutoHotkey compatibility on Windows"

His ultimate goal for v1.0 is to be able to take any .ahk script, run it with IronAhk, and have it act identically to AutoHotkey. (Except, of course, for the few things just mentioned. And it will hopefully run faster too. :p)

In fact, I spoke with Titan today and he plans on implementing partial support for SetBatchLines and support for more A_ variables if they are statically referenced.

Things such as Sparrow and AHK Cabinet should also be a lot easier to implement because of the built in .net apis that scripts will have instant access to. (if, perchance, they aren't compatible with IA)

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012

Do you have a list of AHK commands or functionality that is NOT planned to be included in v1.0?

The functions marked obsolete will not be supported but to ease transition the parser will quietly make the following conversions:
[*:2wk6krlb]The Set commands will be replaced with their A_ variable setters, i.e. SetWinDelay, 50 will be translated to A_WinDelay = 50, same for AutoTrim, DetectHiddenText and others.
[*:2wk6krlb]The legacy If commands (IfEqual, IfExist, IfGreater etc.) will be converted to expression-if statements.
[*:2wk6krlb]InStr and SubStr will replace older string commands like StrLen and StringTrimLeft.
[*:2wk6krlb]Repeat will be converted to Loop.
[*:2wk6krlb]Edit, ListHotkeys, ListLines and ListVars will do nothing until a future version which has better debugging support.In v2.0 these conversions will be removed, so any use of obsolete commands will result in a compiler error.

When v1.0 is released, it will basically be possible to compile any .ahk script into a .NET compatible .exe?

Yes, it happens already in the current version. You can inspect any compiled assembly with Reflector.

Also, which license are you planning on using for v1.0, and do you or the other authors have an issue with IronAHK being used to produce commercial software?

As infoG said, IronAHK uses the most permissive open source license. You are free to use all or any any part of IronAHK in your own commercial software which does not have to include the source code. A link back to the site somewhere would be appreciated but is not required.

will any part of the functionality of AHK (minus things you've mentioned like A_ vars) be missing, or will anything not perform as it does in an .ahk script? For example, would Sparrow http://www.autohotke...pic.php?t=36047 or AHK Cabinet http://www.autohotke...pic.php?t=29593 be fully functional?

Scripts should be identical in AutoHotkey and IronAHK v1.0. Chris has given some very in-depth test scripts which I check with after every major development change. After v0.9 I could add some popular scripts from the forum to my test suite to be sure every aspect is covered.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
Version 0.5 supports arrays and objects. The syntax is similar to JSON:

person := { name : "Bob", age : (A_Year - 1980) } ; simple object
ages := [ 5, 9 ] ; simple array
x := mid(ages)["mid"] ; indexing from an object returned by a function
ages[] := x ; extend array
person.children := ages ; extend object
MsgBox, %person% ; print object

mid(range)
{
	mid := (range[0] + range[1]) / 2
	return { min : (range[0] - 1), max : (range[1] + 1), mid : mid }
}

To clarify the difference:
[*:267vyjsb]Objects are associative arrays
[*:267vyjsb]Arrays are non-associative and have a zero based indexThe next version will support hotkeys, hotstrings and GUIs.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


Rad777
  • Members
  • 65 posts
  • Last active: Jan 24 2011 08:54 PM
  • Joined: 05 Jul 2007
GREAT WORK, TY

TLM
  • Administrators
  • 3864 posts
  • Last active:
  • Joined: 21 Aug 2006
Titan you are a god amongst insects!
This is (dare I say) exactly the direction that AHK needs to go in.
I like that the array syntax is like c++, keeps my brain from having to switch when I'm using both ahk and MSDEV :).
As for xplatform support, you do mean only where .exe bins can be run right? This area is still confusing to me especially after a friend ran my compile on Mac as I stated here: <!-- m -->http://www.autohotke...pic.php?t=54605<!-- m -->

Anyway great work Titan!

Posted Image

don't duplicate, iterate!


polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012

As for xplatform support, you do mean only where .exe bins can be run right? This area is still confusing to me especially after a friend ran my compile on Mac as I stated here: <!-- m -->http://www.autohotke...pic.php?t=54605<!-- m -->

Any operating system which supports at least .NET 2.0. Almost every version of Windows from XP onwards has this. For Linux you need Mono but most recent desktop distros like Ubuntu, Suse, Fedora have it installed by default. On OSX, Mono has to be installed manually.

The thread you linked to mentions Wine which appears to be similar to Mono, Java and other virtual machines. There are many technical differences with mouse and keyboard hooks, GUIs, performance and integration with native applications. I believe Mono excels in all aspects which should be apparent over the next few major updates.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


TLM
  • Administrators
  • 3864 posts
  • Last active:
  • Joined: 21 Aug 2006

There are many technical differences with mouse and keyboard hooks, GUIs, performance and integration with native applications. I believe Mono excels in all aspects which should be apparent over the next few major updates.

OMG thank you so much for that info. Posted ImagePosted Image
I will pass this on.

Cant wait for future iterations.

Posted Image

don't duplicate, iterate!


AppleJ
  • Guests
  • Last active:
  • Joined: --
titan, I just want to say you are doing very good work.

fincs
  • Moderators
  • 1662 posts
  • Last active:
  • Joined: 05 May 2007
I can't get IronAHK working. If I run IronAHK.exe with no parameters I get "The system cannot find the file specified". If I try to run a script I get "Could not execute: A exception occured in the invocation target". What am I doing wrong?
PD: I have Windows 7 32-bit & .NET 3.5.
(Italics=translated text)

D:\IronAHK>ironahk
The system cannot find the file specified.

D:\IronAHK>ironahk Example.ahk
Could not execute: A exception occured in the invocation target.

D:\IronAHK>ironahk /?
Usage: IronAHK.exe [/out filename] <source file>

D:\IronAHK>ironahk /out blah.exe Example.ahk

D:\IronAHK>blah

[nothing happens]
D:\IronAHK>



polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
Are you sure you downloaded the latest version and extracted everything (including the .dlls) all into the same folder? An invocation target exception means the script compiled successfully but calls a command which is not yet supported or has an unknown bug. This certainly should not happen with the default example script. If the problem persists please upload the compiled exe so I can take a look.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


fincs
  • Moderators
  • 1662 posts
  • Last active:
  • Joined: 05 May 2007
I basically extracted ironahk-0.5.zip to a new folder then tried to run the example script.
Here's the compiled script: http://www.autohotke...~fincs/blah.exe