| View previous topic :: View next topic |
| Author |
Message |
Thracx
Joined: 12 Mar 2007 Posts: 14
|
Posted: Sun Oct 25, 2009 3:45 pm Post subject: Thanks |
|
|
| Titan wrote: | | Sure. To understand what progress we are making I need to give an overview of the design. |
Awesome, thanks for the update and for the overview of the project! I'm looking forward to the Beta - and let us know if you could use help on anything. _________________ -Thracx
"Man wants to know, and when he ceases to do so, he is no longer a man."
-Fridtjof Nansen |
|
| Back to top |
|
 |
JoeSchmoe
Joined: 17 Feb 2008 Posts: 303
|
Posted: Wed Nov 04, 2009 4:15 am Post subject: |
|
|
I'm also really looking forward to the beta. What I'm most excited about is the potential that this might have for interaction between different languages. For example, I'm considering learning C#, and it sounds like I would be able to use Rusty to call the built-in AHK functions that I'm already comfortable with from my C# code. Am I right in this? Would the syntax be cumbersome? I really like the idea of turning AHK into a library that can be called from any .net language.
Likewise, I hope to eventually be able to call C# methods directly from within AHK. Is this in the works? |
|
| Back to top |
|
 |
chrisguoado
Joined: 05 Nov 2009 Posts: 2
|
Posted: Thu Nov 05, 2009 1:58 am Post subject: |
|
|
It's really a great job! I'm so interested at it.
But when I'm trying to compile IronAHK under ubuntu karmic with the latest src, I'll always get following error:
| Code: | $ make
for dir in IronAHK Rusty Scripting Tests; do \
for sub in "bin" obj; do \
if [ -d "${dir}/${sub}" ]; then rm -R "${dir}/${sub}"; fi \
done; \
done;
mdtool build "--configuration:Release" "IronAHK.sln"
MonoDevelop Build Tool
Loading solution: IronAHK.sln
Loading solution: IronAHK.sln
Loading projects ..
ERROR: Could not load solution: IronAHK.sln. Could not set property
'Policies' in type 'Solution'
Could not set property 'Policies' in type 'Solution'
FATAL ERROR [2009-11-05 09:47:58Z]: System.InvalidOperationException: Could not set property 'Policies' in type 'Solution' ---> System.InvalidOperationException: Cannot deserialise unregistered policy name 'ChangeLogPolicy'
at MonoDevelop.Projects.Policies.PolicyService.GetRegisteredType (System.String name) [0x00000]
at MonoDevelop.Projects.Policies.PolicyService.DiffDeserialize (MonoDevelop.Core.Serialization.DataNode data) [0x00000]
at
... |
|
|
| Back to top |
|
 |
