AutoHotkey Community

It is currently May 27th, 2012, 8:17 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 552 posts ]  Go to page Previous  1 ... 33, 34, 35, 36, 37  Next
Author Message
 Post subject:
PostPosted: September 30th, 2011, 12:03 am 
Hi everyone,
I've been a Linux user for a looooooooong time and the only thing keeping me dependant from Windows is AHK. I found IronAHK today and I must ask you: is there a way to make my code work in IronAHK? I was looking it up, but without success.

Code:

w::Up
a::Left
s::Down
d::Right
q::F2 ;
1::F3 ;
2::F4 ;
3::F5 ;
e::F6 ;
r::F7 ;
f::F8 ;
v::F9 ; 
4::F10 ;
g::F11 ;
b::F12 ;
Space::Enter
LWin::F1 ;
z::+F1 ;
x::+F2 ;
c::+F3 ;
^+z::Suspend


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 3rd, 2011, 5:39 pm 
Offline
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
I was wondering how IronAHK would compare with IronRuby or IronPython:
  • Would it also be able to run in a browser?
  • Would it also be able to dynamically execute another "Iron"-Language (or being executed itself)?
  • Would it also support access to .NET classes (Framework or just written in another .NET language)?
  • What about the other way round (using IA code in e.g. C#, without dynamic execution)?
And are there any news on IA since IsNull's last post?

Regards
maul.esel

Edit: I investigated a bit further and found some disadvantages:
  • IronPython / -Ruby run on the DLR (Dynamic Language Runtime). This seems to be developed / connected to MS, although I don't know how. So not sure if this is a disadvantage :)
  • It seems you cannot use those from C# or VB.NET: you can create an engine and execute it dynamically, but you can't access any classes like e.g. C# classes. IA does not have classes, but it would be cool :)

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 11th, 2011, 9:10 pm 
Offline
User avatar

Joined: May 10th, 2007, 10:54 am
Posts: 649
Location: .switzerland
Quote:
I was wondering how IronAHK would compare with IronRuby or IronPython.

This is a good question and also the fact that IronRuby/IronPython integrate into the Visual Studio is very interesting. I will do some research on this on my next developing time for IA/AHK and my IDE plans. (I expect that will be in my winter holiday where I hopefully can take some time for this - I might then to do some tests on this platform as it seems to work good with other dynamic script languages.)

Btw: Having access to the .NET Objects is somewhat of a must have for a .NET implementation, as it is a must have for a (new) language to support objects (or another similar abstraction of the world).
Poly mentioned some time ago, that supporting objects in the current IA version is not that hard task. IMHO, those objects would be dynamic and therefore have a high performance penalty.

Quote:
It seems you cannot use those from C# or VB.NET: you can create an engine and execute it dynamically, but you can't access any classes like e.g. C# classes.

You can use the whole .NET Framework, including full support for WPF. This is somwhat of the initial sense of those projects, isn't it? :)

Best
IsNull

_________________
http://securityvision.ch
AHK 2D GAME ENGINE


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 11th, 2011, 9:12 pm 
Offline
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
No, I meant: it seems you can't use IronRuby classes from C# (only dynamically).

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 26th, 2011, 1:22 pm 
Offline

Joined: August 30th, 2010, 9:05 pm
Posts: 21
After long fight installing all required libraries (mono, libx11-dev etc.) in Linux (Ubuntu) i finally have run IronAHK on my computer. But the result isn't good. It can show Message Box "Hi there" at start, but it can't hook any key (you can't assign any action to keys).

So, unfortunately, the result is worse then AHK (or AHK_L) on Wine 1.2.

So, I'm waiting for any new version of IronAHK.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2011, 9:23 pm 
Offline

Joined: June 24th, 2009, 1:37 am
Posts: 23
Check out this presentation by Anders Hejlsberg about C# 5.0, or at least read the synopsis.

I'm not sure how much of this will be fully applicable to IronAHK; I imagine Mono will be hard-pressed to mimic C# 5.0/Roslyn in a reasonable timeframe. That being said, the way they are putting things together means we would most likely get the following "for free" for IronAHK under Windows:
    * IronAHK syntax highlighting, refactoring, Intellisense in Visual Studio
    * Interactive (stateful) IronAHK console under Visual Studio
    * Automatic C# <-> IronAHK code transformation ("Paste as C#")
    * Ability to call C# functions "natively" in IronAHK and vice versa, with IDE/Intellisense support
Looks very promising.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2011, 7:41 pm 
Offline
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
One thing on DLR is that I'm not sure how and if that supports compilation at all.
  • After thinking about it some time, I understand that compiling any DLR-language to C#-like libraries is quite difficult / impossible, because of the dynamic features. And I also think it's not so important.
  • But compilation to a *.exe file is needed (for IA) IMHO.


But the original reason why I post is that a small hope is growing: IA is developed again! New commits reach the github repo! Please tell me if and how I can help :!: I know I can fork, but what to do next?

Regards
maul.esel

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2011, 12:04 am 
Offline

Joined: March 27th, 2008, 2:14 pm
Posts: 700
I think you mean CLR
maul.esel wrote:
After thinking about it some time, I understand that compiling any DLR-language to C#-like libraries is quite difficult / impossible, because of the dynamic features.
Hmm that makes me wonder. Intuitively, I'm guessing that the main problem is ahk's dynamic types. If that's the case I wonder if a .net type could be constructed that would emulate ahk's variable behavior in entirety, and if this would allow scripts to be compiled as libraries and be used by any .net language, not just IA scripts.

maul.esel wrote:
But compilation to a *.exe file is needed
This is the way IA works already.

All IA does is convert the ahk code to CLR bytecode which is executed by .net just like every other .net language including C#. Essentially one only needs to put IA's output into a file with an .exe extension, and I believe this is already possible.

Note, IA will always depend on the .NET Framework, and so will any executable it creates.

_________________
Scripts - License


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2011, 11:15 am 
Offline
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
I know what IA is, and I know that it can currently compile to a *.exe.
Read the discussion on DLR we had before you post.

What I was talking about is, for example if IA supported classes one day, it may be difficult to use them from e.g. C#, because dynamic features such as adding new methods on runtime is difficult to emulate. The same is true for the other DLR languages (I think).

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2011, 1:50 pm 
Offline
User avatar

Joined: May 10th, 2007, 10:54 am
Posts: 649
Location: .switzerland
Quote:
Hmm that makes me wonder. Intuitively, I'm guessing that the main problem is ahk's dynamic types. If that's the case I wonder if a .net type could be constructed that would emulate ahk's variable behavior in entirety, and if this would allow scripts to be compiled as libraries and be used by any .net language, not just IA scripts.

Actually thats not the primary issue. You can use the Type "object" which can handle Objects and primitive types, and do all the casts by "hand", meaning that the IA compiler generates them.

What the IA compiler does is generating .NET Code Units, which can be compiled as exe or as library or it even can create C# Source-Code from it, so this is not a big problem at all. Much more interesting is how the generated code looks like, in terms of performance and in terms for reuse by another .NET Application/ other IA Script. This is the only problem which the current architecture of the IA generated code has: It is kind of a unreachable Blackbox.


@joelpt:
I personally think that this would be the way to go:
As IronPhyton can use the Visual Studio, so we can use it for AHK.

@maul.esel
Quote:
What I was talking about is, for example if IA supported classes one day, it may be difficult to use them from e.g. C#, because dynamic features such as adding new methods on runtime is difficult to emulate. The same is true for the other DLR languages (I think).

One approach could be facading all the dynamic types with static object types. Additionally, C# 4.0 supports the type "dynamic" -> http://msdn.microsoft.com/en-us/library/dd264736.aspx Which has more or less the prototype behaviour which Lexikos has implemented for AHK_L Objects.

_________________
http://securityvision.ch
AHK 2D GAME ENGINE


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2011, 2:24 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
maul.esel wrote:
I understand that compiling any DLR-language to C#-like libraries is quite difficult / impossible, because of the dynamic features. And I also think it's not so important.

It has been a while since I last read the DLR specification but to the best of my recollection it still requires compilation (at some stage) to CIL. CIL is highly portable and works across all .NET languages, even with Java and native C. IronAHK compiles directly to CLS-Compilant CIL in a very direct and sophisticated fashion thanks to Tobias' thorough understanding of the core specification. However I agree with you, the DLR is not necessary and is beyond the scope of our development goals at this stage.

maul.esel wrote:
But compilation to a *.exe file is needed (for IA) IMHO.

Yes, compilation is a fundamental aspect of the project and my last two commits fixed some parts of a major bug in the compiler which Tobias and I had run into.

infogulch wrote:
Intuitively, I'm guessing that the main problem is ahk's dynamic types. If that's the case I wonder if a .net type could be constructed that would emulate ahk's variable behavior in entirety, and if this would allow scripts to be compiled as libraries and be used by any .net language, not just IA scripts.

IronAHK supports this in full already. It does this by making extensive use of boxing and casting. While admittedly expensive, it is the most portable and flexible approach.

maul.esel wrote:
if IA supported classes one day, it may be difficult to use them from e.g. C#, because dynamic features such as adding new methods on runtime is difficult to emulate. The same is true for the other DLR languages (I think).

Adding new methods at runtime is not really difficult, it can be done by emitting opcodes or sometimes even by reflection. I've done similar things in Java many times with ASM and BCEL and the principals are the same.

IsNull wrote:
This is the only problem which the current architecture of the IA generated code has: It is kind of a unreachable Blackbox.

This is true to an extent, but unavoidable due to features in AutoHotkey like dynamic variable names which is a concept that doesn't exist in any other language I know of. It is possible to bridge them over with public accessors, which is something planned for later.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2011, 2:31 pm 
Offline
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
IsNull wrote:
Additionally, C# 4.0 supports the type "dynamic"
Interesting, I read on it but didn't use it at all so far.
polyethene wrote:
However I agree with you, the DLR is not necessary and is beyond the scope of our development goals at this stage.
Damn, one more misunderstanding. I should better think about what I post.
Actually I meant DLR is more important than using compiled IA libraries from C# ;-)

polyethene wrote:
Adding new methods at runtime is not really difficult, it can be done by emitting opcodes or sometimes even by reflection.
Good to hear. I didn't think of reflection.

maul.esel wrote:
Please tell me if and how I can help :!:

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Report this post
Top
 Profile  
Reply with quote  
PostPosted: November 29th, 2011, 5:34 am 
Offline

Joined: February 28th, 2011, 11:49 pm
Posts: 10
I'm having trouble on Linux Mint 12

If I use a Send command and try to compile I get this:

Code:
Example.ahk (0): ==> Unable to change after type has been created.
Compilation failed.



If I run from the terminal ironahk Example.ahk I get:

Code:
^[[E^[[17~^[[18~^[[D^[[18~^[[D ^[[E^[OR^[[D^[[E


for "This is a test"

This is the last thing keeping me from using Linux, and it's beyond me...

Any help?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 24th, 2012, 3:54 pm 
AS there are already 3 versions that work on Windows would it not have been simpler to not try to make a cross platform version but just concentrate on making a version specifically for Linux?
It seems the idea was nice but turned out to be too difficult to do.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2012, 2:40 am 
Offline

Joined: January 12th, 2011, 4:04 pm
Posts: 93
Location: Kansas City, USA
Is this project still alive? Whilst looking for it, I find so many broken links. Is anyone using this? Where can I find documentation?


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 552 posts ]  Go to page Previous  1 ... 33, 34, 35, 36, 37  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group