polyethene
Joined: 11 Aug 2004 Posts: 5248 Location: UK
|
Posted: Thu Nov 05, 2009 7:22 am Post subject: |
|
|
| JoeSchmoe wrote: | | I would be able to use Rusty to call the built-in AHK functions that I'm already comfortable with from my C# code. Am I right in this? Would the syntax be cumbersome? | Yes, IronAHK was designed to be modular for this purpose. You can take the DLL or source code of Rusty and include it in any .NET application. Calling them is as simple as Core.MsgBox(...), Core.DllCall(...) etc. You can even host the scripting engine to allow your users to interface with your application using powerful ahk syntax.
| JoeSchmoe wrote: | | I hope to eventually be able to call C# methods directly from within AHK. Is this in the works? | Calling other C# managed methods is easy with reflection and is part of the DLR spec which I hope to implement in future.
| chrisguoado wrote: | | when I'm trying to compile IronAHK under ubuntu karmic with the latest src, I'll always get following error: | Open IronAHK.sln in an editor and comment out (with a #) the lines starting with GlobalSection(MonoDevelopProperties) = preSolution all the way down to EndGlobalSection. I will try to fix this bug for older versions of MD soon. _________________ GitHub • Scripts • IronAHK • Contact by email not private message. |
|
| Back to top |
|
 |
chrisguoado
Joined: 05 Nov 2009 Posts: 2
|
Posted: Thu Nov 05, 2009 8:40 am Post subject: |
|
|
| Thanks a lot! It works. |
|
| Back to top |
|
 |
mike_mo
Joined: 06 Nov 2009 Posts: 1
|
Posted: Fri Nov 06, 2009 4:12 am Post subject: |
|
|
Hi titan, maybe you can help me with building it on Ubuntu as well, I get the following errors (monodevelop and mono-jit installed):
| Code: | $make
for dir in IronAHK Rusty Scripting Tests; do \
for sub in "bin" obj; do \
if [ -d "${dir}/${sub}" ]; then rm -R "${dir}/${sub}"; fi \
done; \
done;
mdtool build "--configuration:Release" "IronAHK.sln"
MonoDevelop Build Tool
FATAL ERROR [2009-11-05 23:09:20Z]: System.Exception: Unknown option 'configuration'
at MonoDevelop.Projects.BuildTool.ReadArgument (System.String argument) [0x00000]
at MonoDevelop.Projects.BuildTool.Run (System.String[] arguments) [0x00000]
at MonoDevelop.Core.ApplicationService.StartApplication (System.String appId, System.String[] parameters) [0x00000]
make: *** [all] Error 255 |
|
|
| Back to top |
|
 |
polyethene
Joined: 11 Aug 2004 Posts: 5248 Location: UK
|
Posted: Fri Nov 06, 2009 9:24 am Post subject: |
|
|
| mike_mo wrote: | | I get the following errors (monodevelop and mono-jit installed): | Looks like you're running an older version of monodevelop, you need at least version 2.0 (default in ubuntu karmic and debian squeeze). _________________ GitHub • Scripts • IronAHK • Contact by email not private message. |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Nov 06, 2009 4:15 pm Post subject: |
|
|
| Titan wrote: | | mike_mo wrote: | | I get the following errors (monodevelop and mono-jit installed): | Looks like you're running an older version of monodevelop, you need at least version 2.0 (default in ubuntu karmic and debian squeeze). |
Still not working. Fresh Ubuntu 9.10 install, Monodevelop 2.0 fresh install. Proper lines commented out on IronAHK.sln and I still get fatal errors. |
|
| Back to top |
|
 |
lipton
Joined: 06 Nov 2009 Posts: 3
|
Posted: Fri Nov 06, 2009 5:54 pm Post subject: |
|
|
Hi Titan,
I wonder if you could help me figure out what the problem is with my attempt to install IronAHK on Ubuntu Jaunty.
I installed the latest version of various monodevelop libraries, downloaded IronAHK and ran "make install all".
First I got an error that was corrected by commenting out the Global section as you recommended elsewhere.
After I got past that error, I got a new one:
| Code: | /mainline/Scripting/IACodeProvider.cs(100,32): error CS1502:
The best overloaded method match for
`System.CodeDom.Compiler.CompilerError.CompilerError(string, int, int,
string, string)' has some invalid arguments /usr/lib/mono/gac/System
/2.0.0.0__b77a5c561934e089/System.dll (Location of the symbol related
to previous error) /mainline/Scripting/IACodeProvider.cs(100,32):
error CS1503: Argument `#4' cannot convert `int' expression to type `string'
| I'm not able to get any further with my installation of IronAHK.
Would appreciate any tips on what to try next. |
|
| Back to top |
|
 |
polyethene
Joined: 11 Aug 2004 Posts: 5248 Location: UK
|
Posted: Fri Nov 06, 2009 7:19 pm Post subject: |
|
|
The two bugs have been fixed. If you have the source already run git pull to update, or run the following commands to get started from scratch:
| Code: | $ sudo apt-get install git-core monodevelop make nunit # install all required dependencies for debug builds
$ git clone git://gitorious.org/ironahk/mainline.git ironahk # download source
$ cd ironahk
$ git pull # update source
$ make
$ cd IronAHK/bin/Release
$ cp ../../../Tests/Scripting/Code/ComplexExpression.ia . # copy over a test script
$ mono IronAHK.exe /out test.exe ComplexExpression.ia # compile the script
$ mono test.exe & # run compiled script |
_________________ GitHub • Scripts • IronAHK • Contact by email not private message. |
|
| Back to top |
|
 |
lipton
Joined: 06 Nov 2009 Posts: 3
|
Posted: Fri Nov 06, 2009 9:25 pm Post subject: |
|
|
Thanks Titan! It worked.
I tried replacing your code from ComplexExpression.ia with this code and recompiling:
| Code: | Numpad1::
Send {Alt Down}
Sleep, 1000
Send {Tab}
Loop
{
GetKeyState, state, Numpad1, P
if state = U
break
Sleep, 1000
Send {Tab}
}
Send {Alt Up}
return
|
I replaced the contents of the script ComplexExpression.ia with the code above and then copied it over just as you had done:
| Code: | $ cd IronAHK/bin/Release
$ cp ../../../Tests/Scripting/Code/ComplexExpression.ia . # copy over a test script
$ mono IronAHK.exe /out test.exe ComplexExpression.ia # compile the script
|
After the last command above, I see this output:
| Code: | Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
at IronAHK.Scripting.Compiler.CompileAssemblyFromDomBatch (System.CodeDom.Compiler.CompilerParameters options, System.CodeDom.CodeCompileUnit[] compilationUnits) [0x00000]
at IronAHK.Scripting.IACodeProvider.CompileAssemblyFromDom (System.CodeDom.Compiler.CompilerParameters options, System.CodeDom.CodeCompileUnit[] compilationUnits) [0x00000]
at IronAHK.Scripting.IACodeProvider.CompileAssemblyFromReader (System.CodeDom.Compiler.CompilerParameters options, System.IO.TextReader[] readers) [0x00000]
at IronAHK.Scripting.IACodeProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000]
at IronAHK.Program.Main (System.String[] args) [0x00000]
|
Any idea what went wrong here? |
|
| Back to top |
|
 |
polyethene
Joined: 11 Aug 2004 Posts: 5248 Location: UK
|
Posted: Fri Nov 06, 2009 11:07 pm Post subject: |
|
|
The compiler is still incomplete so not all scripts will work yet. You can create hotkeys from C# or VB.NET code using the IronAHK.Rusty.Linux.PoliteRegister class although I don't think this is what you want. _________________ GitHub • Scripts • IronAHK • Contact by email not private message. |
|
| Back to top |
|
 |
lipton
Joined: 06 Nov 2009 Posts: 3
|
|
| Back to top |
|
 |
JoeSchmoe
Joined: 17 Feb 2008 Posts: 303
|
Posted: Mon Nov 09, 2009 3:17 pm Post subject: |
|
|
| Titan wrote: | | JoeSchmoe wrote: | | I would be able to use Rusty to call the built-in AHK functions that I'm already comfortable with from my C# code. Am I right in this? Would the syntax be cumbersome? | Yes, IronAHK was designed to be modular for this purpose. You can take the DLL or source code of Rusty and include it in any .NET application. Calling them is as simple as Core.MsgBox(...), Core.DllCall(...) etc. You can even host the scripting engine to allow your users to interface with your application using powerful ahk syntax.
| JoeSchmoe wrote: | | I hope to eventually be able to call C# methods directly from within AHK. Is this in the works? | Calling other C# managed methods is easy with reflection and is part of the DLR spec which I hope to implement in future. | I really love AHK and have written thousands of lines of AHK code. I think that we are all aware, though, that there have been a number of pushes in the past to make AHK more like some of the more "grown up" languages that we may be used to. For example, objects, a simpler and more consistent syntax, etc. In my mind, the tremendous and ongoing growth of AHK shows that these concerns, while valid, don't outweigh the strengths of the language.
In general, it seems like the potential for C# and CLR integration really sets this project apart and is a unique feature for it. In my opinion, the more integration we can have between IA and C# and between IA and CLR, the better. Microsoft seems to have poured huge resources into C# and the CLI, and they don't seem to be going away.
Since C# is a fully OO language and since the CLI is fully object oriented, would it be possible for you to use integration with C# and CLR in IA as a way to bring some of the features that I mentioned in the first paragraph into AHK? For example, programmers will already need to know something about how to call objects in C# and CLI to take advantage of the interoperability features of IA. Would it be possible to use some of that same syntax within IA?
For those who don't already know:
IA=Iron AutoHotkey
CLI=Common Language Infrastructure, part of .net
CLR=Common Language Runtime, the runtime that implements CLI. |
|
| Back to top |
|
 |
polyethene
Joined: 11 Aug 2004 Posts: 5248 Location: UK
|
Posted: Mon Nov 09, 2009 10:03 pm Post subject: |
|
|
| JoeSchmoe wrote: | | would it be possible for you to use integration with C# and CLR in IA as a way to bring some of the features that I mentioned in the first paragraph into AHK | Yes. In general, if your C# code is CLSCompliant it will work with IA seamlessly. This type of integration happens already with Rusty (the default command set) which is written entirely in C# and is independent of the scripting engine. _________________ GitHub • Scripts • IronAHK • Contact by email not private message. |
|
| Back to top |
|
 |
|